diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-05-27 18:13:58 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-16 19:08:56 +0100 |
commit | f641fd09c50adbb9370d39defe5de9d4b6b28891 (patch) | |
tree | 4e4db812c121d28a546480b916ba976227bace17 /rules.js | |
parent | a05d40cf1a4c59f34bab26b296b3cd890fdf7b76 (diff) | |
download | julius-caesar-f641fd09c50adbb9370d39defe5de9d4b6b28891.tar.gz |
caesar: Only show "End levy" when all levy points are spent.
Or there are no valid levy options.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1400,13 +1400,17 @@ states.levy = { if (is_inactive_player(current)) return view.prompt = "Waiting for " + game.active + " to levy..."; view.prompt = "Choose an army to levy. "+game.levies+"LP left."; + let is_levy_possible = false; if (game.levies > 0) { for (let b in BLOCKS) { - if (can_levy(b)) + if (can_levy(b)) { gen_action(view, 'block', b); + is_levy_possible = true; + } } } - gen_action_pass(view, "End levy phase"); + if (!is_levy_possible) + gen_action_pass(view, "End levy phase"); gen_action_undo(view); }, block: function (who) { |