summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-01-17 12:07:43 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:39 +0100
commit13690f493b77cec4bff55472d5a3ad9ec1d4ea4b (patch)
tree61f9a66001ee07c5bfd399863242aea5b3aa1d04
parente838a1a58d309a367e085cee627c30fe8d8b09b1 (diff)
downloadnevsky-13690f493b77cec4bff55472d5a3ad9ec1d4ea4b.tar.gz
Only add to ambush lord list if ambush is possible.
-rw-r--r--rules.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index 68f537b..beca253 100644
--- a/rules.js
+++ b/rules.js
@@ -4846,7 +4846,8 @@ function avoid_battle_2() {
log(`Avoided Battle to %${to}.`)
for (let lord of game.group) {
- set_add(game.march.ambush_lords, lord)
+ if (game.march.ambush_lords)
+ set_add(game.march.ambush_lords, lord)
set_lord_locale(lord, to)
set_lord_moved(lord, 1)
}