diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-03-20 23:16:36 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 11:54:52 +0100 |
commit | 9c68a47171603a584b2ed2a4da3aacfd052ebec7 (patch) | |
tree | ba3f288f644c9e90e2089815d41da519b75cb03f | |
parent | 0831b131690929ac4104c52b8047605c870f2301 (diff) | |
download | wilderness-war-9c68a47171603a584b2ed2a4da3aacfd052ebec7.tar.gz |
Lock in boat movement if any unit moves more than their movement allowance.
-rw-r--r-- | rules.js | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -1494,16 +1494,6 @@ function movement_allowance(who) { return m; } -function potential_movement_allowance(who) { - let m = piece_movement(who); - for_each_unit_in_force(who, p => { - let pm = piece_movement(p); - if (pm > m) - m = pm; - }); - return m; -} - function moving_piece() { return game.move.moving; } @@ -2676,10 +2666,6 @@ function max_land_movement_cost() { return game.events.foul_weather ? 2 : movement_allowance(moving_piece()); } -function max_potential_land_movement_cost() { - return game.events.foul_weather ? 2 : potential_movement_allowance(moving_piece()); -} - function max_movement_cost(type) { switch (type) { case 'boat-or-land': @@ -2922,7 +2908,7 @@ function apply_move(to) { game.move.type = 'land'; } } - if (game.move.used > max_potential_land_movement_cost('land')) + if (game.move.used > max_land_movement_cost('land')) game.move.type = 'boat'; } |