diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-06-25 12:38:59 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 11:54:52 +0100 |
commit | 29f6a1a42060ce3a15b5d7e4bec0c538eb937085 (patch) | |
tree | d0e92de92109726a39f1f557b3da97a1bc47fdbb /rules.js | |
parent | 2c2a7d926ccaa7a208d923d16a7da792dd977e56 (diff) | |
download | wilderness-war-29f6a1a42060ce3a15b5d7e4bec0c538eb937085.tar.gz |
Tweak next prompt wording.
Use "Pass" consistently for response event prompts.
Use "Pass" when there are more stockades/forts to build.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 33 |
1 files changed, 25 insertions, 8 deletions
@@ -4504,7 +4504,7 @@ states.attacker_events = { view.prompt += " You don't have " + dont_have.join(" or ") + "." if (have.length === 0 && dont_have.length === 0) view.prompt += " You have no more response events." - gen_action_next() + gen_action_pass() }, play_event(c) { push_undo() @@ -4523,6 +4523,9 @@ states.attacker_events = { break } }, + pass() { + goto_battle_defender_events() + }, next() { goto_battle_defender_events() }, @@ -4573,7 +4576,7 @@ states.defender_events = { view.prompt += " You don't have " + dont_have.join(" or ") + "." if (have.length === 0 && dont_have.length === 0) view.prompt += " You have no more response events." - gen_action_next() + gen_action_pass() }, play_event(c) { push_undo() @@ -4592,6 +4595,9 @@ states.defender_events = { break } }, + pass() { + goto_battle_roll() + }, next() { goto_battle_roll() }, @@ -6745,7 +6751,10 @@ states.construct_stockades = { inactive: "construct stockades", prompt() { view.prompt = `Construct Stockades${format_remain(game.count)}.` - gen_action_next() + if (game.count > 0) + gen_action_pass() + else + gen_action_next() if (game.count > 0) { for (let s = first_space; s <= last_space; ++s) { if (has_friendly_supplied_drilled_troops(s) || is_originally_friendly(s)) { @@ -6772,6 +6781,9 @@ states.construct_stockades = { player.stockades.push(s) game.count -- }, + pass() { + end_action_phase() + }, next() { end_action_phase() }, @@ -6790,7 +6802,10 @@ states.construct_forts = { inactive: "construct forts", prompt() { view.prompt = `Construct Forts${format_remain(game.count)}.` - gen_action_next() + if (game.count > 0) + gen_action_pass() + else + gen_action_next() if (game.count > 0) { for (let s = first_space; s <= last_space; ++s) { if (has_friendly_supplied_drilled_troops(s)) { @@ -6823,6 +6838,10 @@ states.construct_forts = { } game.count -- }, + pass() { + delete game.list + end_action_phase() + }, next() { delete game.list end_action_phase() @@ -9454,10 +9473,8 @@ function gen_action(action, argument) { } } -function gen_action_next(prompt) { - if (!view.actions) - view.actions = {} - view.actions.next = prompt || 1 +function gen_action_next() { + gen_action('next') } function gen_action_pass() { |