From b753bdda4063c7f2f1674d3b75bde5da19b3aef0 Mon Sep 17 00:00:00 2001 From: teisuru <31881306+teisuru@users.noreply.github.com> Date: Tue, 19 Dec 2023 18:04:59 +0100 Subject: fix discard Y20 --- rules.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rules.js b/rules.js index 93adf2d..87646d3 100644 --- a/rules.js +++ b/rules.js @@ -1815,6 +1815,16 @@ function discard_events(when) { } } +function discard_extra_levy_events() { + for (let i = 0; i < game.events.length; ) { + let c = game.events[i] + if (data.cards[c].name === "Y20") + array_remove(game.events, i) + else + ++i + } +} + function discard_friendly_events(when) { for (let i = 0; i < game.events.length; ) { let c = game.events[i] @@ -4474,7 +4484,7 @@ states.muster_capability = { function goto_levy_discard_events() { // Discard "This Levy" events from play. discard_events("this_levy") - + discard_extra_levy_events() goto_campaign_plan() } -- cgit v1.2.3