From f641fd09c50adbb9370d39defe5de9d4b6b28891 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 27 May 2021 18:13:58 +0200 Subject: caesar: Only show "End levy" when all levy points are spent. Or there are no valid levy options. --- rules.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index e2dceed..24c609c 100644 --- a/rules.js +++ b/rules.js @@ -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) { -- cgit v1.2.3