diff options
author | Troy Nordine <tdnordine@gmail.com> | 2023-10-09 19:04:35 -0500 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-10 18:16:55 +0100 |
commit | 3af913ce09c4404d3103f96ec527ab01d795a034 (patch) | |
tree | 5cdc0ae6a8c3ef0f21ef1913746b145378461491 | |
parent | edcae0f25698561e606a50c4c75c4acd1a0f1e88 (diff) | |
download | plantagenet-3af913ce09c4404d3103f96ec527ab01d795a034.tar.gz |
Implemented L15 Henry Pressures Parliment.
-rw-r--r-- | rules.js | 25 |
1 files changed, 22 insertions, 3 deletions
@@ -467,7 +467,7 @@ const EVENT_LANCASTER_ASPIELLES = L13 // TODO // select one of enemy's Lord mats to show it to you. Perhaps write those in the log ? const EVENT_LANCASTER_SCOTS = L14 // The addition by events are NEVER mandatory. -const EVENT_LANCASTER_HENRY_PRESSURES_PARLIAMENT = L15 // TODO +const EVENT_LANCASTER_HENRY_PRESSURES_PARLIAMENT = L15 // count enemy vassals on all enemy lords and yorkists lose that amount of influence const EVENT_LANCASTER_WARDEN_OF_THE_MARCHES = L16 // TODO // Play during Death and Disband step of Battle. All routed (flee or not) @@ -2265,9 +2265,9 @@ function goto_immediate_event(c) { // Discard - Immediate Events case EVENT_LANCASTER_SCOTS: return goto_lancaster_event_scots() - /*case EVENT_LANCASTER_HENRY_PRESSURES_PARLIAMENT: + case EVENT_LANCASTER_HENRY_PRESSURES_PARLIAMENT: return goto_lancaster_event_henry_pressures_parliament() - case EVENT_LANCASTER_HENRYS_PROCLAMATION: + /*case EVENT_LANCASTER_HENRYS_PROCLAMATION: return goto_lancaster_event_henrys_proclamation() case EVENT_LANCASTER_FRENCH_TROOPS: return goto_lancaster_event_french_troops() @@ -2324,6 +2324,7 @@ function goto_lancaster_event_scots() { function end_lancaster_event_scots() { clear_lords_moved() + game.who = NOBODY end_immediate_event() } @@ -2373,6 +2374,24 @@ states.scots = { } } +// === EVENTS: LANCASTER HENRY PRESSURES PARLIMENT EVENT === + +function goto_lancaster_event_henry_pressures_parliament() { + let count = 0 + for (let vassal = first_vassal; vassal <= last_vassal; vassal++) { + if (is_vassal_mustered(vassal) && is_york_lord(get_lord_with_vassal(vassal))) { + count++ + } + } + + if (count > 0) { + logi(`C${EVENT_LANCASTER_HENRY_PRESSURES_PARLIAMENT} removes ${count} York influence.`) + reduce_york_influence(count) + } + + end_immediate_event() +} + // === EVENTS: SHIFT LORD OR SERVICE (IMMEDIATE) === /* function prompt_shift_lord_on_calendar(boxes) { |