diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-07-08 11:43:18 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-07-08 11:43:18 +0200 |
commit | d38c18e2107bce8f6ff66daf778662f5524f989b (patch) | |
tree | 9bc7f2712da610aaba7c13f4b1ef6785e238e1fa /rules.js | |
parent | 3b5d93cf0152bcc103f7260519d540cf0997867d (diff) | |
download | time-of-crisis-d38c18e2107bce8f6ff66daf778662f5524f989b.tar.gz |
Fix end game turn skipping (discard cards).
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -4776,12 +4776,17 @@ function goto_buy_trash_discard() { else log("Played no cards.") - if (game.end) + if (game.end) { + // Skip rest of turn... + for (let c of game.played) + set_add(discard, c) + game.played.length = 0 goto_end_of_turn() - else if (current_hand().length > 0) + } else if (current_hand().length > 0) { game.state = "buy_trash_discard" - else + } else { goto_buy_trash() + } } states.buy_trash_discard = { @@ -5090,8 +5095,6 @@ function vp_tie(p) { function goto_game_end() { log_h1("Game End") - game.played.length = 0 - game.crisis[0] = -1 game.crisis[1] = 0 game.crisis[2] = 0 |