diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-05-23 00:44:51 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-05-30 21:59:25 +0200 |
commit | de679761df9494f19717de8c9c57fc754d7d0dcd (patch) | |
tree | 9ca1dc19954ee3c4df02798542e9d18b89dedea8 /rules.js | |
parent | c2eaf91e783a45ef21962e63ea1ad66aaf57c201 (diff) | |
download | friedrich-de679761df9494f19717de8c9c57fc754d7d0dcd.tar.gz |
pause after discarding TC before merging with hand.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 37 |
1 files changed, 27 insertions, 10 deletions
@@ -864,7 +864,10 @@ function goto_tactical_cards() { else log("Drew " + n + " TC.") - game.state = "tactical_cards" + if (should_power_discard_tc() && game.draw.length > 0) + game.state = "tactical_cards_discard" + else + game.state = "tactical_cards_show" } function should_power_discard_tc() { @@ -875,24 +878,38 @@ function should_power_discard_tc() { return false } -states.tactical_cards = { +states.tactical_cards_discard = { prompt() { view.draw = game.draw - if (should_power_discard_tc() && game.draw.length > 0) { - prompt("Drew " + game.draw.length + " TCs. Discard one of them.") - for (let c of game.draw) - gen_action_card(c) - } else { - prompt("Drew " + game.draw.length + " TCs.") - view.actions.end_cards = 1 - } + prompt("Drew " + game.draw.length + " TCs. Discard one of them.") + for (let c of game.draw) + gen_action_card(c) }, card(c) { push_undo() log("Discarded 1 TC.") set_delete(game.draw, c) + game.state = "tactical_cards_discard_done" + }, +} + +states.tactical_cards_discard_done = { + prompt() { + view.draw = game.draw + prompt("Drew " + (game.draw.length+1) + " TCs. Discard one of them.") + view.actions.end_cards = 1 + }, + end_cards() { end_tactical_cards() }, +} + +states.tactical_cards_show = { + prompt() { + view.draw = game.draw + prompt("Drew " + game.draw.length + " TCs.") + view.actions.end_cards = 1 + }, end_cards() { end_tactical_cards() }, |