reorganized various constructed formats

This commit is contained in:
Evan Kranzler 2022-03-18 09:49:34 -04:00
parent 4967750669
commit 0d038b1737
12 changed files with 23 additions and 102 deletions

View file

@ -10,8 +10,6 @@ import mage.abilities.keyword.FriendsForeverAbility;
import mage.abilities.keyword.PartnerAbility;
import mage.abilities.keyword.PartnerWithAbility;
import mage.cards.Card;
import mage.cards.ExpansionSet;
import mage.cards.Sets;
import mage.cards.decks.Constructed;
import mage.cards.decks.Deck;
import mage.cards.decks.DeckValidatorErrorType;
@ -32,65 +30,10 @@ public abstract class AbstractCommander extends Constructed {
protected final List<String> bannedPartner = new ArrayList<>();
protected boolean partnerAllowed = true;
public AbstractCommander() {
super("Commander");
for (ExpansionSet set : Sets.getInstance().values()) {
if (set.getSetType().isEternalLegal()) {
setCodes.add(set.getCode());
}
}
banned.add("Ancestral Recall");
banned.add("Balance");
banned.add("Biorhythm");
banned.add("Black Lotus");
banned.add("Braids, Cabal Minion");
banned.add("Channel");
banned.add("Coalition Victory");
banned.add("Emrakul, the Aeons Torn");
banned.add("Erayo, Soratami Ascendant");
banned.add("Fastbond");
banned.add("Flash");
banned.add("Gifts Ungiven");
banned.add("Griselbrand");
banned.add("Hullbreacher");
banned.add("Iona, Shield of Emeria");
banned.add("Karakas");
banned.add("Leovold, Emissary of Trest");
banned.add("Library of Alexandria");
banned.add("Limited Resources");
banned.add("Lutri, the Spellchaser");
banned.add("Mox Emerald");
banned.add("Mox Jet");
banned.add("Mox Pearl");
banned.add("Mox Ruby");
banned.add("Mox Sapphire");
banned.add("Panoptic Mirror");
banned.add("Paradox Engine");
banned.add("Primeval Titan");
banned.add("Prophet of Kruphix");
banned.add("Recurring Nightmare");
banned.add("Rofellos, Llanowar Emissary");
banned.add("Sundering Titan");
banned.add("Sway of the Stars");
banned.add("Sylvan Primordial");
banned.add("Time Vault");
banned.add("Time Walk");
banned.add("Tinker");
banned.add("Tolarian Academy");
banned.add("Trade Secrets");
banned.add("Upheaval");
banned.add("Worldfire");
banned.add("Yawgmoth's Bargain");
}
public AbstractCommander(String name) {
super(name);
}
public AbstractCommander(String name, String shortName) {
super(name, shortName);
}
@Override
public int getDeckMinSize() {
return 98;

View file

@ -1,8 +1,6 @@
package mage.deck;
/**
*
* @author andreacosta
*/
public class CenturionCommander extends Commander {
@ -83,5 +81,4 @@ public class CenturionCommander extends Commander {
bannedPartner.add("Kraum, Ludevic's Opus");
bannedPartner.add("Thrasios, Triton Hero ");
}
}

View file

@ -12,12 +12,7 @@ import java.util.Map;
public class Commander extends AbstractCommander {
public Commander() {
super("Commander");
for (ExpansionSet set : Sets.getInstance().values()) {
if (set.getSetType().isEternalLegal()) {
setCodes.add(set.getCode());
}
}
this("Commander");
banned.add("Ancestral Recall");
banned.add("Balance");
banned.add("Biorhythm");
@ -69,12 +64,13 @@ public class Commander extends AbstractCommander {
banned.add("Yawgmoth's Bargain");
}
public Commander(String name) {
protected Commander(String name) {
super(name);
}
public Commander(String name, String shortName) {
super(name, shortName);
for (ExpansionSet set : Sets.getInstance().values()) {
if (set.getSetType().isEternalLegal()) {
setCodes.add(set.getCode());
}
}
}
@Override

View file

@ -10,11 +10,7 @@ import mage.cards.decks.DeckValidatorErrorType;
public class Freeform extends DeckValidator {
public Freeform() {
super("Constructed - Freeform");
}
public Freeform(String name) {
super(name);
this("Constructed - Freeform", null);
}
public Freeform(String name, String shortName) {

View file

@ -27,10 +27,6 @@ public class FreeformCommander extends AbstractCommander {
super(name);
}
public FreeformCommander(String name, String shortName) {
super(name, shortName);
}
@Override
protected boolean checkBanned(Map<String, Integer> counts) {
return true;

View file

@ -1,7 +1,6 @@
package mage.deck;
/**
*
* @author fireshoes
*/
public class MTGO1v1Commander extends Commander {
@ -9,7 +8,7 @@ public class MTGO1v1Commander extends Commander {
public MTGO1v1Commander() {
super("MTGO 1v1 Commander");
partnerAllowed = false;
banned.add("Ancestral Recall");
banned.add("Back to Basics");
banned.add("Balance");

View file

@ -21,8 +21,7 @@ public class Oathbreaker extends Vintage {
private static final Map<String, Integer> pdAllowed = new HashMap<>();
public Oathbreaker() {
super();
setName("Oathbreaker");
super("Oathbreaker");
// banned = vintage + oathbreaker's list: https://oathbreakermtg.org/banned-list/
banned.add("Ad Nauseam");

View file

@ -16,7 +16,7 @@ public class PennyDreadfulCommander extends AbstractCommander {
private static final Map<String, Integer> pdAllowed = new HashMap<>();
public PennyDreadfulCommander() {
super("Penny Dreadful Commander", "Penny");
super("Penny Dreadful Commander");
for (ExpansionSet set : Sets.getInstance().values()) {
if (set.getSetType().isEternalLegal()) {
setCodes.add(set.getCode());

View file

@ -10,7 +10,11 @@ import mage.cards.decks.Constructed;
public class Vintage extends Constructed {
public Vintage() {
super("Constructed - Vintage");
this("Constructed - Vintage");
}
protected Vintage(String name) {
super(name);
for (ExpansionSet set : Sets.getInstance().values()) {
if (set.getSetType().isEternalLegal()) {
setCodes.add(set.getCode());

View file

@ -13,7 +13,7 @@ import java.util.Map;
public class Limited extends DeckValidator {
public Limited() {
super("Limited");
super("Limited", null);
}
@Override

View file

@ -30,12 +30,8 @@ public class Constructed extends DeckValidator {
protected List<Rarity> rarities = new ArrayList<>();
protected Set<String> singleCards = new HashSet<>();
public Constructed() {
super("Constructed");
}
protected Constructed(String name) {
super(name);
this(name, null);
}
protected Constructed(String name, String shortName) {

View file

@ -15,10 +15,6 @@ public abstract class DeckValidator implements Serializable {
protected String shortName;
protected List<DeckValidatorError> errorsList = new ArrayList<>();
public DeckValidator(String name) {
setName(name);
}
public DeckValidator(String name, String shortName) {
setName(name, shortName);
}
@ -33,14 +29,13 @@ public abstract class DeckValidator implements Serializable {
return shortName;
}
protected void setName(String name) {
this.name = name;
this.shortName = name.contains("-") ? name.substring(name.indexOf("-") + 1).trim() : name;
}
protected void setName(String name, String shortName) {
this.name = name;
this.shortName = shortName;
if (shortName != null) {
this.shortName = shortName;
} else {
this.shortName = name.contains("-") ? name.substring(name.indexOf("-") + 1).trim() : name;
}
}
protected void setShortName(String shortName) {