From 61e1ee7d456597a0e03fdca1ab0949cb81e9ccec Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 16 Apr 2024 19:19:37 +0200 Subject: Always discard Hastings capability when Hastings is disbanded. --- rules.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/rules.js b/rules.js index 4a2eacd..ad15004 100644 --- a/rules.js +++ b/rules.js @@ -1189,7 +1189,6 @@ function muster_vassal(vassal, lord) { } function disband_vassal(vassal) { - // TODO: Hastings here? 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) @@ -1199,6 +1198,10 @@ function disband_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) { @@ -10246,12 +10249,6 @@ states.aragne_3 = { if (!results.success) { disband_vassal(game.who) - - // TODO: move Hastings check into disband_vassal? - if (game.who === VASSAL_HASTINGS) { - discard_card_capability(AOW_YORK_HASTINGS) - logi(`Hastings Discarded`) - } } end_influence_check() -- cgit v1.2.3