summaryrefslogtreecommitdiff
path: root/rules.ts
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-11 19:35:54 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-11 19:35:54 +0200
commit4150ad52927750366f951fd8b310d91d76fe61c6 (patch)
tree811cb3a4ec5cf34b5acd954799356c11ffc64838 /rules.ts
parent8fa6de20a81182952cdf0b149ab2adb8c08267b0 (diff)
downloadplantagenet-4150ad52927750366f951fd8b310d91d76fe61c6.tar.gz
fix percy's north route
Diffstat (limited to 'rules.ts')
-rw-r--r--rules.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/rules.ts b/rules.ts
index 110a0f3..4945c17 100644
--- a/rules.ts
+++ b/rules.ts
@@ -4747,7 +4747,7 @@ function has_free_parley_levy() {
return false
}
-function has_route_to(start: Locale, to: Locale) {
+function has_york_route_to(start: Locale, to: Locale) {
if (start === to)
return true
@@ -4762,7 +4762,7 @@ function has_route_to(start: Locale, to: Locale) {
return true
// exception for start locale
- if (here === start || (is_friendly_locale(here) && !has_enemy_lord(here))) {
+ if (here === start || (has_york_favour(here) && !has_lancaster_lord(here))) {
for (let next of data.locales[here].adjacent) {
if (!search_seen[next]) {
search_seen[next] = 1
@@ -6107,7 +6107,7 @@ function add_battle_capability_troops() {
log_battle_cap(lord, AOW_YORK_PERCYS_NORTH1)
add_lord_forces(lord, MILITIA, 4)
}
- if (lord_has_capability(lord, AOW_YORK_PERCYS_NORTH2) && has_route_to(here, LOC_CARLISLE)) {
+ if (lord_has_capability(lord, AOW_YORK_PERCYS_NORTH2) && has_york_route_to(here, LOC_CARLISLE)) {
log_battle_cap(lord, AOW_YORK_PERCYS_NORTH2)
add_lord_forces(lord, MEN_AT_ARMS, 2)
}
@@ -6142,7 +6142,7 @@ function remove_battle_capability_troops(lord: Lord) {
if (lord_has_capability(lord, AOW_YORK_PERCYS_NORTH1) && is_north(here)) {
add_lord_forces(lord, MILITIA, -4)
}
- if (lord_has_capability(lord, AOW_YORK_PERCYS_NORTH2) && has_route_to(here, LOC_CARLISLE)) {
+ if (lord_has_capability(lord, AOW_YORK_PERCYS_NORTH2) && has_york_route_to(here, LOC_CARLISLE)) {
add_lord_forces(lord, MEN_AT_ARMS, -2)
}
if (lord_has_capability(lord, AOW_YORK_KINGDOM_UNITED) && (is_north(here) || is_south(here) || is_wales(here))) {