From 9c05cb6c5e35aecebb42618134bcce189af1bf3f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 29 Apr 2024 20:46:52 +0200 Subject: remove hastings capability card when vassal disbands --- rules.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rules.ts b/rules.ts index 595dc35..3cc2df7 100644 --- a/rules.ts +++ b/rules.ts @@ -1565,6 +1565,10 @@ function muster_vassal(vassal: Vassal, lord: Lord) { } function disband_vassal(vassal: Vassal) { + if (vassal === VASSAL_HASTINGS) { + let lord = get_vassal_lord(VASSAL_HASTINGS) + discard_lord_capability(lord, AOW_YORK_HASTINGS) + } if (data.vassals[vassal].service > 0) { let new_turn = current_turn() + (6 - data.vassals[vassal].service) set_vassal_lord_and_service(vassal, VASSAL_CALENDAR, new_turn) @@ -1574,10 +1578,6 @@ function disband_vassal(vassal: Vassal) { set_vassal_lord_and_service(vassal, VASSAL_OUT_OF_PLAY, 0) log(`Disbanded V${vassal}.`) } - if (vassal === VASSAL_HASTINGS) { - discard_card_capability(AOW_YORK_HASTINGS) - logi(`Hastings Discarded`) - } } function pay_vassal(vassal: Vassal) { -- cgit v1.2.3