summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-01-10 16:50:46 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:39 +0100
commitd1b92933f8b4ffcb4b9755075bb185fa351c0298 (patch)
tree3837a46c9d2f175cbcaa7d80485fa1ce59e70258 /rules.js
parent24ec8c363fdd4f79091a82ed1e85c072cc6e0261 (diff)
downloadnevsky-d1b92933f8b4ffcb4b9755075bb185fa351c0298.tar.gz
Rearguard fix.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 70c05f9..b553534 100644
--- a/rules.js
+++ b/rules.js
@@ -6254,7 +6254,7 @@ function goto_array_rearguard() {
set_active_defender()
game.state = "array_rearguard"
game.who = NOBODY
- if (!has_friendly_reserves())
+ if (!has_friendly_reserves() || empty(SA2))
end_array_rearguard()
}
@@ -7243,7 +7243,7 @@ function has_strike_target(S) {
if (S === D1 || S === D2 || S === D3)
return filled(A1) || filled(A2) || filled(A3)
if (S === SA1 || S === SA2 || S === SA3)
- return filled(RD1) || filled(RD2) || filled(RD3) || filled(D1) || filled(D2) || filled(D3)
+ return filled(RD1) || filled(RD2) || filled(RD3) || (!game.battle.rearguard && (filled(D1) || filled(D2) || filled(D3)))
if (S === RD1 || S === RD2 || S === RD3)
return filled(SA1) || filled(SA2) || filled(SA3)
}