From 17f3a60fa7e2ea91ea285ce99950fd85e61e2669 Mon Sep 17 00:00:00 2001 From: teisuru <31881306+teisuru@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:16:09 +0100 Subject: fix blocked ford If blocked ford used and the enemy fled no battle would initialize and game.battle.where would be empty --- rules.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rules.js b/rules.js index 35642f3..3cd079f 100644 --- a/rules.js +++ b/rules.js @@ -6298,6 +6298,7 @@ function march_with_group_2() { function end_march() { // Disbanded in battle! if (!is_lord_on_map(game.command)) { + game.where = NOWHERE game.march = 0 spend_all_actions() resume_command() @@ -6606,6 +6607,7 @@ states.blocked_ford = { }, card(c) { play_held_event(c) + game.where = get_lord_locale(game.command) goto_battle() }, pass() { @@ -8202,6 +8204,10 @@ function prompt_battle_events_death() { // === EVENT : WARDEN OF THE MARCHES === function can_play_warden_of_the_marches() { + // if blocked ford then flee + if (is_north(game.where)) + return true + // if battle if (is_north(game.battle.where)) return true return false -- cgit v1.2.3