diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-09-18 11:13:04 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-17 13:11:27 +0100 |
commit | 7c10b2e9dd5d3af198635bb5cbd3f119a1730486 (patch) | |
tree | eb5ffacc63d7636020c05d57b64c40db02009694 | |
parent | 620f03818f45aaadf283e554677bec8300836945 (diff) | |
download | rommel-in-the-desert-7c10b2e9dd5d3af198635bb5cbd3f119a1730486.tar.gz |
Fix retreat forced march and engaging state change back to retreat move.
-rw-r--r-- | rules.js | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -3686,6 +3686,13 @@ function move_unit(who, to, speed, move) { } } +function resume_move() { + if (game.retreat > 0) + game.state = 'retreat_move' + else + game.state = 'move' +} + states.forced_march_via = { inactive: "movement", prompt() { @@ -3713,7 +3720,7 @@ states.forced_march_via = { forced_march_via(game.hexside.who, via, game.hexside.to, game.hexside.move) game.hexside = null - game.state = 'move' + resume_move() } } @@ -3749,7 +3756,7 @@ states.engage_via = { forced_march_via(game.hexside.who, via, game.hexside.to, game.hexside.move) game.hexside = null - game.state = 'move' + resume_move() }, hex(via) { let rommel = (game.hexside.move === game.rommel) ? 1 : 0 @@ -3760,7 +3767,7 @@ states.engage_via = { engage_via(game.hexside.who, via, game.hexside.to, game.hexside.move) game.hexside = null - game.state = 'move' + resume_move() } } |