From b1951a63f712c22baab1a8bf45118ce7c62c8079 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 3 Feb 2023 19:33:37 +0100 Subject: Fix bug when 1 defending lord withdraws, and is victorious. --- rules.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 396b527..1f039d0 100644 --- a/rules.js +++ b/rules.js @@ -9480,6 +9480,13 @@ function retreat_2() { lift_sieges() remove_legate_if_endangered(game.battle.where) + // TODO: clean up ... + // Release victorious lords who withdrew before battle... + if (is_enemy_stronghold(game.battle.where) && !has_friendly_lord(game.battle.where) && !has_siege_marker(game.battle.where)) + release_besieged_lords(game.battle.where) + if (is_friendly_stronghold(game.battle.where) && !has_enemy_lord(game.battle.where) && !has_siege_marker(game.battle.where)) + release_besieged_lords(game.battle.where) + game.battle.retreat_to = 0 game.battle.retreat_way = 0 end_retreat() -- cgit v1.2.3