mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
added Pioneer format
This commit is contained in:
parent
e0eb61053e
commit
b49bf569ce
5 changed files with 46 additions and 0 deletions
|
@ -802,6 +802,9 @@ public class TablesPanel extends javax.swing.JPanel {
|
||||||
if (btnFormatModern.isSelected()) {
|
if (btnFormatModern.isSelected()) {
|
||||||
formatFilterList.add(RowFilter.regexFilter("^Constructed - Modern", TablesTableModel.COLUMN_DECK_TYPE));
|
formatFilterList.add(RowFilter.regexFilter("^Constructed - Modern", TablesTableModel.COLUMN_DECK_TYPE));
|
||||||
}
|
}
|
||||||
|
if (btnFormatPioneer.isSelected()) {
|
||||||
|
formatFilterList.add(RowFilter.regexFilter("^Constructed - Pioneer", TablesTableModel.COLUMN_DECK_TYPE));
|
||||||
|
}
|
||||||
if (btnFormatLegacy.isSelected()) {
|
if (btnFormatLegacy.isSelected()) {
|
||||||
formatFilterList.add(RowFilter.regexFilter("^Constructed - Legacy", TablesTableModel.COLUMN_DECK_TYPE));
|
formatFilterList.add(RowFilter.regexFilter("^Constructed - Legacy", TablesTableModel.COLUMN_DECK_TYPE));
|
||||||
}
|
}
|
||||||
|
@ -1670,6 +1673,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
||||||
private javax.swing.JToggleButton btnFormatLegacy;
|
private javax.swing.JToggleButton btnFormatLegacy;
|
||||||
private javax.swing.JToggleButton btnFormatLimited;
|
private javax.swing.JToggleButton btnFormatLimited;
|
||||||
private javax.swing.JToggleButton btnFormatModern;
|
private javax.swing.JToggleButton btnFormatModern;
|
||||||
|
private javax.swing.JToggleButton btnFormatPioneer;
|
||||||
private javax.swing.JToggleButton btnFormatOathbreaker;
|
private javax.swing.JToggleButton btnFormatOathbreaker;
|
||||||
private javax.swing.JToggleButton btnFormatOther;
|
private javax.swing.JToggleButton btnFormatOther;
|
||||||
private javax.swing.JToggleButton btnFormatPremodern;
|
private javax.swing.JToggleButton btnFormatPremodern;
|
||||||
|
|
|
@ -20,6 +20,7 @@ public final class ConstructedFormats {
|
||||||
public static final String STANDARD = "- Standard";
|
public static final String STANDARD = "- Standard";
|
||||||
public static final String EXTENDED = "- Extended";
|
public static final String EXTENDED = "- Extended";
|
||||||
public static final String FRONTIER = "- Frontier";
|
public static final String FRONTIER = "- Frontier";
|
||||||
|
public static final String PIONEER = "- Pioneer";
|
||||||
public static final String MODERN = "- Modern";
|
public static final String MODERN = "- Modern";
|
||||||
public static final String VINTAGE_LEGACY = "- Vintage / Legacy";
|
public static final String VINTAGE_LEGACY = "- Vintage / Legacy";
|
||||||
public static final String JOKE = "- Joke Sets";
|
public static final String JOKE = "- Joke Sets";
|
||||||
|
@ -29,6 +30,7 @@ public final class ConstructedFormats {
|
||||||
// Attention -Month is 0 Based so Feb = 1 for example. //
|
// Attention -Month is 0 Based so Feb = 1 for example. //
|
||||||
private static final Date extendedDate = new GregorianCalendar(2009, 7, 20).getTime();
|
private static final Date extendedDate = new GregorianCalendar(2009, 7, 20).getTime();
|
||||||
private static final Date frontierDate = new GregorianCalendar(2014, 6, 17).getTime();
|
private static final Date frontierDate = new GregorianCalendar(2014, 6, 17).getTime();
|
||||||
|
private static final Date pioneerDate = new GregorianCalendar(2012, 10, 5).getTime();
|
||||||
private static final Date modernDate = new GregorianCalendar(2003, 6, 20).getTime();
|
private static final Date modernDate = new GregorianCalendar(2003, 6, 20).getTime();
|
||||||
|
|
||||||
// for all sets just return empty list
|
// for all sets just return empty list
|
||||||
|
@ -82,6 +84,7 @@ public final class ConstructedFormats {
|
||||||
underlyingSetCodesPerFormat.put(STANDARD, new ArrayList<>());
|
underlyingSetCodesPerFormat.put(STANDARD, new ArrayList<>());
|
||||||
underlyingSetCodesPerFormat.put(EXTENDED, new ArrayList<>());
|
underlyingSetCodesPerFormat.put(EXTENDED, new ArrayList<>());
|
||||||
underlyingSetCodesPerFormat.put(FRONTIER, new ArrayList<>());
|
underlyingSetCodesPerFormat.put(FRONTIER, new ArrayList<>());
|
||||||
|
underlyingSetCodesPerFormat.put(PIONEER, new ArrayList<>());
|
||||||
underlyingSetCodesPerFormat.put(MODERN, new ArrayList<>());
|
underlyingSetCodesPerFormat.put(MODERN, new ArrayList<>());
|
||||||
underlyingSetCodesPerFormat.put(VINTAGE_LEGACY, new ArrayList<>());
|
underlyingSetCodesPerFormat.put(VINTAGE_LEGACY, new ArrayList<>());
|
||||||
underlyingSetCodesPerFormat.put(JOKE, new ArrayList<>());
|
underlyingSetCodesPerFormat.put(JOKE, new ArrayList<>());
|
||||||
|
@ -134,6 +137,11 @@ public final class ConstructedFormats {
|
||||||
underlyingSetCodesPerFormat.get(FRONTIER).add(set.getCode());
|
underlyingSetCodesPerFormat.get(FRONTIER).add(set.getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// frontier
|
||||||
|
if (set.getType().isStandardLegal() && set.getReleaseDate().after(pioneerDate)) {
|
||||||
|
underlyingSetCodesPerFormat.get(PIONEER).add(set.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
// modern
|
// modern
|
||||||
if (set.getType().isModernLegal() && set.getReleaseDate().after(modernDate)) {
|
if (set.getType().isModernLegal() && set.getReleaseDate().after(modernDate)) {
|
||||||
underlyingSetCodesPerFormat.get(MODERN).add(set.getCode());
|
underlyingSetCodesPerFormat.get(MODERN).add(set.getCode());
|
||||||
|
@ -251,6 +259,7 @@ public final class ConstructedFormats {
|
||||||
formats.add(0, JOKE);
|
formats.add(0, JOKE);
|
||||||
formats.add(0, VINTAGE_LEGACY);
|
formats.add(0, VINTAGE_LEGACY);
|
||||||
formats.add(0, MODERN);
|
formats.add(0, MODERN);
|
||||||
|
formats.add(0, PIONEER);
|
||||||
formats.add(0, FRONTIER);
|
formats.add(0, FRONTIER);
|
||||||
formats.add(0, EXTENDED);
|
formats.add(0, EXTENDED);
|
||||||
formats.add(0, STANDARD);
|
formats.add(0, STANDARD);
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
package mage.deck;
|
||||||
|
|
||||||
|
import mage.cards.ExpansionSet;
|
||||||
|
import mage.cards.Sets;
|
||||||
|
import mage.cards.decks.Constructed;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.GregorianCalendar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class Pioneer extends Constructed {
|
||||||
|
|
||||||
|
public Pioneer() {
|
||||||
|
super("Constructed - Pioneer");
|
||||||
|
|
||||||
|
Date cutoff = new GregorianCalendar(2012, 10, 5).getTime(); // M15 release date
|
||||||
|
for (ExpansionSet set : Sets.getInstance().values()) {
|
||||||
|
if (set.getSetType().isStandardLegal() && (set.getReleaseDate().after(cutoff) || set.getReleaseDate().equals(cutoff))) {
|
||||||
|
setCodes.add(set.getCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
banned.add("Bloodstained Mire");
|
||||||
|
banned.add("Flooded Strand");
|
||||||
|
banned.add("Polluted Delta");
|
||||||
|
banned.add("Windswept Heath");
|
||||||
|
banned.add("Wooded Foothills");
|
||||||
|
}
|
||||||
|
}
|
|
@ -149,6 +149,7 @@
|
||||||
<deckType name="Constructed - Standard" jar="mage-deck-constructed.jar" className="mage.deck.Standard"/>
|
<deckType name="Constructed - Standard" jar="mage-deck-constructed.jar" className="mage.deck.Standard"/>
|
||||||
<deckType name="Constructed - Extended" jar="mage-deck-constructed.jar" className="mage.deck.Extended"/>
|
<deckType name="Constructed - Extended" jar="mage-deck-constructed.jar" className="mage.deck.Extended"/>
|
||||||
<deckType name="Constructed - Frontier" jar="mage-deck-constructed.jar" className="mage.deck.Frontier"/>
|
<deckType name="Constructed - Frontier" jar="mage-deck-constructed.jar" className="mage.deck.Frontier"/>
|
||||||
|
<deckType name="Constructed - Pioneer" jar="mage-deck-constructed.jar" className="mage.deck.Pioneer"/>
|
||||||
<deckType name="Constructed - Modern" jar="mage-deck-constructed.jar" className="mage.deck.Modern"/>
|
<deckType name="Constructed - Modern" jar="mage-deck-constructed.jar" className="mage.deck.Modern"/>
|
||||||
<deckType name="Constructed - Modern - No Banned List" jar="mage-deck-constructed.jar" className="mage.deck.ModernNoBannedList"/>
|
<deckType name="Constructed - Modern - No Banned List" jar="mage-deck-constructed.jar" className="mage.deck.ModernNoBannedList"/>
|
||||||
<deckType name="Constructed - Eternal" jar="mage-deck-constructed.jar" className="mage.deck.Eternal"/>
|
<deckType name="Constructed - Eternal" jar="mage-deck-constructed.jar" className="mage.deck.Eternal"/>
|
||||||
|
|
|
@ -143,6 +143,7 @@
|
||||||
<deckType name="Constructed - Standard" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Standard"/>
|
<deckType name="Constructed - Standard" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Standard"/>
|
||||||
<deckType name="Constructed - Extended" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Extended"/>
|
<deckType name="Constructed - Extended" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Extended"/>
|
||||||
<deckType name="Constructed - Frontier" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Frontier"/>
|
<deckType name="Constructed - Frontier" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Frontier"/>
|
||||||
|
<deckType name="Constructed - Pioneer" jar="mage-deck-constructed.jar" className="mage.deck.Pioneer"/>
|
||||||
<deckType name="Constructed - Modern" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Modern"/>
|
<deckType name="Constructed - Modern" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Modern"/>
|
||||||
<deckType name="Constructed - Modern - No Banned List" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.ModernNoBannedList"/>
|
<deckType name="Constructed - Modern - No Banned List" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.ModernNoBannedList"/>
|
||||||
<deckType name="Constructed - Eternal" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Eternal"/>
|
<deckType name="Constructed - Eternal" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Eternal"/>
|
||||||
|
|
Loading…
Reference in a new issue