summaryrefslogtreecommitdiff
path: root/rules.ts
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-01 02:24:30 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-01 02:25:12 +0200
commitb7b163ab45e87a9cb45abfff99cb11efa51f8588 (patch)
tree3c2280f07738aad7630eded738dba255db8e5aea /rules.ts
parent17fdcb962405d239358501a53891e5338476c156 (diff)
downloadplantagenet-b7b163ab45e87a9cb45abfff99cb11efa51f8588.tar.gz
vanguard should only look at actual engagements (interaction with ravine)
Diffstat (limited to 'rules.ts')
-rw-r--r--rules.ts12
1 files 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