diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-04-20 22:17:18 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-04-20 22:17:18 +0200 |
commit | ec35b6050487c91ac9eb62870ef09c9dee6b278a (patch) | |
tree | 29aa1712d19bab057b743a10662949680685ec1b /rules.ts | |
parent | 87b951752ac2ae929f869feb98e69ce18fe2800c (diff) | |
download | plantagenet-ec35b6050487c91ac9eb62870ef09c9dee6b278a.tar.gz |
Simplify some checks by reusing common functions.
Diffstat (limited to 'rules.ts')
-rw-r--r-- | rules.ts | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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)) ) } |