* Added promotional, Duel Deck and Non-standard-legal sets to SetType. Changed sets and set selection accordingly.

This commit is contained in:
LevelX2 2015-02-04 00:34:18 +01:00
parent 67b3ee7872
commit 41c6c47092
36 changed files with 43 additions and 41 deletions

View file

@ -564,7 +564,7 @@ public class ConstructedFormats {
}
for (ExpansionInfo set : ExpansionRepository.instance.getAll()) {
if (!set.getType().equals(SetType.REPRINT) && !set.getType().equals(SetType.JOKESET)) {
if (set.getType().equals(SetType.CORE) || set.getType().equals(SetType.EXPANSION)) {
if (set.getReleaseDate().after(cutoff.getTime())) {
standard.add(set.getCode());
}

View file

@ -53,8 +53,8 @@ public class Extended extends Constructed {
cutoff = new GregorianCalendar(current.get(Calendar.YEAR) - 4, Calendar.SEPTEMBER, 1);
}
for (ExpansionSet set: Sets.getInstance().values()) {
if (set.getReleaseDate().after(cutoff.getTime()) && set.getSetType() != SetType.REPRINT
&& set.getSetType() != SetType.JOKESET) {
if (set.getReleaseDate().after(cutoff.getTime()) &&
(set.getSetType() == SetType.CORE || set.getSetType() == SetType.EXPANSION)) {
setCodes.add(set.getCode());
}
}

View file

@ -48,8 +48,8 @@ public class Modern extends Constructed {
Date cutoff = new GregorianCalendar(2003, 7, 28).getTime(); // Eight edition release date
for (ExpansionSet set: Sets.getInstance().values()) {
if ((set.getReleaseDate().after(cutoff) || set.getReleaseDate().equals(cutoff)) && set.getSetType() != SetType.REPRINT
&& set.getSetType() != SetType.JOKESET) {
if ((set.getReleaseDate().after(cutoff) || set.getReleaseDate().equals(cutoff)) &&
(set.getSetType() == SetType.CORE || set.getSetType() == SetType.EXPANSION)) {
setCodes.add(set.getCode());
}
}

View file

@ -54,8 +54,8 @@ public class Standard extends Constructed {
cutoff = new GregorianCalendar(current.get(Calendar.YEAR) - 2, Calendar.SEPTEMBER, 1);
}
for (ExpansionSet set: Sets.getInstance().values()) {
if (set.getReleaseDate().after(cutoff.getTime()) && set.getSetType() != SetType.REPRINT
&& set.getSetType() != SetType.JOKESET) {
if (set.getReleaseDate().after(cutoff.getTime()) &&
(set.getSetType() == SetType.CORE || set.getSetType() == SetType.EXPANSION)){
setCodes.add(set.getCode());
}
}

View file

@ -44,7 +44,7 @@ public class AjaniVsNicolBolas extends ExpansionSet {
}
private AjaniVsNicolBolas() {
super("Duel Decks: Ajani vs. Nicol Bolas", "DDH", "mage.sets.ajanivsnicolbolas", new GregorianCalendar(2011, 9, 2).getTime(), SetType.REPRINT);
super("Duel Decks: Ajani vs. Nicol Bolas", "DDH", "mage.sets.ajanivsnicolbolas", new GregorianCalendar(2011, 9, 2).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -45,7 +45,7 @@ public class Archenemy extends ExpansionSet {
}
private Archenemy() {
super("Archenemy", "ARC", "mage.sets.archenemy", new GregorianCalendar(2010, 6, 18).getTime(), SetType.REPRINT);
super("Archenemy", "ARC", "mage.sets.archenemy", new GregorianCalendar(2010, 6, 18).getTime(), SetType.NON_STANDARD_LEGAL_SETS);
}
}

View file

@ -47,7 +47,7 @@ public class Commander extends ExpansionSet {
}
private Commander() {
super("Magic: The Gathering-Commander", "CMD", "mage.sets.commander", new GregorianCalendar(2011, 6, 17).getTime(), SetType.REPRINT);
super("Magic: The Gathering-Commander", "CMD", "mage.sets.commander", new GregorianCalendar(2011, 6, 17).getTime(), SetType.NON_STANDARD_LEGAL_SETS);
}
}

View file

@ -47,7 +47,7 @@ public class Commander2013 extends ExpansionSet {
}
private Commander2013() {
super("Commander 2013 Edition", "C13", "mage.sets.commander2013", new GregorianCalendar(2013, 11, 01).getTime(), SetType.REPRINT);
super("Commander 2013 Edition", "C13", "mage.sets.commander2013", new GregorianCalendar(2013, 11, 01).getTime(), SetType.NON_STANDARD_LEGAL_SETS);
}
}

View file

@ -45,7 +45,7 @@ public class Commander2014 extends ExpansionSet {
}
private Commander2014() {
super("Commander 2014 Edition", "C14", "mage.sets.commander2014", new GregorianCalendar(2014, 11, 07).getTime(), SetType.REPRINT);
super("Commander 2014 Edition", "C14", "mage.sets.commander2014", new GregorianCalendar(2014, 11, 07).getTime(), SetType.NON_STANDARD_LEGAL_SETS);
}
}

View file

@ -47,7 +47,7 @@ import mage.constants.SetType;
}
private Conspiracy() {
super("Magic: The Gathering-Conspiracy", "CNS", "mage.sets.conspiracy", new GregorianCalendar(2014, 6, 6).getTime(), SetType.REPRINT);
super("Magic: The Gathering-Conspiracy", "CNS", "mage.sets.conspiracy", new GregorianCalendar(2014, 6, 6).getTime(), SetType.NON_STANDARD_LEGAL_SETS);
this.hasBasicLands = false;
this.hasBoosters = true;
this.numBoosterLands = 0;

View file

@ -45,7 +45,7 @@ public class DivineVsDemonic extends ExpansionSet {
}
private DivineVsDemonic() {
super("Duel Decks: Divine vs. Demonic", "DDC", "mage.sets.divinevsdemonic", new GregorianCalendar(2009, 04, 10).getTime(), SetType.REPRINT);
super("Duel Decks: Divine vs. Demonic", "DDC", "mage.sets.divinevsdemonic", new GregorianCalendar(2009, 04, 10).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -13,7 +13,7 @@ public class ElspethvsTezzeret extends ExpansionSet {
}
private ElspethvsTezzeret() {
super("Duel Decks: Elspeth vs. Tezzeret", "DDF", "mage.sets.elspethvstezzeret", new GregorianCalendar(2010, 8, 3).getTime(), SetType.REPRINT);
super("Duel Decks: Elspeth vs. Tezzeret", "DDF", "mage.sets.elspethvstezzeret", new GregorianCalendar(2010, 8, 3).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -23,7 +23,7 @@ public class ElvesVsGoblins extends ExpansionSet {
}
private ElvesVsGoblins() {
super("Duel Decks: Elves vs. Goblins", "EVG", "mage.sets.elvesvsgoblins", new GregorianCalendar(2007, 11, 16).getTime(), SetType.REPRINT);
super("Duel Decks: Elves vs. Goblins", "EVG", "mage.sets.elvesvsgoblins", new GregorianCalendar(2007, 11, 16).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -45,7 +45,7 @@ public class FridayNightMagic extends ExpansionSet {
}
private FridayNightMagic() {
super("Friday Night Magic", "FNMP", "mage.sets.fridaynightmagic", new GregorianCalendar(2011, 6, 17).getTime(), SetType.REPRINT);
super("Friday Night Magic", "FNMP", "mage.sets.fridaynightmagic", new GregorianCalendar(2011, 6, 17).getTime(), SetType.PROMOTIONAL);
this.hasBoosters = false;
this.hasBasicLands = false;
}

View file

@ -45,7 +45,7 @@ public class GameDay extends ExpansionSet {
}
private GameDay() {
super("Game Day", "MGDC", "mage.sets.gameday", new GregorianCalendar(2011, 6, 17).getTime(), SetType.REPRINT);
super("Game Day", "MGDC", "mage.sets.gameday", new GregorianCalendar(2011, 6, 17).getTime(), SetType.PROMOTIONAL);
this.hasBoosters = false;
this.hasBasicLands = false;
}

View file

@ -23,7 +23,7 @@ public class GarrukVsLiliana extends ExpansionSet {
}
private GarrukVsLiliana() {
super("Duel Decks: Garruk vs. Liliana", "DDD", "mage.sets.garrukvsliliana", new GregorianCalendar(2009, 10, 30).getTime(), SetType.REPRINT);
super("Duel Decks: Garruk vs. Liliana", "DDD", "mage.sets.garrukvsliliana", new GregorianCalendar(2009, 10, 30).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -45,7 +45,7 @@ public class GrandPrix extends ExpansionSet {
}
private GrandPrix() {
super("Grand Prix", "GPX", "mage.sets.grandprix", new GregorianCalendar(2011, 6, 17).getTime(), SetType.REPRINT);
super("Grand Prix", "GPX", "mage.sets.grandprix", new GregorianCalendar(2011, 6, 17).getTime(), SetType.PROMOTIONAL);
this.hasBoosters = false;
this.hasBasicLands = false;
}

View file

@ -14,6 +14,6 @@ public class Guru extends ExpansionSet {
private Guru() {
//TODO find correct release date, wiki don't known anything about this expansion
super("Guru", "GUR", "mage.sets.guru", new GregorianCalendar(1990, 1, 2).getTime(), SetType.REPRINT);
super("Guru", "GUR", "mage.sets.guru", new GregorianCalendar(1990, 1, 2).getTime(), SetType.PROMOTIONAL);
}
}

View file

@ -44,7 +44,7 @@ public class Heroesvsmonsters extends ExpansionSet {
}
private Heroesvsmonsters() {
super("Duel Decks: Heroes vs. Monsters", "DDL", "mage.sets.heroesvsmonsters", new GregorianCalendar(2013, 9, 6).getTime(), SetType.REPRINT);
super("Duel Decks: Heroes vs. Monsters", "DDL", "mage.sets.heroesvsmonsters", new GregorianCalendar(2013, 9, 6).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -44,7 +44,7 @@ public class IzzetVsGolgari extends ExpansionSet {
}
private IzzetVsGolgari() {
super("Duel Decks: Izzet vs. Golgari", "DDJ", "mage.sets.izzetvsgolgari", new GregorianCalendar(2012, 9, 7).getTime(), SetType.REPRINT);
super("Duel Decks: Izzet vs. Golgari", "DDJ", "mage.sets.izzetvsgolgari", new GregorianCalendar(2012, 9, 7).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -23,7 +23,7 @@ public class JaceVsChandra extends ExpansionSet {
}
private JaceVsChandra() {
super("Duel Decks: Jace vs. Chandra", "DD2", "mage.sets.jacevschandra", new GregorianCalendar(2008, 11, 07).getTime(), SetType.REPRINT);
super("Duel Decks: Jace vs. Chandra", "DD2", "mage.sets.jacevschandra", new GregorianCalendar(2008, 11, 07).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -45,7 +45,7 @@ public class JaceVsVraska extends ExpansionSet {
}
private JaceVsVraska() {
super("Duel Decks: Jace vs. Vraska", "DDM", "mage.sets.jacevsvraska", new GregorianCalendar(2014, 3, 14).getTime(), SetType.REPRINT);
super("Duel Decks: Jace vs. Vraska", "DDM", "mage.sets.jacevsvraska", new GregorianCalendar(2014, 3, 14).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -45,7 +45,7 @@ public class JudgePromo extends ExpansionSet {
}
private JudgePromo() {
super("Judge Promo", "JR", "mage.sets.judgepromo", new GregorianCalendar(2011, 6, 17).getTime(), SetType.REPRINT);
super("Judge Promo", "JR", "mage.sets.judgepromo", new GregorianCalendar(2011, 6, 17).getTime(), SetType.PROMOTIONAL);
this.hasBoosters = false;
}

View file

@ -45,7 +45,7 @@ public class KnightsVsDragons extends ExpansionSet {
}
private KnightsVsDragons() {
super("Duel Decks: Knights vs. Dragons", "DDG", "mage.sets.knightsvsdragons", new GregorianCalendar(2011, 4, 1).getTime(), SetType.REPRINT);
super("Duel Decks: Knights vs. Dragons", "DDG", "mage.sets.knightsvsdragons", new GregorianCalendar(2011, 4, 1).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -45,7 +45,7 @@ public class LaunchParty extends ExpansionSet {
}
private LaunchParty() {
super("Launch Party", "MLP", "mage.sets.launchparty", new GregorianCalendar(2011, 6, 17).getTime(), SetType.REPRINT);
super("Launch Party", "MLP", "mage.sets.launchparty", new GregorianCalendar(2011, 6, 17).getTime(), SetType.PROMOTIONAL);
this.hasBoosters = false;
this.hasBasicLands = false;
}

View file

@ -13,7 +13,7 @@ public class MagicPlayerRewards extends ExpansionSet {
}
private MagicPlayerRewards() {
super("Magic Player Rewards", "MPR", "mage.sets.playerrewards", new GregorianCalendar(1990, 1, 1).getTime(), SetType.EXPANSION);
super("Magic Player Rewards", "MPR", "mage.sets.playerrewards", new GregorianCalendar(1990, 1, 1).getTime(), SetType.PROMOTIONAL);
this.hasBoosters = false;
this.hasBasicLands = false;
}

View file

@ -27,11 +27,10 @@
*/
package mage.sets;
import java.util.GregorianCalendar;
import mage.cards.ExpansionSet;
import mage.constants.SetType;
import java.util.GregorianCalendar;
public class MediaInserts extends ExpansionSet {
private static final MediaInserts fINSTANCE = new MediaInserts();
@ -40,7 +39,7 @@ public class MediaInserts extends ExpansionSet {
}
private MediaInserts() {
super("Media Inserts", "MBP", "mage.sets.mediainserts", new GregorianCalendar(1990, 1, 1).getTime(), SetType.EXPANSION);
super("Media Inserts", "MBP", "mage.sets.mediainserts", new GregorianCalendar(1990, 1, 1).getTime(), SetType.PROMOTIONAL);
this.hasBoosters = false;
this.hasBasicLands = false;
}

View file

@ -44,7 +44,7 @@ public class PhyrexiaVsTheCoalition extends ExpansionSet {
}
private PhyrexiaVsTheCoalition() {
super("Duel Decks: Phyrexia vs. the Coalition", "DDE", "mage.sets.phyrexiavsthecoalition", new GregorianCalendar(2010, 3, 19).getTime(), SetType.REPRINT);
super("Duel Decks: Phyrexia vs. the Coalition", "DDE", "mage.sets.phyrexiavsthecoalition", new GregorianCalendar(2010, 3, 19).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -45,7 +45,7 @@ public class Planechase extends ExpansionSet {
}
private Planechase() {
super("Planechase", "HOP", "mage.sets.planechase", new GregorianCalendar(2009, 8, 4).getTime(), SetType.REPRINT);
super("Planechase", "HOP", "mage.sets.planechase", new GregorianCalendar(2009, 8, 4).getTime(), SetType.NON_STANDARD_LEGAL_SETS);
}
}

View file

@ -45,7 +45,7 @@ public class Planechase2012 extends ExpansionSet {
}
private Planechase2012() {
super("Planechase (2012 Edition)", "PC2", "mage.sets.planechase2012", new GregorianCalendar(2012, 6, 1).getTime(), SetType.REPRINT);
super("Planechase (2012 Edition)", "PC2", "mage.sets.planechase2012", new GregorianCalendar(2012, 6, 1).getTime(), SetType.NON_STANDARD_LEGAL_SETS);
}
}

View file

@ -44,7 +44,7 @@ public class SorinVsTibalt extends ExpansionSet {
}
private SorinVsTibalt() {
super("Duel Decks: Sorin vs. Tibalt", "DDK", "mage.sets.sorinvstibalt", new GregorianCalendar(2013, 3, 15).getTime(), SetType.REPRINT);
super("Duel Decks: Sorin vs. Tibalt", "DDK", "mage.sets.sorinvstibalt", new GregorianCalendar(2013, 3, 15).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -44,7 +44,7 @@ public class SpeedVsCunning extends ExpansionSet {
}
private SpeedVsCunning() {
super("Duel Decks: Speed vs. Cunning", "DDN", "mage.sets.speedvscunning", new GregorianCalendar(2014, 9, 5).getTime(), SetType.REPRINT);
super("Duel Decks: Speed vs. Cunning", "DDN", "mage.sets.speedvscunning", new GregorianCalendar(2014, 9, 5).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -45,7 +45,7 @@ public class VenserVsKoth extends ExpansionSet {
}
private VenserVsKoth() {
super("Duel Decks: Venser vs. Koth", "DDI", "mage.sets.venservskoth", new GregorianCalendar(2012, 3, 30).getTime(), SetType.REPRINT);
super("Duel Decks: Venser vs. Koth", "DDI", "mage.sets.venservskoth", new GregorianCalendar(2012, 3, 30).getTime(), SetType.DUEL_DECK);
this.hasBasicLands = false;
}
}

View file

@ -22,7 +22,7 @@ public class WPNGateway extends ExpansionSet {
}
private WPNGateway() {
super("WPN Gateway", "GRC", "mage.sets.wpngateway", new GregorianCalendar(2011, 6, 17).getTime(), SetType.REPRINT);
super("WPN Gateway", "GRC", "mage.sets.wpngateway", new GregorianCalendar(2011, 6, 17).getTime(), SetType.PROMOTIONAL);
this.hasBoosters = false;
this.hasBasicLands = false;
}

View file

@ -45,7 +45,7 @@ public class WorldMagicCupQualifier extends ExpansionSet {
}
private WorldMagicCupQualifier() {
super("World Magic Cup Qualifier", "WMCQ", "mage.sets.worldmagiccupqualifier", new GregorianCalendar(2011, 6, 17).getTime(), SetType.REPRINT);
super("World Magic Cup Qualifier", "WMCQ", "mage.sets.worldmagiccupqualifier", new GregorianCalendar(2011, 6, 17).getTime(), SetType.PROMOTIONAL);
this.hasBoosters = false;
this.hasBasicLands = false;
}

View file

@ -6,11 +6,14 @@ package mage.constants;
*/
public enum SetType {
CORE("Core"),
DUEL_DECK("Duel Deck"),
EXPANSION("Expansion"),
NON_STANDARD_LEGAL_SETS("Non-standard-legal sets"),
REPRINT("Reprint"),
PROMOTIONAL("Promotional"),
JOKESET("Joke Set");
private String text;
private final String text;
SetType(String text) {
this.text = text;