summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteisuru <31881306+teisuru@users.noreply.github.com>2024-02-13 16:16:09 +0100
committerteisuru <31881306+teisuru@users.noreply.github.com>2024-02-13 16:16:09 +0100
commit17f3a60fa7e2ea91ea285ce99950fd85e61e2669 (patch)
tree8ae0533244df4c99dd82d279d9045bdab1545563
parent73f61808ab96f5bb5e392d6d00ffe9fbcef8d24b (diff)
downloadplantagenet-17f3a60fa7e2ea91ea285ce99950fd85e61e2669.tar.gz
fix blocked ford
If blocked ford used and the enemy fled no battle would initialize and game.battle.where would be empty
-rw-r--r--rules.js6
1 files changed, 6 insertions, 0 deletions
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