summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-08-28 23:54:01 +0200
committerTor Andersson <tor@ccxvii.net>2024-08-28 23:54:01 +0200
commit9dcbe0df6742ab75c0b99f7a55718ffe78d1a315 (patch)
treea3d182574b04fae75cd18788b7cd883be7992a76 /rules.js
parent208961dc6773cc6803f98fddd0a6a9d474694156 (diff)
downloadrommel-in-the-desert-9dcbe0df6742ab75c0b99f7a55718ffe78d1a315.tar.gz
fix can_unit_withdraw check.
Can withdraw the first hex to disrupted enemy units!
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index 2b6bd72..3c06ac6 100644
--- a/rules.js
+++ b/rules.js
@@ -2156,7 +2156,7 @@ function can_unit_withdraw(who) {
search_own_supply_line(from, ssrc, sline, sdist)
for_each_adjacent_hex(from, to => {
let side = to_side_id(from, to)
- if (side_limit[side] > 0 && !has_enemy_unit(to))
+ if (side_limit[side] > 0 && !has_undisrupted_enemy_unit(to))
if (own_supply_line[side] && is_move_closer(sdist, from, to, side))
result = true
})