From 8240e956dcb04219ffddb74d60e53e294cfd9e6d Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 15 Aug 2020 14:03:11 -0400 Subject: [PATCH] updated historic legality implementation --- .../Mage.Deck.Constructed/src/mage/deck/Historic.java | 5 +---- Mage.Sets/src/mage/sets/HistoricAnthology1.java | 2 +- Mage.Sets/src/mage/sets/HistoricAnthology2.java | 2 +- Mage.Sets/src/mage/sets/HistoricAnthology3.java | 2 +- Mage/src/main/java/mage/constants/SetType.java | 5 +++++ 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Historic.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Historic.java index 268e6448c8..67b1adcd3a 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Historic.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/Historic.java @@ -19,7 +19,7 @@ public class Historic extends Constructed { Date cutoff = new GregorianCalendar(2017, Calendar.SEPTEMBER, 29).getTime(); // XLN release date for (ExpansionSet set : Sets.getInstance().values()) { - if (set.getSetType().isStandardLegal() && (set.getReleaseDate().after(cutoff) || set.getReleaseDate().equals(cutoff))) { + if (set.getSetType().isHistoricLegal() && (set.getReleaseDate().after(cutoff) || set.getReleaseDate().equals(cutoff))) { setCodes.add(set.getCode()); } } @@ -36,9 +36,6 @@ public class Historic extends Constructed { banned.add("Winota, Joiner of Forces"); // Individual cards added - setCodes.add(mage.sets.HistoricAnthology1.getInstance().getCode()); - setCodes.add(mage.sets.HistoricAnthology2.getInstance().getCode()); - setCodes.add(mage.sets.HistoricAnthology3.getInstance().getCode()); singleCards.add("Rhys the Redeemed"); singleCards.add("Spiritual Guardian"); singleCards.add("Sanctuary Cat"); diff --git a/Mage.Sets/src/mage/sets/HistoricAnthology1.java b/Mage.Sets/src/mage/sets/HistoricAnthology1.java index 00e75d31a9..9ee9ac91b9 100644 --- a/Mage.Sets/src/mage/sets/HistoricAnthology1.java +++ b/Mage.Sets/src/mage/sets/HistoricAnthology1.java @@ -18,7 +18,7 @@ public final class HistoricAnthology1 extends ExpansionSet { } private HistoricAnthology1() { - super("Historic Anthology 1", "HA1", ExpansionSet.buildDate(2019, 11, 21), SetType.MAGIC_ONLINE); + super("Historic Anthology 1", "HA1", ExpansionSet.buildDate(2019, 11, 21), SetType.MAGIC_ARENA); this.hasBoosters = false; this.hasBasicLands = false; diff --git a/Mage.Sets/src/mage/sets/HistoricAnthology2.java b/Mage.Sets/src/mage/sets/HistoricAnthology2.java index 0131e95c18..8bd30fee52 100644 --- a/Mage.Sets/src/mage/sets/HistoricAnthology2.java +++ b/Mage.Sets/src/mage/sets/HistoricAnthology2.java @@ -17,7 +17,7 @@ public final class HistoricAnthology2 extends ExpansionSet { } private HistoricAnthology2() { - super("Historic Anthology 2", "HA2", ExpansionSet.buildDate(2020, 3, 12), SetType.MAGIC_ONLINE); + super("Historic Anthology 2", "HA2", ExpansionSet.buildDate(2020, 3, 12), SetType.MAGIC_ARENA); this.hasBoosters = false; this.hasBasicLands = false; cards.add(new SetCardInfo("Ancestral Mask", 13, Rarity.COMMON, mage.cards.a.AncestralMask.class)); diff --git a/Mage.Sets/src/mage/sets/HistoricAnthology3.java b/Mage.Sets/src/mage/sets/HistoricAnthology3.java index 5aa7c331d5..736df3448a 100644 --- a/Mage.Sets/src/mage/sets/HistoricAnthology3.java +++ b/Mage.Sets/src/mage/sets/HistoricAnthology3.java @@ -17,7 +17,7 @@ public final class HistoricAnthology3 extends ExpansionSet { } private HistoricAnthology3() { - super("Historic Anthology 3", "HA3", ExpansionSet.buildDate(2020, 5, 21), SetType.SUPPLEMENTAL); + super("Historic Anthology 3", "HA3", ExpansionSet.buildDate(2020, 5, 21), SetType.MAGIC_ARENA); this.blockName = "Reprint"; this.hasBoosters = false; this.hasBasicLands = false; diff --git a/Mage/src/main/java/mage/constants/SetType.java b/Mage/src/main/java/mage/constants/SetType.java index af1bdd8040..df5d4a8802 100644 --- a/Mage/src/main/java/mage/constants/SetType.java +++ b/Mage/src/main/java/mage/constants/SetType.java @@ -48,4 +48,9 @@ public enum SetType { // any official sets that was in modern (standard + Modern Horizons) return this.isStandardLegal() || this == SetType.SUPPLEMENTAL_MODERN_LEGAL; } + + public boolean isHistoricLegal() { + // any set made for standard or specifically for arena + return this.isStandardLegal() || this == SetType.MAGIC_ARENA; + } }