From ec35b6050487c91ac9eb62870ef09c9dee6b278a Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 20 Apr 2024 22:17:18 +0200 Subject: Simplify some checks by reusing common functions. --- rules.ts | 7 +++---- 1 file 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)) ) } -- cgit v1.2.3