summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js37
1 files changed, 36 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index 70b00ae..092e30c 100644
--- a/rules.js
+++ b/rules.js
@@ -640,6 +640,7 @@ states.play_card ={
},
event() {
push_undo()
+ check_ligachev_event()
log_gap(`Played C${game.played_card} for the event`)
game.vm_infl_to_do = false
game.return = game.active
@@ -663,6 +664,7 @@ states.play_card ={
},
influence() {
push_undo()
+ check_ligachev_non_event()
log_gap(`Played C${game.played_card} to place SPs`)
finish_play_card()
@@ -675,12 +677,14 @@ states.play_card ={
},
tst() {
push_undo()
+ check_ligachev_non_event()
log_gap(`Played C${game.played_card} to the Tiananmen Square Track`)
finish_play_card()
game.state='tiananmen_square_attempt'
},
support_check() {
push_undo()
+ check_ligachev_non_event()
log_gap(`Played C${game.played_card} for support checks`)
finish_play_card()
game.available_ops = 2
@@ -689,6 +693,7 @@ states.play_card ={
},
tst_7() { /*Cancel opponent event */
push_undo()
+ check_ligachev_non_event()
log(`Played C${game.played_card}. Event cancelled using TST Award`)
game.tst_7 = true
game.vm_infl_to_do = true
@@ -730,6 +735,7 @@ states.resolve_opponent_event = {
},
influence(){
push_undo()
+ check_ligachev_non_event()
log_gap(`Played C${game.played_card} to place SPs`)
// If ABHR - Set AHBR tracker to true
if (game.persistent_events.includes(58)) {
@@ -740,6 +746,7 @@ states.resolve_opponent_event = {
},
support_check() {
push_undo()
+ check_ligachev_non_event()
log_gap(`Played C${game.played_card} for support checks`)
game.available_ops = 2
game.state = 'support_check_prep'
@@ -2974,8 +2981,9 @@ function select_card(card){
game.democrat_hand.splice(find_card, 1)
}
game.available_ops = get_card_ops(card)
+}
- //Check Ligachev
+function check_ligachev_non_event() {
if (game.active === DEM && game.persistent_events.includes(99) && card !== C_GORBACHEV_CHARMS_THE_WEST) {
log(`-3 VP from C${C_LIGACHEV}`)
game.vp -= 3
@@ -2988,6 +2996,32 @@ function select_card(card){
game.state = 'play_card'
}
+function check_ligachev_non_event() {
+ if (game.active === DEM && game.persistent_events.includes(C_LIGACHEV)) {
+ log(`-3 VP from C${C_LIGACHEV}`)
+ game.vp -= 3
+ if (check_vp()) {
+ return
+ }
+ game.persistent_events = game.persistent_events.filter(n => n !== C_LIGACHEV)
+ game.strategy_removed.push(C_LIGACHEV)
+ }
+ game.state = 'play_card'
+}
+
+function check_ligachev_event() {
+ if (game.active === DEM && game.persistent_events.includes(C_LIGACHEV) && card !== C_GORBACHEV_CHARMS_THE_WEST) {
+ log(`-3 VP from C${C_LIGACHEV}`)
+ game.vp -= 3
+ if (check_vp()) {
+ return
+ }
+ game.persistent_events = game.persistent_events.filter(n => n !== C_LIGACHEV)
+ game.strategy_removed.push(C_LIGACHEV)
+ }
+ game.state = 'play_card'
+}
+
function is_auto_resolve(card) {
let ceausecu_events = [10, 41, 69, 101, 107]
if (auto_resolve_events.includes(card)) {
@@ -7833,6 +7867,7 @@ states.vm_tst_8 = {
},
event() {
push_undo()
+ check_ligachev_event()
log(`C${game.played_card}:`)
game.vm_event_to_do = false
game.return_state = 'vm_tst_8'