diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-09-03 13:51:25 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-17 13:11:27 +0100 |
commit | 036468db8d980af582daa9ad020eb8c189309056 (patch) | |
tree | 21f33bf6d283e316e33b6b9b5ba7601e1e3f8283 | |
parent | a9edc45cec9971475f236f064c6e35fab6a44b80 (diff) | |
download | rommel-in-the-desert-036468db8d980af582daa9ad020eb8c189309056.tar.gz |
Bugs.
-rw-r--r-- | rules.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3191,7 +3191,7 @@ function search_current_move(who, is_retreat) { let speed = unit_speed[who] if (game.turn_option !== 'pass') { if (is_retreat) - search_move_retreat(who, speed + 1 + (rommel1 | rommel2)) + search_move_retreat(from, speed + 1 + (rommel1 | rommel2)) else search_move(from, speed + 1 + (rommel1 | rommel2)) } else { @@ -3295,7 +3295,7 @@ states.move = { // Select Regroup Move 1 if (game.to1) { for_each_hex_and_adjacent_hex(game.from1, from => { - if (!has_enemy_unit(from)) { + if (!has_enemy_unit(from) && from !== game.to1) { let fastest = fastest_undisrupted_and_unmoved_friendly_unit_in_hex(from) if (fastest >= 0) { search_current_move(fastest, false) @@ -3311,7 +3311,7 @@ states.move = { // Select Regroup Move 2 if (game.to1) { for_each_hex_and_adjacent_hex(game.from2, from => { - if (!has_enemy_unit(from)) { + if (!has_enemy_unit(from) && from !== game.to2) { let fastest = fastest_undisrupted_and_unmoved_friendly_unit_in_hex(from) if (fastest >= 0) { search_current_move(fastest, false) |