summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-11-07 18:29:35 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2024-11-07 18:29:35 +0000
commitd9ed8e9b667fa346adf7c388db95a499b8395d0c (patch)
treed4d3090523a876d31f508bb8dc3df3b774e7b891
parentc0afec77e15497b2e054ad492bad459a7beff7c1 (diff)
download1989-dawn-of-freedom-d9ed8e9b667fa346adf7c388db95a499b8395d0c.tar.gz
Properly remove Ligachev
-rw-r--r--rules.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index fb0af42..a7fbf31 100644
--- a/rules.js
+++ b/rules.js
@@ -2951,12 +2951,13 @@ function select_card(card){
//Check Ligachev
if (game.active === DEM && game.persistent_events.includes(99) && card !== C_GORBACHEV_CHARMS_THE_WEST) {
- log('-3 VP from C99')
+ log(`-3 VP from C${C_LIGACHEV}`)
game.vp -= 3
if (check_vp()) {
return
}
game.persistent_events = game.persistent_events.filter(n => n !== 99)
+ game.strategy_removed.push(C_LIGACHEV)
}
game.state = 'play_card'
}
@@ -3061,6 +3062,12 @@ function is_auto_resolve(card) {
if (!game.state.startsWith('vm')) { log('No scoring cards in discard') }
return true
}
+ } else if (card === C_UNION_OF_DEMOCRATIC_FORCES) {
+ let bulgarian_presence = spaces.filter(space => space.country === 'Bulgaria' && game.comInfl[space.space_id] > 0).length
+ if (bulgarian_presence === 0) {
+ if (!game.state.startsWith('vm')) { log('No SPs to remove') }
+ return true
+ }
}
else {
return false
@@ -3328,7 +3335,7 @@ function end_round() {
throw new Error(`Wrong number of cards: ${card_check.length}`)
}
} else if (card_check.length !== 110) {
- console.log('wrong number of cards in game', card_check)
+ console.log('Entire array:', JSON.stringify(card_check))
throw new Error(`Wrong number of cards: ${card_check.length}`)
}
@@ -5283,6 +5290,7 @@ function vm_the_tyrant_is_gone() {
function vm_the_tyrant_is_gone_prep() {
add_to_persistent_events(C_THE_TYRANT_IS_GONE)
+ logi(`After C${C_THE_CROWD_TURNS_AGAINST_CEAUSESCU} occurs, remove 4 Commuist SPs from the Romanian Elite space. The Democrats choose where the Ceausescus flee to`)
vm_next()
}
@@ -8619,12 +8627,14 @@ CODE[93] = [ // Shock Therapy*
CODE[94] = [ // Union of Democratic Forces*
[ vm_permanently_remove ],
+ [ vm_if, ()=>!is_auto_resolve(C_UNION_OF_DEMOCRATIC_FORCES) ],
[ vm_valid_spaces_country_opp, 'Bulgaria' ],
[ vm_prompt, ' from Bulgaria' ],
[ vm_remove_limited_opp_infl, 4, 2 ],
[ vm_valid_spaces_country_sc, 'Bulgaria' ],
[ vm_prompt, 'Make 2 Support Checks in Bulgaria' ],
[ vm_support_check, 2 ],
+ [ vm_endif ],
[ vm_return ],
]
@@ -8643,7 +8653,7 @@ CODE[96] = [ // The Chinese Solution*
]
CODE[97] = [ // The Tyrant is Gone*
- [ vm_if, ()=>game.persistent_events.includes(54) ],
+ [ vm_if, ()=>game.persistent_events.includes(THE_CROWD_TURNS_AGAINST_CEAUSESCU_OCCURRED) ],
[ vm_valid_spaces, 'Cluj-Napoca' ],
[ vm_prompt, 'the Romanian Elite Space' ],
[ vm_remove_x_opp_infl, 4 ],