From 9fd155055f7867ad7a712c5b52ddc661f4e43508 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Fri, 24 Jan 2025 10:19:00 +0000 Subject: Fix Roundtable talks not discarded if Communist draws has no cards --- rules.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rules.js b/rules.js index 26a790d..871b4ed 100644 --- a/rules.js +++ b/rules.js @@ -1140,10 +1140,12 @@ states.draw_power_cards = { game.com_pwr_hand_limit = 0 } // Events which affect cards drawn - if (game.persistent_events.includes(C_ROUNDTABLE_TALKS) && game.com_pwr_hand_limit >= 2) { - log(`Democrat receives 2 cards from Communist due to C${C_ROUNDTABLE_TALKS}.`) - game.dem_pwr_hand_limit += 2 - game.com_pwr_hand_limit -= 2 + if (game.persistent_events.includes(C_ROUNDTABLE_TALKS)) { + if (game. game.com_pwr_hand_limit >= 2) { + log(`Democrat receives 2 cards from Communist due to C${C_ROUNDTABLE_TALKS}.`) + game.dem_pwr_hand_limit += 2 + game.com_pwr_hand_limit -= 2 + } game.persistent_events = game.persistent_events.filter(n => n !== C_ROUNDTABLE_TALKS) game.strategy_discard.push(C_ROUNDTABLE_TALKS) } -- cgit v1.2.3