summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2025-02-27 13:27:25 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2025-02-27 13:27:25 +0000
commit9d7e2b0b58adda25bf76a3b5c1570383ba10d22f (patch)
treefe988f75824ddec28eec11d78eeadf2763797bf4
parentfcfd7c5124f6d879e8b5c15421e4e703fd74b601 (diff)
download1989-dawn-of-freedom-9d7e2b0b58adda25bf76a3b5c1570383ba10d22f.tar.gz
Add switch_player check when playing events as part of TST box 8
-rw-r--r--rules.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 025e831..70decd2 100644
--- a/rules.js
+++ b/rules.js
@@ -3742,6 +3742,7 @@ function end_round() {
card_check = card_check.sort((a, b) => a - b)
if (check_duplicates(card_check)) {
const duplicates = find_duplicates(card_check)
+ console.log('game.strategy_deck',game.strategy_deck, 'game.strategy_discard',game.strategy_discard, 'game.strategy_removed', game.strategy_removed, 'game.persistent_events', game.persistent_events, 'game.communist_hand', game.communist_hand, 'game.democrat_hand', game.democrat_hand)
throw new Error(`Duplicate cards detected: ${duplicates.join(', ')}`)
}
if (game.turn <= 3) {
@@ -8235,6 +8236,8 @@ states.vm_tst_8 = {
game.vm_event_to_do = false
game.return_state = 'vm_tst_8'
game.return = game.active
+ if (switch_events.includes(game.played_card))
+ change_player()
game.vm_event = game.played_card
goto_vm(game.vm_event)
},