summaryrefslogtreecommitdiff
path: root/rules.ts
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-20 22:17:18 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-20 22:17:18 +0200
commitec35b6050487c91ac9eb62870ef09c9dee6b278a (patch)
tree29aa1712d19bab057b743a10662949680685ec1b /rules.ts
parent87b951752ac2ae929f869feb98e69ce18fe2800c (diff)
downloadplantagenet-ec35b6050487c91ac9eb62870ef09c9dee6b278a.tar.gz
Simplify some checks by reusing common functions.
Diffstat (limited to 'rules.ts')
-rw-r--r--rules.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/rules.ts b/rules.ts
index 8c66931..3718c2e 100644
--- a/rules.ts
+++ b/rules.ts
@@ -3231,16 +3231,15 @@ function can_add_troops_coa(lord: Lord, locale: Locale) {
function can_add_troops_beloved_warwick(lord: Lord, locale: Locale) {
return (
- lord_has_capability(lord, AOW_YORK_BELOVED_WARWICK) &&
- !has_exhausted_marker(locale) &&
- !is_exile(locale)
+ can_add_troops(locale) &&
+ lord_has_capability(lord, AOW_YORK_BELOVED_WARWICK)
)
}
function can_add_troops_irishmen(lord: Lord, locale: Locale) {
return (
+ can_add_troops(locale) &&
lord_has_capability(lord, AOW_YORK_IRISHMEN) &&
- !has_exhausted_marker(locale) &&
(locale === LOC_IRELAND || !set_has(data.port_3, locale))
)
}