mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
Added Frontier format (M15 forward). Added Kaladesh block constructed.
This commit is contained in:
parent
311f797565
commit
783a278fca
6 changed files with 117 additions and 5 deletions
|
@ -602,7 +602,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
||||||
formatFilterList.add(RowFilter.regexFilter("^Limited", TableTableModel.COLUMN_DECK_TYPE));
|
formatFilterList.add(RowFilter.regexFilter("^Limited", TableTableModel.COLUMN_DECK_TYPE));
|
||||||
}
|
}
|
||||||
if (btnFormatOther.isSelected()) {
|
if (btnFormatOther.isSelected()) {
|
||||||
formatFilterList.add(RowFilter.regexFilter("^Momir Basic|^Constructed - Pauper|^Constructed - Extended|^Constructed - Historical|^Constructed - Super|^Freeform", TableTableModel.COLUMN_DECK_TYPE));
|
formatFilterList.add(RowFilter.regexFilter("^Momir Basic|^Constructed - Pauper|^Constructed - Frontier|^Constructed - Extended|^Constructed - Historical|^Constructed - Super|^Freeform", TableTableModel.COLUMN_DECK_TYPE));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<RowFilter<Object, Object>> skillFilterList = new ArrayList<>();
|
List<RowFilter<Object, Object>> skillFilterList = new ArrayList<>();
|
||||||
|
@ -623,7 +623,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
||||||
if (btnUnrated.isSelected()){
|
if (btnUnrated.isSelected()){
|
||||||
ratingFilterList.add(RowFilter.regexFilter("^Unrated", TableTableModel.COLUMN_RATING));
|
ratingFilterList.add(RowFilter.regexFilter("^Unrated", TableTableModel.COLUMN_RATING));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Password
|
// Password
|
||||||
List<RowFilter<Object, Object>> passwordFilterList = new ArrayList<>();
|
List<RowFilter<Object, Object>> passwordFilterList = new ArrayList<>();
|
||||||
if (btnOpen.isSelected()) {
|
if (btnOpen.isSelected()) {
|
||||||
|
@ -669,7 +669,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
||||||
} else if (ratingFilterList.size() == 1) {
|
} else if (ratingFilterList.size() == 1) {
|
||||||
filterList.addAll(ratingFilterList);
|
filterList.addAll(ratingFilterList);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (passwordFilterList.size() > 1) {
|
if (passwordFilterList.size() > 1) {
|
||||||
filterList.add(RowFilter.orFilter(passwordFilterList));
|
filterList.add(RowFilter.orFilter(passwordFilterList));
|
||||||
} else if (passwordFilterList.size() == 1) {
|
} else if (passwordFilterList.size() == 1) {
|
||||||
|
|
|
@ -8,7 +8,6 @@ import java.util.GregorianCalendar;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import mage.cards.repository.ExpansionInfo;
|
import mage.cards.repository.ExpansionInfo;
|
||||||
import mage.cards.repository.ExpansionRepository;
|
import mage.cards.repository.ExpansionRepository;
|
||||||
import mage.constants.SetType;
|
import mage.constants.SetType;
|
||||||
|
@ -27,6 +26,7 @@ public class ConstructedFormats {
|
||||||
public static final String ALL = "- All Sets";
|
public static final String ALL = "- All Sets";
|
||||||
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 MODERN = "- Modern";
|
public static final String MODERN = "- Modern";
|
||||||
public static final Standard STANDARD_CARDS = new Standard();
|
public static final Standard STANDARD_CARDS = new Standard();
|
||||||
|
|
||||||
|
@ -77,6 +77,12 @@ public class ConstructedFormats {
|
||||||
}
|
}
|
||||||
underlyingSetCodesPerFormat.get(EXTENDED).add(set.getCode());
|
underlyingSetCodesPerFormat.get(EXTENDED).add(set.getCode());
|
||||||
}
|
}
|
||||||
|
if (set.getReleaseDate().after(frontierDate)) {
|
||||||
|
if(underlyingSetCodesPerFormat.get(FRONTIER) == null) {
|
||||||
|
underlyingSetCodesPerFormat.put(FRONTIER, new ArrayList<String>());
|
||||||
|
}
|
||||||
|
underlyingSetCodesPerFormat.get(FRONTIER).add(set.getCode());
|
||||||
|
}
|
||||||
if (set.getReleaseDate().after(modernDate)) {
|
if (set.getReleaseDate().after(modernDate)) {
|
||||||
if(underlyingSetCodesPerFormat.get(MODERN) == null) {
|
if(underlyingSetCodesPerFormat.get(MODERN) == null) {
|
||||||
underlyingSetCodesPerFormat.put(MODERN, new ArrayList<String>());
|
underlyingSetCodesPerFormat.put(MODERN, new ArrayList<String>());
|
||||||
|
@ -210,6 +216,7 @@ public class ConstructedFormats {
|
||||||
});
|
});
|
||||||
if (!formats.isEmpty()) {
|
if (!formats.isEmpty()) {
|
||||||
formats.add(0, MODERN);
|
formats.add(0, MODERN);
|
||||||
|
formats.add(0, FRONTIER);
|
||||||
formats.add(0, EXTENDED);
|
formats.add(0, EXTENDED);
|
||||||
formats.add(0, STANDARD);
|
formats.add(0, STANDARD);
|
||||||
}
|
}
|
||||||
|
@ -225,7 +232,7 @@ public class ConstructedFormats {
|
||||||
|
|
||||||
|
|
||||||
private static final Date extendedDate = new GregorianCalendar(2009, 8, 20).getTime();
|
private static final Date extendedDate = new GregorianCalendar(2009, 8, 20).getTime();
|
||||||
|
private static final Date frontierDate = new GregorianCalendar(2014, 7, 17).getTime();
|
||||||
private static final Date modernDate = new GregorianCalendar(2003, 7, 20).getTime();
|
private static final Date modernDate = new GregorianCalendar(2003, 7, 20).getTime();
|
||||||
|
|
||||||
// for all sets just return empty list
|
// for all sets just return empty list
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
package mage.deck;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.GregorianCalendar;
|
||||||
|
import mage.cards.ExpansionSet;
|
||||||
|
import mage.cards.Sets;
|
||||||
|
import mage.cards.decks.Constructed;
|
||||||
|
import mage.constants.SetType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author fireshoes
|
||||||
|
*/
|
||||||
|
public class Frontier extends Constructed {
|
||||||
|
|
||||||
|
public Frontier() {
|
||||||
|
super("Constructed - Frontier");
|
||||||
|
|
||||||
|
Date cutoff = new GregorianCalendar(2014, 7, 18).getTime(); // M15 release date
|
||||||
|
for (ExpansionSet set : Sets.getInstance().values()) {
|
||||||
|
if ((set.getReleaseDate().after(cutoff) || set.getReleaseDate().equals(cutoff))
|
||||||
|
&& (set.getSetType() == SetType.CORE || set.getSetType() == SetType.EXPANSION)) {
|
||||||
|
setCodes.add(set.getCode());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Future banlist
|
||||||
|
// banned.add("");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
* permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
* conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||||
|
* provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||||
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* The views and conclusions contained in the software and documentation are those of the
|
||||||
|
* authors and should not be interpreted as representing official policies, either expressed
|
||||||
|
* or implied, of BetaSteward_at_googlemail.com.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package mage.deck;
|
||||||
|
|
||||||
|
import mage.cards.decks.Constructed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author fireshoes
|
||||||
|
*/
|
||||||
|
public class KaladeshBlock extends Constructed {
|
||||||
|
|
||||||
|
public KaladeshBlock() {
|
||||||
|
super("Constructed - Kaladesh Block");
|
||||||
|
setCodes.add("KLD");
|
||||||
|
setCodes.add("AER");
|
||||||
|
}
|
||||||
|
}
|
|
@ -117,6 +117,7 @@
|
||||||
<deckTypes>
|
<deckTypes>
|
||||||
<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 - 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 - Eternal" jar="mage-deck-constructed.jar" className="mage.deck.Eternal"/>
|
<deckType name="Constructed - Eternal" jar="mage-deck-constructed.jar" className="mage.deck.Eternal"/>
|
||||||
<deckType name="Constructed - Legacy" jar="mage-deck-constructed.jar" className="mage.deck.Legacy"/>
|
<deckType name="Constructed - Legacy" jar="mage-deck-constructed.jar" className="mage.deck.Legacy"/>
|
||||||
|
@ -131,6 +132,7 @@
|
||||||
<deckType name="Variant Magic - Momir Basic" jar="mage-deck-constructed.jar" className="mage.deck.Momir"/>
|
<deckType name="Variant Magic - Momir Basic" jar="mage-deck-constructed.jar" className="mage.deck.Momir"/>
|
||||||
<deckType name="Block Constructed - Battle for Zendikar" jar="mage-deck-constructed.jar" className="mage.deck.BattleForZendikarBlock"/>
|
<deckType name="Block Constructed - Battle for Zendikar" jar="mage-deck-constructed.jar" className="mage.deck.BattleForZendikarBlock"/>
|
||||||
<deckType name="Block Constructed - Innistrad" jar="mage-deck-constructed.jar" className="mage.deck.InnistradBlock"/>
|
<deckType name="Block Constructed - Innistrad" jar="mage-deck-constructed.jar" className="mage.deck.InnistradBlock"/>
|
||||||
|
<deckType name="Block Constructed - Kaladesh" jar="mage-deck-constructed.jar" className="mage.deck.KaladeshBlock"/>
|
||||||
<deckType name="Block Constructed - Kamigawa" jar="mage-deck-constructed.jar" className="mage.deck.KamigawaBlock"/>
|
<deckType name="Block Constructed - Kamigawa" jar="mage-deck-constructed.jar" className="mage.deck.KamigawaBlock"/>
|
||||||
<deckType name="Block Constructed - Khans of Tarkir" jar="mage-deck-constructed.jar" className="mage.deck.KhansOfTarkirBlock"/>
|
<deckType name="Block Constructed - Khans of Tarkir" jar="mage-deck-constructed.jar" className="mage.deck.KhansOfTarkirBlock"/>
|
||||||
<deckType name="Block Constructed - Return to Ravnica" jar="mage-deck-constructed.jar" className="mage.deck.ReturnToRavnicaBlock"/>
|
<deckType name="Block Constructed - Return to Ravnica" jar="mage-deck-constructed.jar" className="mage.deck.ReturnToRavnicaBlock"/>
|
||||||
|
|
|
@ -114,6 +114,7 @@
|
||||||
<deckTypes>
|
<deckTypes>
|
||||||
<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 - 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 - 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"/>
|
||||||
<deckType name="Constructed - Legacy" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Legacy"/>
|
<deckType name="Constructed - Legacy" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Legacy"/>
|
||||||
|
@ -128,6 +129,7 @@
|
||||||
<deckType name="Variant Magic - Momir Basic" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Momir"/>
|
<deckType name="Variant Magic - Momir Basic" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.Momir"/>
|
||||||
<deckType name="Block Constructed - Battle for Zendikar" jar="mage-deck-constructed.jar" className="mage.deck.BattleForZendikarBlock"/>
|
<deckType name="Block Constructed - Battle for Zendikar" jar="mage-deck-constructed.jar" className="mage.deck.BattleForZendikarBlock"/>
|
||||||
<deckType name="Block Constructed - Innistrad" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.InnistradBlock"/>
|
<deckType name="Block Constructed - Innistrad" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.InnistradBlock"/>
|
||||||
|
<deckType name="Block Constructed - Kaladesh" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.KaladeshBlock"/>
|
||||||
<deckType name="Block Constructed - Kamigawa" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.KamigawaBlock"/>
|
<deckType name="Block Constructed - Kamigawa" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.KamigawaBlock"/>
|
||||||
<deckType name="Block Constructed - Khans of Tarkir" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.KhansOfTarkirBlock"/>
|
<deckType name="Block Constructed - Khans of Tarkir" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.KhansOfTarkirBlock"/>
|
||||||
<deckType name="Block Constructed - Return to Ravnica" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.ReturnToRavnicaBlock"/>
|
<deckType name="Block Constructed - Return to Ravnica" jar="mage-deck-constructed-${project.version}.jar" className="mage.deck.ReturnToRavnicaBlock"/>
|
||||||
|
|
Loading…
Reference in a new issue