summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-30 12:37:33 +0100
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-30 12:37:33 +0100
commit3da7ea2f6eea3aef97ff54f7082d82c395509292 (patch)
treee5eacf88c1edf88d8301a14531a13ef7ede7ab5a /rules.js
parentd84df5a8e45db207ede5229e607c3ee798e17fee (diff)
downloadvotes-for-women-3da7ea2f6eea3aef97ff54f7082d82c395509292.tar.gz
fix discarding multiple persistent cards
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js18
1 files 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"