diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 56 |
1 files changed, 26 insertions, 30 deletions
@@ -637,27 +637,7 @@ states.play_card ={ influence() { push_undo() log_gap(`Played C${game.played_card} to place SPs`) - - // Check if Common European Home played for influence - if (game.played_card === C_COMMON_EUROPEAN_HOME) { - if (game.active === DEM) { - game.vp -- - log('-1 VP') - } else { - game.vp ++ - log('+1 VP') - } - if (check_vp()) { - return - } - } - // Check if card is opponent card with event that needs to be resolved - - if (cards[game.played_card].playable || game.playable_cards.includes(game.played_card)) { - if ((game.active === DEM && cards[game.played_card].side === "C" ) || (game.active === COM && cards[game.played_card].side === "D")) { - game.vm_event_to_do = true - } - } + finish_play_card() // If ABHR - Set AHBR tracker to true if (game.persistent_events.includes(58)) { @@ -674,15 +654,7 @@ states.play_card ={ support_check() { push_undo() log_gap(`Played C${game.played_card} for support checks`) - - // Check if card is opponent card with event that needs to be resolved - - if (cards[game.played_card].playable || game.playable_cards.includes(game.played_card)) { - if ((game.active === DEM && cards[game.played_card].side === "C" ) || (game.active === COM && cards[game.played_card].side === "D")) { - game.vm_event_to_do = true - } - } - + finish_play_card() game.available_ops = 2 game.state='support_check_prep' valid_spaces_sc() @@ -3226,6 +3198,29 @@ function get_tst_6_ops() { return ops } +function finish_play_card() { + // Check if Common European Home played for influence + if (game.played_card === C_COMMON_EUROPEAN_HOME) { + if (game.active === DEM) { + game.vp -- + log('-1 VP') + } else { + game.vp ++ + log('+1 VP') + } + if (check_vp()) { + return + } + } + // Check if card is opponent card with event that needs to be resolved + + if (cards[game.played_card].playable || game.playable_cards.includes(game.played_card)) { + if ((game.active === DEM && cards[game.played_card].side === "C" ) || (game.active === COM && cards[game.played_card].side === "D")) { + game.vm_event_to_do = true + } + } +} + function finish_the_wall() { if (game.the_wall_must_go['dem_wins'] === 2) { game.persistent_events.push(C_THE_WALL_MUST_GO) @@ -5226,6 +5221,7 @@ function vm_the_baltic_way_prep() { if (check_vp()) { return } + log(`Allows play of C${C_BREAKAWAY_BALTIC_REPUBLICS} for the event`) vm_next() } |