summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteisuru <31881306+teisuru@users.noreply.github.com>2023-12-19 18:04:59 +0100
committerTor Andersson <tor@ccxvii.net>2023-12-21 14:14:00 +0100
commitb753bdda4063c7f2f1674d3b75bde5da19b3aef0 (patch)
tree422687735544922fba0e510876d26015d5adf7a8
parent64e198a0055b557fbcfe7da6dbd9685790e4e03d (diff)
downloadplantagenet-b753bdda4063c7f2f1674d3b75bde5da19b3aef0.tar.gz
fix discard Y20
-rw-r--r--rules.js12
1 files changed, 11 insertions, 1 deletions
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()
}