From 2de6fe355129a56e3473b872d318117ea27f2114 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 1 Dec 2023 23:20:57 +0100 Subject: Don't roll for moves after pass in June 15 scenario. --- rules.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/rules.js b/rules.js index 21f56a6..c7438f1 100644 --- a/rules.js +++ b/rules.js @@ -1316,6 +1316,16 @@ function pass_movement() { if (can_move_any()) { let die = roll_die() + if (game.turn <= 2 && game.active === P1) { + game.remain = game.french_moves + return + } + + if (game.turn === 2 && game.active === P2) { + game.remain = game.prussian_moves + return + } + let n = 0 for (let p of friendly_corps()) { if (piece_is_not_in_enemy_zoc_or_zoi(p)) @@ -1350,12 +1360,7 @@ states.movement = { let may_pass = 1 let remain = game.remain - if (game.turn <= 2 && game.active === P1) - remain = Math.min(remain, game.french_moves) - if (game.turn === 2 && game.active === P2) - remain = Math.min(remain, game.prussian_moves) - - if (game.remain > 0) + if (remain > 0) prompt("Movement: " + remain + " moves remain.") else prompt("Movement.") -- cgit v1.2.3