From 13690f493b77cec4bff55472d5a3ad9ec1d4ea4b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 17 Jan 2023 12:07:43 +0100 Subject: Only add to ambush lord list if ambush is possible. --- rules.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) } -- cgit v1.2.3