diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-09-15 03:27:51 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-09-15 10:18:57 +0200 |
commit | 6e23b26f70f68c686e9f65af29bc35792b76938e (patch) | |
tree | 9670e9036c7c1de62585402b8e29f071c12ae598 /rules.js | |
parent | b8aa47d94217df96ecf279151eca7b24d5206e77 (diff) | |
download | rommel-in-the-desert-6e23b26f70f68c686e9f65af29bc35792b76938e.tar.gz |
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -894,7 +894,7 @@ function for_each_adjacent_hex(here, fn) { for (let s = 0; s < 6; ++s) { let next = here + hexnext[s] if (is_map_hex(next)) - fn(next) + fn(next, to_side(here, next, s)) } } @@ -4020,9 +4020,14 @@ function move_via(who, to, speed, move) { forced: [], move: move } - for_each_adjacent_hex(to, via => { + for_each_adjacent_hex(to, (via, side) => { let forced = false let unforced = false + + if (game.turn_option === 'pass') + if (!own_supply_line[side]) + return + function check_road(bonus) { if (hex_road[from] >= bonus) { let k = can_move_via(via, to, speed, bonus) |