From b7b163ab45e87a9cb45abfff99cb11efa51f8588 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 1 May 2024 02:24:30 +0200 Subject: vanguard should only look at actual engagements (interaction with ravine) --- rules.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/rules.ts b/rules.ts index 7afd644..460f705 100644 --- a/rules.ts +++ b/rules.ts @@ -6716,11 +6716,13 @@ states.final_charge = { // === BATTLE CAPABILITY: VANGUARD === function is_vanguard_in_battle() { - for (let p of battle_strike_positions) { - let lord = game.battle.array[p] - if (lord !== NOBODY) { - if (lord_has_capability(lord, AOW_YORK_VANGUARD)) - return true + for (let eng of game.battle.engagements) { + for (let p of eng) { + let lord = game.battle.array[p] + if (lord !== NOBODY) { + if (lord_has_capability(lord, AOW_YORK_VANGUARD)) + return true + } } } return false -- cgit v1.2.3