From d1b92933f8b4ffcb4b9755075bb185fa351c0298 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 10 Jan 2023 16:50:46 +0100 Subject: Rearguard fix. --- rules.js | 4 ++-- 1 file 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) } -- cgit v1.2.3