diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2025-02-08 18:05:03 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2025-02-08 18:07:43 +0000 |
commit | 88dda4dc240e1de3f4ef2abba63a132f8f9bebda (patch) | |
tree | 7bc54d284ad122f8621179cf87d689421756b712 /rules.js | |
parent | c4ca26e50ddab62c5183415856cb6f5f83977188 (diff) | |
download | 1989-dawn-of-freedom-88dda4dc240e1de3f4ef2abba63a132f8f9bebda.tar.gz |
Fix end game via Common European Home
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 30 |
1 files changed, 18 insertions, 12 deletions
@@ -749,6 +749,7 @@ states.play_card = { push_undo() log_ops_banner() check_ligachev_non_event() + check_ceh() if (game.state === 'game_over') { return } else { @@ -767,6 +768,7 @@ states.play_card = { push_undo() log_ops_banner() check_ligachev_non_event() + check_ceh() if (game.state === 'game_over') { return } else { @@ -779,6 +781,7 @@ states.play_card = { push_undo() log_ops_banner() check_ligachev_non_event() + check_ceh() if (game.state === 'game_over') { return } else { @@ -3191,6 +3194,21 @@ function end_raise_stakes(){ } } +function check_ceh() { + if (game.played_card === C_COMMON_EUROPEAN_HOME) { + if (game.active === DEM) { + game.vp -- + logi(`-1 VP for playing C${C_COMMON_EUROPEAN_HOME} for Operations.`) + } else { + game.vp ++ + logi(`+1 VP for playing C${C_COMMON_EUROPEAN_HOME} for Operations.`) + } + if (check_vp()) { + return + } + } +} + function check_reformer() { if (game.dem_tst_position !== game.com_tst_position) { if (!game.playable_cards.includes(C_REFORMER_REHABILITATED)) { @@ -3586,18 +3604,6 @@ function get_tst_6_ops() { } function finish_play_card() { - if (game.played_card === C_COMMON_EUROPEAN_HOME) { - if (game.active === DEM) { - game.vp -- - logi(`-1 VP for playing C${C_COMMON_EUROPEAN_HOME} for Operations.`) - } else { - game.vp ++ - logi(`+1 VP for playing C${C_COMMON_EUROPEAN_HOME} for Operations.`) - } - if (check_vp()) { - return - } - } if (cards[game.played_card].playable || game.playable_cards.includes(game.played_card)) { if ( (game.active === DEM && cards[game.played_card].side === 'C') || |