summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-09-03 15:06:25 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:27 +0100
commit0d65afd2c1b76cf2be31c868f5e6791e864e747b (patch)
treea5a7d0662b8e0df7923896e7b8ef2b11d9b61328
parent2df3e79687f2fc4456d20030c5bfec98f37f2c08 (diff)
downloadrommel-in-the-desert-0d65afd2c1b76cf2be31c868f5e6791e864e747b.tar.gz
Fix return to refit path check.
-rw-r--r--rules.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 8d98a63..303c5ce 100644
--- a/rules.js
+++ b/rules.js
@@ -3826,7 +3826,7 @@ states.forced_marches = {
set_unit_hex(who, to)
}
} else {
- log(`>${die_face_miss[roll]} disrupted at #${to}`)
+ log(`>${die_face_miss[roll]} disrupted at #${from}`)
set_unit_hex(who, from)
if (is_unit_disrupted(who))
reduce_unit(who) // was a retreating unit
@@ -5711,7 +5711,7 @@ function gen_spending_bps() {
// Return for Refit
if (from !== base) {
- if (can_move_to(base, 63))
+ if (path_cost[0][base] < 63)
gen_action_hex(friendly_refit())
}