From 3da7ea2f6eea3aef97ff54f7082d82c395509292 Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Thu, 30 Nov 2023 12:37:33 +0100 Subject: fix discarding multiple persistent cards --- rules.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/rules.js b/rules.js index 0608544..0cf1150 100644 --- a/rules.js +++ b/rules.js @@ -1153,9 +1153,9 @@ function goto_cleanup_phase() { if (game.turn < 6) { // any cards in the “Cards in Effect for the Rest of the Turn box” // are placed in the appropriate discard pile. - for (let c of game.persistent_turn) { - discard_persistent_card(game.persistent_turn, c) - } + for (let c of game.persistent_turn) + log(`C${c} discarded.`) + game.persistent_turn = [] if (game.support_hand.length !== 1) throw Error("ASSERT game.support_hand.length === 1") @@ -1178,12 +1178,12 @@ function goto_cleanup_phase() { // Any cards in the “Cards in Effect for the Rest of the Turn box” // and “Cards in Effect for the Rest of the Game box” are placed in // the appropriate discard pile. - for (let c of game.persistent_turn) { - discard_persistent_card(game.persistent_turn, c) - } - for (let c of game.persistent_game) { - discard_persistent_card(game.persistent_game, c) - } + for (let c of game.persistent_turn) + log(`C${c} discarded.`) + game.persistent_turn = [] + for (let c of game.persistent_game) + log(`C${c} discarded.`) + game.persistent_game = [] } game.state = "cleanup_phase" -- cgit v1.2.3