summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2025-02-09 18:05:52 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2025-02-09 18:05:52 +0000
commite52b645aa489890b1df3ac2598fa80df780ea928 (patch)
treea6370163c682aea0d8c5bd52229d21b4ffac1a1f /rules.js
parent563b03dd4260fe8f39629f49de698753999ef74e (diff)
download1989-dawn-of-freedom-e52b645aa489890b1df3ac2598fa80df780ea928.tar.gz
Fix Teformer and opponent events
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index a1a89ee..3a2a03c 100644
--- a/rules.js
+++ b/rules.js
@@ -3744,6 +3744,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) {
@@ -6715,6 +6716,13 @@ states.vm_play_event_from_discard = {
log(`Chose C${card}.`)
else
log(`${game.active} chose C${card}.`)
+ if (this_card() === C_REFORMER_REHABILITATED) {
+ if (
+ (game.active === DEM && cards[card].side === 'C') ||
+ (game.active === COM && cards[card].side === 'D')
+ )
+ change_player()
+ }
game.vm_event = card
game.vm_available_ops = cards[card].ops
game.discard = false