Reworking standard legality (#12624)

* rework standard rotation

* add comment

* add flag to previous sets
This commit is contained in:
Evan Kranzler 2024-07-31 14:55:48 -04:00 committed by GitHub
parent 27e7d4432f
commit 8ed3c0c12d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 66 additions and 49 deletions

View file

@ -3,9 +3,7 @@ package mage.deck;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.cards.Sets; import mage.cards.Sets;
import mage.cards.decks.Constructed; import mage.cards.decks.Constructed;
import mage.constants.SetType;
import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import java.util.List; import java.util.List;
@ -27,15 +25,6 @@ public class Standard extends Constructed {
banned.add("Invoke Despair"); banned.add("Invoke Despair");
} }
private static boolean isFallSet(ExpansionSet set) {
Calendar cal = Calendar.getInstance();
cal.setTime(set.getReleaseDate());
// Fall sets are normally released during or after September and before November
return set.getSetType() == SetType.EXPANSION
&& Calendar.SEPTEMBER <= cal.get(Calendar.MONTH)
&& cal.get(Calendar.MONTH) < Calendar.NOVEMBER;
}
static List<String> makeLegalSets() { static List<String> makeLegalSets() {
GregorianCalendar current = new GregorianCalendar(); GregorianCalendar current = new GregorianCalendar();
// Get the third most recent fall set that's been released. // Get the third most recent fall set that's been released.
@ -44,7 +33,7 @@ public class Standard extends Constructed {
.values() .values()
.stream() .stream()
.filter(set -> !set.getReleaseDate().after(current.getTime())) .filter(set -> !set.getReleaseDate().after(current.getTime()))
.filter(Standard::isFallSet) .filter(ExpansionSet::isRotationSet)
.sorted(ExpansionSet.getComparator()) .sorted(ExpansionSet.getComparator())
.skip(2) .skip(2)
.findFirst() .findFirst()

View file

@ -30,6 +30,7 @@ public final class BattleForZendikar extends ExpansionSet {
this.blockName = "Battle for Zendikar"; this.blockName = "Battle for Zendikar";
this.hasBoosters = true; this.hasBoosters = true;
this.hasBasicLands = true; this.hasBasicLands = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -19,6 +19,7 @@ public final class Bloomburrow extends ExpansionSet {
super("Bloomburrow", "BLB", ExpansionSet.buildDate(2024, 8, 2), SetType.EXPANSION); super("Bloomburrow", "BLB", ExpansionSet.buildDate(2024, 8, 2), SetType.EXPANSION);
this.blockName = "Bloomburrow"; // for sorting in GUI this.blockName = "Bloomburrow"; // for sorting in GUI
this.hasBasicLands = true; this.hasBasicLands = true;
this.rotationSet = true;
this.hasBoosters = false; // temporary this.hasBoosters = false; // temporary
cards.add(new SetCardInfo("Agate Assault", 122, Rarity.COMMON, mage.cards.a.AgateAssault.class)); cards.add(new SetCardInfo("Agate Assault", 122, Rarity.COMMON, mage.cards.a.AgateAssault.class));

View file

@ -16,6 +16,7 @@ public final class ChampionsOfKamigawa extends ExpansionSet {
super("Champions of Kamigawa", "CHK", ExpansionSet.buildDate(2004, 9, 1), SetType.EXPANSION); super("Champions of Kamigawa", "CHK", ExpansionSet.buildDate(2004, 9, 1), SetType.EXPANSION);
this.blockName = "Kamigawa"; this.blockName = "Kamigawa";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 0; this.numBoosterLands = 0;
this.numBoosterCommon = 11; this.numBoosterCommon = 11;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -24,6 +24,7 @@ public final class Coldsnap extends ExpansionSet {
super("Coldsnap", "CSP", ExpansionSet.buildDate(2006, 6, 21), SetType.EXPANSION); super("Coldsnap", "CSP", ExpansionSet.buildDate(2006, 6, 21), SetType.EXPANSION);
this.blockName = "Ice Age"; this.blockName = "Ice Age";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 0; this.numBoosterLands = 0;
this.numBoosterCommon = 11; this.numBoosterCommon = 11;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -31,6 +31,7 @@ public final class DominariaUnited extends ExpansionSet {
super("Dominaria United", "DMU", ExpansionSet.buildDate(2022, 9, 9), SetType.EXPANSION); super("Dominaria United", "DMU", ExpansionSet.buildDate(2022, 9, 9), SetType.EXPANSION);
this.blockName = "Dominaria United"; this.blockName = "Dominaria United";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -12,7 +12,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class DragonsOfTarkir extends ExpansionSet { public final class DragonsOfTarkir extends ExpansionSet {
@ -28,11 +27,13 @@ public final class DragonsOfTarkir extends ExpansionSet {
this.blockName = "Khans of Tarkir"; this.blockName = "Khans of Tarkir";
this.hasBoosters = true; this.hasBoosters = true;
this.hasBasicLands = true; this.hasBasicLands = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;
this.numBoosterRare = 1; this.numBoosterRare = 1;
this.ratioBoosterMythic = 8; this.ratioBoosterMythic = 8;
cards.add(new SetCardInfo("Acid-Spewer Dragon", 86, Rarity.UNCOMMON, mage.cards.a.AcidSpewerDragon.class)); cards.add(new SetCardInfo("Acid-Spewer Dragon", 86, Rarity.UNCOMMON, mage.cards.a.AcidSpewerDragon.class));
cards.add(new SetCardInfo("Aerie Bowmasters", 170, Rarity.COMMON, mage.cards.a.AerieBowmasters.class)); cards.add(new SetCardInfo("Aerie Bowmasters", 170, Rarity.COMMON, mage.cards.a.AerieBowmasters.class));
cards.add(new SetCardInfo("Ainok Artillerist", 171, Rarity.COMMON, mage.cards.a.AinokArtillerist.class)); cards.add(new SetCardInfo("Ainok Artillerist", 171, Rarity.COMMON, mage.cards.a.AinokArtillerist.class));

View file

@ -1,11 +1,11 @@
package mage.sets; package mage.sets;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.cards.repository.CardInfo;
import mage.collation.BoosterCollator; import mage.collation.BoosterCollator;
import mage.collation.BoosterStructure; import mage.collation.BoosterStructure;
import mage.collation.CardRun; import mage.collation.CardRun;
import mage.collation.RarityConfiguration; import mage.collation.RarityConfiguration;
import mage.cards.repository.CardInfo;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.constants.SetType; import mage.constants.SetType;
@ -24,6 +24,7 @@ public final class GuildsOfRavnica extends ExpansionSet {
super("Guilds of Ravnica", "GRN", ExpansionSet.buildDate(2018, 10, 5), SetType.EXPANSION); super("Guilds of Ravnica", "GRN", ExpansionSet.buildDate(2018, 10, 5), SetType.EXPANSION);
this.blockName = "Guilds of Ravnica"; this.blockName = "Guilds of Ravnica";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -26,6 +26,7 @@ public final class Innistrad extends ExpansionSet {
super("Innistrad", "ISD", ExpansionSet.buildDate(2011, 9, 30), SetType.EXPANSION); super("Innistrad", "ISD", ExpansionSet.buildDate(2011, 9, 30), SetType.EXPANSION);
this.blockName = "Innistrad"; this.blockName = "Innistrad";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 9; this.numBoosterCommon = 9;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -28,6 +28,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
this.blockName = "Innistrad: Midnight Hunt"; this.blockName = "Innistrad: Midnight Hunt";
this.hasBoosters = true; this.hasBoosters = true;
this.hasBasicLands = true; this.hasBasicLands = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 9; this.numBoosterCommon = 9;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -1,4 +1,3 @@
package mage.sets; package mage.sets;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
@ -6,7 +5,6 @@ import mage.constants.Rarity;
import mage.constants.SetType; import mage.constants.SetType;
/** /**
*
* @author North * @author North
*/ */
public final class Invasion extends ExpansionSet { public final class Invasion extends ExpansionSet {
@ -21,6 +19,7 @@ public final class Invasion extends ExpansionSet {
super("Invasion", "INV", ExpansionSet.buildDate(2000, 9, 2), SetType.EXPANSION); super("Invasion", "INV", ExpansionSet.buildDate(2000, 9, 2), SetType.EXPANSION);
this.blockName = "Invasion"; this.blockName = "Invasion";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 0; this.numBoosterLands = 0;
this.numBoosterCommon = 11; this.numBoosterCommon = 11;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -27,6 +27,7 @@ public final class Ixalan extends ExpansionSet {
this.blockName = "Ixalan"; this.blockName = "Ixalan";
this.hasBoosters = true; this.hasBoosters = true;
this.hasBasicLands = true; this.hasBasicLands = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -30,6 +30,7 @@ public final class Kaladesh extends ExpansionSet {
this.blockName = "Kaladesh"; this.blockName = "Kaladesh";
this.hasBoosters = true; this.hasBoosters = true;
this.hasBasicLands = true; this.hasBasicLands = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -12,7 +12,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class KhansOfTarkir extends ExpansionSet { public final class KhansOfTarkir extends ExpansionSet {
@ -28,11 +27,13 @@ public final class KhansOfTarkir extends ExpansionSet {
this.blockName = "Khans of Tarkir"; this.blockName = "Khans of Tarkir";
this.hasBoosters = true; this.hasBoosters = true;
this.hasBasicLands = true; this.hasBasicLands = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;
this.numBoosterRare = 1; this.numBoosterRare = 1;
this.ratioBoosterMythic = 8; this.ratioBoosterMythic = 8;
cards.add(new SetCardInfo("Abomination of Gudul", 159, Rarity.COMMON, mage.cards.a.AbominationOfGudul.class)); cards.add(new SetCardInfo("Abomination of Gudul", 159, Rarity.COMMON, mage.cards.a.AbominationOfGudul.class));
cards.add(new SetCardInfo("Abzan Ascendancy", 160, Rarity.RARE, mage.cards.a.AbzanAscendancy.class)); cards.add(new SetCardInfo("Abzan Ascendancy", 160, Rarity.RARE, mage.cards.a.AbzanAscendancy.class));
cards.add(new SetCardInfo("Abzan Banner", 215, Rarity.COMMON, mage.cards.a.AbzanBanner.class)); cards.add(new SetCardInfo("Abzan Banner", 215, Rarity.COMMON, mage.cards.a.AbzanBanner.class));

View file

@ -1,4 +1,3 @@
package mage.sets; package mage.sets;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
@ -6,7 +5,6 @@ import mage.constants.Rarity;
import mage.constants.SetType; import mage.constants.SetType;
/** /**
*
* @author North * @author North
*/ */
public final class Lorwyn extends ExpansionSet { public final class Lorwyn extends ExpansionSet {
@ -21,11 +19,13 @@ public final class Lorwyn extends ExpansionSet {
super("Lorwyn", "LRW", ExpansionSet.buildDate(2007, 10, 12), SetType.EXPANSION); super("Lorwyn", "LRW", ExpansionSet.buildDate(2007, 10, 12), SetType.EXPANSION);
this.blockName = "Lorwyn"; this.blockName = "Lorwyn";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 0; this.numBoosterLands = 0;
this.numBoosterCommon = 11; this.numBoosterCommon = 11;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;
this.numBoosterRare = 1; this.numBoosterRare = 1;
this.ratioBoosterMythic = 0; this.ratioBoosterMythic = 0;
cards.add(new SetCardInfo("Adder-Staff Boggart", 148, Rarity.COMMON, mage.cards.a.AdderStaffBoggart.class)); cards.add(new SetCardInfo("Adder-Staff Boggart", 148, Rarity.COMMON, mage.cards.a.AdderStaffBoggart.class));
cards.add(new SetCardInfo("Aethersnipe", 50, Rarity.COMMON, mage.cards.a.Aethersnipe.class)); cards.add(new SetCardInfo("Aethersnipe", 50, Rarity.COMMON, mage.cards.a.Aethersnipe.class));
cards.add(new SetCardInfo("Ajani Goldmane", 1, Rarity.RARE, mage.cards.a.AjaniGoldmane.class)); cards.add(new SetCardInfo("Ajani Goldmane", 1, Rarity.RARE, mage.cards.a.AjaniGoldmane.class));

View file

@ -19,6 +19,7 @@ public final class MercadianMasques extends ExpansionSet {
super("Mercadian Masques", "MMQ", ExpansionSet.buildDate(1999, 8, 25), SetType.EXPANSION); super("Mercadian Masques", "MMQ", ExpansionSet.buildDate(1999, 8, 25), SetType.EXPANSION);
this.blockName = "Masques"; this.blockName = "Masques";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 0; this.numBoosterLands = 0;
this.numBoosterCommon = 11; this.numBoosterCommon = 11;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -16,6 +16,7 @@ public final class Mirrodin extends ExpansionSet {
super("Mirrodin", "MRD", ExpansionSet.buildDate(2003, 9, 2), SetType.EXPANSION); super("Mirrodin", "MRD", ExpansionSet.buildDate(2003, 9, 2), SetType.EXPANSION);
this.blockName = "Mirrodin"; this.blockName = "Mirrodin";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 0; this.numBoosterLands = 0;
this.numBoosterCommon = 11; this.numBoosterCommon = 11;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -19,6 +19,7 @@ public final class Odyssey extends ExpansionSet {
super("Odyssey", "ODY", ExpansionSet.buildDate(2001, 9, 22), SetType.EXPANSION); super("Odyssey", "ODY", ExpansionSet.buildDate(2001, 9, 22), SetType.EXPANSION);
this.blockName = "Odyssey"; this.blockName = "Odyssey";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 0; this.numBoosterLands = 0;
this.numBoosterCommon = 11; this.numBoosterCommon = 11;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -18,6 +18,7 @@ public final class Onslaught extends ExpansionSet {
super("Onslaught", "ONS", ExpansionSet.buildDate(2002, 10, 7), SetType.EXPANSION); super("Onslaught", "ONS", ExpansionSet.buildDate(2002, 10, 7), SetType.EXPANSION);
this.blockName = "Onslaught"; this.blockName = "Onslaught";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 0; this.numBoosterLands = 0;
this.numBoosterCommon = 11; this.numBoosterCommon = 11;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -1,4 +1,3 @@
package mage.sets; package mage.sets;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
@ -6,7 +5,6 @@ import mage.constants.Rarity;
import mage.constants.SetType; import mage.constants.SetType;
/** /**
*
* @author loki * @author loki
*/ */
public final class RavnicaCityOfGuilds extends ExpansionSet { public final class RavnicaCityOfGuilds extends ExpansionSet {
@ -21,11 +19,13 @@ public final class RavnicaCityOfGuilds extends ExpansionSet {
super("Ravnica: City of Guilds", "RAV", ExpansionSet.buildDate(2005, 9, 24), SetType.EXPANSION); super("Ravnica: City of Guilds", "RAV", ExpansionSet.buildDate(2005, 9, 24), SetType.EXPANSION);
this.blockName = "Ravnica"; this.blockName = "Ravnica";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 0; this.numBoosterLands = 0;
this.numBoosterCommon = 11; this.numBoosterCommon = 11;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;
this.numBoosterRare = 1; this.numBoosterRare = 1;
this.ratioBoosterMythic = 0; this.ratioBoosterMythic = 0;
cards.add(new SetCardInfo("Agrus Kos, Wojek Veteran", 190, Rarity.RARE, mage.cards.a.AgrusKosWojekVeteran.class)); cards.add(new SetCardInfo("Agrus Kos, Wojek Veteran", 190, Rarity.RARE, mage.cards.a.AgrusKosWojekVeteran.class));
cards.add(new SetCardInfo("Auratouched Mage", 1, Rarity.UNCOMMON, mage.cards.a.AuratouchedMage.class)); cards.add(new SetCardInfo("Auratouched Mage", 1, Rarity.UNCOMMON, mage.cards.a.AuratouchedMage.class));
cards.add(new SetCardInfo("Autochthon Wurm", 191, Rarity.RARE, mage.cards.a.AutochthonWurm.class)); cards.add(new SetCardInfo("Autochthon Wurm", 191, Rarity.RARE, mage.cards.a.AutochthonWurm.class));

View file

@ -12,7 +12,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
*
* @author magenoxx_at_gmail.com * @author magenoxx_at_gmail.com
*/ */
public final class ReturnToRavnica extends ExpansionSet { public final class ReturnToRavnica extends ExpansionSet {
@ -27,11 +26,13 @@ public final class ReturnToRavnica extends ExpansionSet {
super("Return to Ravnica", "RTR", ExpansionSet.buildDate(2012, 10, 5), SetType.EXPANSION); super("Return to Ravnica", "RTR", ExpansionSet.buildDate(2012, 10, 5), SetType.EXPANSION);
this.blockName = "Return to Ravnica"; this.blockName = "Return to Ravnica";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;
this.numBoosterRare = 1; this.numBoosterRare = 1;
this.ratioBoosterMythic = 8; this.ratioBoosterMythic = 8;
cards.add(new SetCardInfo("Abrupt Decay", 141, Rarity.RARE, mage.cards.a.AbruptDecay.class)); cards.add(new SetCardInfo("Abrupt Decay", 141, Rarity.RARE, mage.cards.a.AbruptDecay.class));
cards.add(new SetCardInfo("Aerial Predation", 113, Rarity.COMMON, mage.cards.a.AerialPredation.class)); cards.add(new SetCardInfo("Aerial Predation", 113, Rarity.COMMON, mage.cards.a.AerialPredation.class));
cards.add(new SetCardInfo("Angel of Serenity", 1, Rarity.MYTHIC, mage.cards.a.AngelOfSerenity.class)); cards.add(new SetCardInfo("Angel of Serenity", 1, Rarity.MYTHIC, mage.cards.a.AngelOfSerenity.class));

View file

@ -12,7 +12,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
*
* @author nantuko84 * @author nantuko84
*/ */
public final class ScarsOfMirrodin extends ExpansionSet { public final class ScarsOfMirrodin extends ExpansionSet {
@ -27,11 +26,13 @@ public final class ScarsOfMirrodin extends ExpansionSet {
super("Scars of Mirrodin", "SOM", ExpansionSet.buildDate(2010, 10, 1), SetType.EXPANSION); super("Scars of Mirrodin", "SOM", ExpansionSet.buildDate(2010, 10, 1), SetType.EXPANSION);
this.blockName = "Scars of Mirrodin"; this.blockName = "Scars of Mirrodin";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;
this.numBoosterRare = 1; this.numBoosterRare = 1;
this.ratioBoosterMythic = 8; this.ratioBoosterMythic = 8;
cards.add(new SetCardInfo("Abuna Acolyte", 1, Rarity.UNCOMMON, mage.cards.a.AbunaAcolyte.class)); cards.add(new SetCardInfo("Abuna Acolyte", 1, Rarity.UNCOMMON, mage.cards.a.AbunaAcolyte.class));
cards.add(new SetCardInfo("Accorder's Shield", 136, Rarity.COMMON, mage.cards.a.AccordersShield.class)); cards.add(new SetCardInfo("Accorder's Shield", 136, Rarity.COMMON, mage.cards.a.AccordersShield.class));
cards.add(new SetCardInfo("Acid Web Spider", 108, Rarity.UNCOMMON, mage.cards.a.AcidWebSpider.class)); cards.add(new SetCardInfo("Acid Web Spider", 108, Rarity.UNCOMMON, mage.cards.a.AcidWebSpider.class));

View file

@ -12,7 +12,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
*
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
*/ */
public final class ShardsOfAlara extends ExpansionSet { public final class ShardsOfAlara extends ExpansionSet {
@ -28,11 +27,13 @@ public final class ShardsOfAlara extends ExpansionSet {
super("Shards of Alara", "ALA", ExpansionSet.buildDate(2008, 10, 3), SetType.EXPANSION); super("Shards of Alara", "ALA", ExpansionSet.buildDate(2008, 10, 3), SetType.EXPANSION);
this.blockName = "Shards of Alara"; this.blockName = "Shards of Alara";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;
this.numBoosterRare = 1; this.numBoosterRare = 1;
this.ratioBoosterMythic = 8; this.ratioBoosterMythic = 8;
cards.add(new SetCardInfo("Ad Nauseam", 63, Rarity.RARE, mage.cards.a.AdNauseam.class)); cards.add(new SetCardInfo("Ad Nauseam", 63, Rarity.RARE, mage.cards.a.AdNauseam.class));
cards.add(new SetCardInfo("Agony Warp", 153, Rarity.COMMON, mage.cards.a.AgonyWarp.class)); cards.add(new SetCardInfo("Agony Warp", 153, Rarity.COMMON, mage.cards.a.AgonyWarp.class));
cards.add(new SetCardInfo("Ajani Vengeant", 154, Rarity.MYTHIC, mage.cards.a.AjaniVengeant.class)); cards.add(new SetCardInfo("Ajani Vengeant", 154, Rarity.MYTHIC, mage.cards.a.AjaniVengeant.class));

View file

@ -12,7 +12,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class Theros extends ExpansionSet { public final class Theros extends ExpansionSet {
@ -27,11 +26,13 @@ public final class Theros extends ExpansionSet {
super("Theros", "THS", ExpansionSet.buildDate(2013, 9, 27), SetType.EXPANSION); super("Theros", "THS", ExpansionSet.buildDate(2013, 9, 27), SetType.EXPANSION);
this.blockName = "Theros"; this.blockName = "Theros";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;
this.numBoosterRare = 1; this.numBoosterRare = 1;
this.ratioBoosterMythic = 8; this.ratioBoosterMythic = 8;
cards.add(new SetCardInfo("Abhorrent Overlord", 75, Rarity.RARE, mage.cards.a.AbhorrentOverlord.class)); cards.add(new SetCardInfo("Abhorrent Overlord", 75, Rarity.RARE, mage.cards.a.AbhorrentOverlord.class));
cards.add(new SetCardInfo("Agent of Horizons", 148, Rarity.COMMON, mage.cards.a.AgentOfHorizons.class)); cards.add(new SetCardInfo("Agent of Horizons", 148, Rarity.COMMON, mage.cards.a.AgentOfHorizons.class));
cards.add(new SetCardInfo("Agent of the Fates", 76, Rarity.RARE, mage.cards.a.AgentOfTheFates.class)); cards.add(new SetCardInfo("Agent of the Fates", 76, Rarity.RARE, mage.cards.a.AgentOfTheFates.class));

View file

@ -26,6 +26,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
super("Throne of Eldraine", "ELD", ExpansionSet.buildDate(2019, 10, 4), SetType.EXPANSION); super("Throne of Eldraine", "ELD", ExpansionSet.buildDate(2019, 10, 4), SetType.EXPANSION);
this.blockName = "Throne of Eldraine"; this.blockName = "Throne of Eldraine";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -24,6 +24,7 @@ public final class WildsOfEldraine extends ExpansionSet {
this.blockName = "Wilds of Eldraine"; this.blockName = "Wilds of Eldraine";
this.hasBoosters = true; this.hasBoosters = true;
this.hasBasicLands = true; this.hasBasicLands = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 9; this.numBoosterCommon = 9;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -29,6 +29,7 @@ public final class Zendikar extends ExpansionSet {
super("Zendikar", "ZEN", ExpansionSet.buildDate(2009, 10, 2), SetType.EXPANSION); // October 2nd, 2009 super("Zendikar", "ZEN", ExpansionSet.buildDate(2009, 10, 2), SetType.EXPANSION); // October 2nd, 2009
this.blockName = "Zendikar"; this.blockName = "Zendikar";
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -30,6 +30,7 @@ public final class ZendikarRising extends ExpansionSet {
this.blockName = "Zendikar Rising"; this.blockName = "Zendikar Rising";
this.hasBasicLands = true; this.hasBasicLands = true;
this.hasBoosters = true; this.hasBoosters = true;
this.rotationSet = true;
this.numBoosterLands = 1; this.numBoosterLands = 1;
this.numBoosterCommon = 10; this.numBoosterCommon = 10;
this.numBoosterUncommon = 3; this.numBoosterUncommon = 3;

View file

@ -113,6 +113,7 @@ public abstract class ExpansionSet implements Serializable {
protected boolean hasBasicLands = true; protected boolean hasBasicLands = true;
protected String blockName; // used to group sets in some GUI dialogs like choose set dialog protected String blockName; // used to group sets in some GUI dialogs like choose set dialog
protected boolean rotationSet = false; // used to determine if a set is a standard rotation
protected boolean hasBoosters = false; protected boolean hasBoosters = false;
protected int numBoosterSpecial; protected int numBoosterSpecial;
@ -505,6 +506,10 @@ public abstract class ExpansionSet implements Serializable {
return hasBasicLands; return hasBasicLands;
} }
public boolean isRotationSet() {
return rotationSet;
}
/** /**
* Keep only unique cards for booster generation and card ratio calculation * Keep only unique cards for booster generation and card ratio calculation
* *