diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-08-21 18:04:04 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-08-21 18:04:04 +0200 |
commit | f591b678e291141ed66e7caa30ff94d86cb776d4 (patch) | |
tree | 6a782fc568f2cb2812c864e4187379b0c380e610 | |
parent | 601c2f14aedd9ac91af4a1d953afe0bd57ee8ee2 (diff) | |
download | washingtons-war-f591b678e291141ed66e7caa30ff94d86cb776d4.tar.gz |
Add pauses.
-rw-r--r-- | rules.js | 30 |
1 files changed, 29 insertions, 1 deletions
@@ -4094,8 +4094,21 @@ states.place_french_navy = { gen_place_french_navy() }, sea(zone) { + push_undo() log("French Navy at " + ZONE_NAME[zone] + ".") game.french_navy = zone + game.state = "place_french_navy_confirm" + }, +} + +states.place_french_navy_confirm = { + inactive: "to place French navy", + prompt() { + view.prompt = "Place the French Navy: Done." + view.actions.next = 1 + }, + next() { + clear_undo() goto_political_control_phase() }, } @@ -4441,17 +4454,32 @@ states.european_war = { inactive: "to remove 2 British CUs", prompt() { view.prompt = "European War: Remove 2 British CU from any spaces. " + game.count + " left." + if (game.count > 0) for (let space of all_spaces) if (has_british_cu(space)) gen_action_space(space) view.actions.pass = 1 }, space(where) { + push_undo() remove_british_cu(where, 1) if (--game.count === 0) - goto_end_phase() + game.state = "european_war_confirm" }, pass() { + clear_undo() + goto_end_phase() + }, +} + +states.european_war_confirm = { + inactive: "to remove 2 British CUs", + prompt() { + view.prompt = "European War: Done." + view.actions.next = 1 + }, + next() { + clear_undo() goto_end_phase() }, } |