From 3ecd6f9f08db90faef216ea692809d34f3c1d5f7 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 1 Mar 2025 12:51:53 +0100 Subject: Allow choosing how much to shift Saxony marker after battle. --- rules.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/rules.js b/rules.js index 72f7a3e..13d080e 100644 --- a/rules.js +++ b/rules.js @@ -5272,14 +5272,16 @@ function should_saxony_shift_after_supply(pow) { states.saxony_shift_battle = { inactive: "shift Saxony marker", prompt() { - prompt(`Shift Saxony marker ${game.count} to the right.`) - view.actions.shift_saxony = [ 1 ] + prompt(`Shift Saxony marker up to ${game.count} to the right.`) + view.actions.shift_saxony = [] + for (let i = 1; i <= game.count; ++i) + view.actions.shift_saxony.push(i) view.actions.ignore = 1 }, - shift_saxony(_) { - log("Saxony marker " + game.count + " right.") + shift_saxony(n) { + log("Saxony marker " + n + " right.") let save_saxony = game.saxony - game.saxony = Math.max(1, Math.min(5, game.saxony + game.count)) + game.saxony = Math.max(1, Math.min(5, game.saxony + n)) game.count = 0 // Saxony defection -- cgit v1.2.3