summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-05-03 14:28:07 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 11:54:52 +0100
commita90dc9f39c1fcb57343f65571e2012f52f69f5fe (patch)
tree3fd41b1fa931be8be621817ea4456e73886a3a6c /rules.js
parentd2179a12816725f836f36ef9fcd19165c3f953de (diff)
downloadwilderness-war-a90dc9f39c1fcb57343f65571e2012f52f69f5fe.tar.gz
End retreating with all if there are no more destinations available.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 1d3301c..c59d172 100644
--- a/rules.js
+++ b/rules.js
@@ -5549,6 +5549,8 @@ states.retreat_all_defenders_to = {
}
}
});
+ if (!can_all_defenders_retreat_from(from))
+ done = true;
if (done)
game.state = 'retreat_defender';
},