mirror of
https://github.com/correl/mage.git
synced 2025-04-10 09:11:04 -09:00
Updated selected sets for "Standard" and "Selected". Added blocks to selectable Formats. Made all formats selectable in card selector, mage book and automated deck generation.
This commit is contained in:
parent
6619c21d6b
commit
cf88bb5ac3
5 changed files with 380 additions and 88 deletions
Mage.Client/src/main/java/mage/client
deck/generator
deckeditor
util/sets
|
@ -75,8 +75,8 @@ public class DeckGenerator {
|
|||
JLabel text3 = new JLabel("Choose format:");
|
||||
formats = new JComboBox(ConstructedFormats.getTypes());
|
||||
formats.setSelectedIndex(0);
|
||||
formats.setPreferredSize(new Dimension(100, 25));
|
||||
formats.setMaximumSize(new Dimension(100, 25));
|
||||
formats.setPreferredSize(new Dimension(300, 25));
|
||||
formats.setMaximumSize(new Dimension(300, 25));
|
||||
formats.setAlignmentX(Component.LEFT_ALIGNMENT);
|
||||
jPanel.add(text3);
|
||||
jPanel.add(formats);
|
||||
|
|
|
@ -157,9 +157,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
this.btnBooster.setVisible(true);
|
||||
this.btnClear.setVisible(true);
|
||||
this.cbExpansionSet.setVisible(true);
|
||||
cbExpansionSet.setModel(new DefaultComboBoxModel(Sets.getInstance().getSortedByReleaseDate()));
|
||||
cbExpansionSet.insertItemAt("-- All sets", 0);
|
||||
cbExpansionSet.insertItemAt("-- Standard", 1);
|
||||
cbExpansionSet.setModel(new DefaultComboBoxModel(ConstructedFormats.getTypes()));
|
||||
cbExpansionSet.setSelectedIndex(0);
|
||||
|
||||
filterCards();
|
||||
|
@ -216,16 +214,17 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
String name = jTextFieldSearch.getText().trim();
|
||||
filter.add(new CardTextPredicate(name));
|
||||
|
||||
if (this.cbExpansionSet.getSelectedItem() instanceof ExpansionSet) {
|
||||
filter.add(new ExpansionSetPredicate(((ExpansionSet) this.cbExpansionSet.getSelectedItem()).getCode()));
|
||||
} else if (this.cbExpansionSet.getSelectedItem().equals("-- Standard")) {
|
||||
if (this.cbExpansionSet.isVisible()) {
|
||||
String expansionSelection = this.cbExpansionSet.getSelectedItem().toString();
|
||||
if (!expansionSelection.equals("- All Sets")) {
|
||||
ArrayList<Predicate<Card>> expansionPredicates = new ArrayList<Predicate<Card>>();
|
||||
for (String setCode : ConstructedFormats.getSetsByFormat("Standard")) {
|
||||
for (String setCode : ConstructedFormats.getSetsByFormat(expansionSelection)) {
|
||||
expansionPredicates.add(new ExpansionSetPredicate(setCode));
|
||||
}
|
||||
filter.add(Predicates.or(expansionPredicates));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void filterCards() {
|
||||
buildFilter();
|
||||
|
@ -411,7 +410,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
});
|
||||
tbColor.add(rdoColorless);
|
||||
|
||||
cbExpansionSet.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"Item 1", "Item 2", "Item 3", "Item 4"}));
|
||||
cbExpansionSet.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
||||
cbExpansionSet.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cbExpansionSetActionPerformed(evt);
|
||||
|
@ -539,7 +538,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
});
|
||||
tbTypes.add(chkPiles);
|
||||
|
||||
cbSortBy.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"Item 1", "Item 2", "Item 3", "Item 4"}));
|
||||
cbSortBy.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
|
||||
cbSortBy.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cbSortByActionPerformed(evt);
|
||||
|
@ -605,8 +604,10 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
}
|
||||
});
|
||||
|
||||
cardCountLabel.setForeground(java.awt.SystemColor.textHighlightText);
|
||||
cardCountLabel.setText("Card count:");
|
||||
|
||||
cardCount.setForeground(java.awt.SystemColor.text);
|
||||
cardCount.setText("0");
|
||||
|
||||
jButtonRemoveFromMain.setText("-");
|
||||
|
@ -649,7 +650,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
.addComponent(cardCountLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cardCount, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(186, Short.MAX_VALUE))
|
||||
.addContainerGap(121, Short.MAX_VALUE))
|
||||
);
|
||||
jPanel1Layout.setVerticalGroup(
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
|
@ -690,7 +691,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 273, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
|
|
@ -69,20 +69,23 @@ public final class CollectionViewerPanel extends JPanel {
|
|||
|
||||
JLabel label1 = new JLabel("Choose format:");
|
||||
label1.setAlignmentX(Component.LEFT_ALIGNMENT);
|
||||
label1.setForeground(Color.white);
|
||||
jPanel1.add(label1);
|
||||
|
||||
formats = new JComboBox(ConstructedFormats.getTypes());
|
||||
formats.setSelectedItem(ConstructedFormats.getDefault());
|
||||
formats.setPreferredSize(new Dimension(100, 25));
|
||||
formats.setMaximumSize(new Dimension(100, 25));
|
||||
formats.setPreferredSize(new Dimension(250, 25));
|
||||
formats.setMaximumSize(new Dimension(250, 25));
|
||||
formats.setAlignmentX(Component.LEFT_ALIGNMENT);
|
||||
jPanel1.add(formats);
|
||||
|
||||
JLabel label2 = new JLabel("Choose size:");
|
||||
label2.setAlignmentX(Component.LEFT_ALIGNMENT);
|
||||
label2.setForeground(Color.white);
|
||||
jPanel1.add(label2);
|
||||
|
||||
small3x3 = new JRadioButton("3x3");
|
||||
small3x3.setForeground(Color.white);
|
||||
boolean selected3x3 = MageFrame.getPreferences().get(LAYOYT_CONFIG_KEY, MageBook.LAYOUT_3x3).equals(MageBook.LAYOUT_3x3);
|
||||
small3x3.setSelected(selected3x3);
|
||||
small3x3.addActionListener(new ActionListener() {
|
||||
|
@ -96,6 +99,7 @@ public final class CollectionViewerPanel extends JPanel {
|
|||
jPanel1.add(small3x3);
|
||||
|
||||
big4x4 = new JRadioButton("4x4");
|
||||
big4x4.setForeground(Color.white);
|
||||
big4x4.setSelected(!selected3x3);
|
||||
big4x4.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
|
@ -109,6 +113,7 @@ public final class CollectionViewerPanel extends JPanel {
|
|||
|
||||
JLabel label3 = new JLabel("Switch tabs:");
|
||||
label3.setAlignmentX(Component.LEFT_ALIGNMENT);
|
||||
label3.setForeground(Color.white);
|
||||
jPanel1.add(label3);
|
||||
|
||||
JPanel buttonPanel = new JPanel();
|
||||
|
|
|
@ -291,6 +291,7 @@ public class MageBook extends JComponent {
|
|||
this.setsToDisplay = CardsStorage.getSetCodes();
|
||||
}
|
||||
addSetTabs();
|
||||
tabs.get(0).execute();
|
||||
}
|
||||
|
||||
public void next() {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package mage.client.util.sets;
|
||||
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.client.cards.CardsStorage;
|
||||
import mage.sets.Sets;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.List;
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.client.cards.CardsStorage;
|
||||
import mage.sets.Sets;
|
||||
|
||||
/**
|
||||
* Utility class for constructed formats.
|
||||
|
@ -16,7 +16,30 @@ import java.util.List;
|
|||
*/
|
||||
public class ConstructedFormats {
|
||||
|
||||
private static final String[] constructedFormats = {"M13", "ISD\\DKA\\AVR", "Standard", "Extended", "Modern", "All"};
|
||||
private static final String[] constructedFormats = {"- All Sets", "- Standard", "- Extended", "- Modern",
|
||||
"* Return to Ravnica Block", "Return to Ravnica", "Magic 2013",
|
||||
"* Innistrad Block", "Avacyn Restored", "Dark Ascension", "Innistrad", "Magic 2012",
|
||||
"* Scars of Mirrodin Block", "New Phyrexia", "Mirrodin Besieged", "Scars of Mirrodin", "Magic 2011",
|
||||
"* Zendikar Block", "Rise of the Eldrazi", "Worldwake", "Zendikar", "Magic 2010",
|
||||
"* Shards of Alara Block", "Alara Reborn", "Conflux", "Shards of Alara",
|
||||
"* Shadowmoor Block", "Shadowmoor", "Eventide",
|
||||
"* Lorwyn Block", "Lorwyn", "Morningtide",
|
||||
"* Time Spiral Block", "Future Sight", "Planar Chaos", "Time Spiral", "Tenth Edition",
|
||||
"* Ravnica Block", "Dissension", "Guildpact", "Ravnica: City of Guilds",
|
||||
"* Kamigawa Block", "Saviors of Kamigawa", "Betrayers of Kamigawa", "Champions of Kamigawa","Ninth Edition",
|
||||
"* Mirrodin Block", "Fifth Dawn", "Darksteel", "Mirrodin",
|
||||
"* Onslaught Block", "Scourge", "Legions", "Onslaught","Eighth Edition",
|
||||
"* Odyssey Block", "Judgment", "Torment", "Odyssey",
|
||||
"* Invasion Block", "Apocalypse", "Planeshift", "Invasion","Seventh Edition",
|
||||
"* Masquerade Block", "Prophecy", "Nemesis", "Mercadian Masques",
|
||||
"* Urza Block", "Urza's Destiny", "Urza's Legacy", "Urza's Saga", "Sixth Edition",
|
||||
"* Tempest Block", "Exodus", "Stronghold", "Tempest",
|
||||
"* Mirage Block", "Weatherlight", "Visions", "Mirage", "Fifth Edition",
|
||||
"* Ice Age Block", "Coldsnap", "Alliances", "Ice Age", "Fourth Edition",
|
||||
"Homelands","Fallen Empires","The Dark","Legends","Antiquities", "Arabian Nights",
|
||||
"Guru",
|
||||
"Duel Decks: Elspeth vs. Tezzeret"
|
||||
};
|
||||
|
||||
private ConstructedFormats() {
|
||||
}
|
||||
|
@ -30,33 +53,301 @@ public class ConstructedFormats {
|
|||
}
|
||||
|
||||
public static List<String> getSetsByFormat(String format) {
|
||||
if (format.equals("M13")) {
|
||||
return m13;
|
||||
|
||||
if (format.equals("Arabian Nights")) {
|
||||
return Arrays.asList("ARN");
|
||||
}
|
||||
if (format.equals("ISD\\DKA\\AVR")) {
|
||||
return innistradBlock;
|
||||
if (format.equals("Antiquities")) {
|
||||
return Arrays.asList("ATQ");
|
||||
}
|
||||
if (format.equals("Standard")) {
|
||||
if (format.equals("Legends")) {
|
||||
return Arrays.asList("LEG");
|
||||
}
|
||||
if (format.equals("The Dark")) {
|
||||
return Arrays.asList("DRK");
|
||||
}
|
||||
if (format.equals("Fallen Empires")) {
|
||||
return Arrays.asList("FEM");
|
||||
}
|
||||
if (format.equals("Homelands")) {
|
||||
return Arrays.asList("HML");
|
||||
}
|
||||
if (format.equals("* Ice Age Block")) {
|
||||
return Arrays.asList("ICE", "ALL", "CSP");
|
||||
}
|
||||
if (format.equals("Ice Age")) {
|
||||
return Arrays.asList("ICE");
|
||||
}
|
||||
if (format.equals("Alliances")) {
|
||||
return Arrays.asList("ALL");
|
||||
}
|
||||
if (format.equals("Coldsnap")) {
|
||||
return Arrays.asList("CSP");
|
||||
}
|
||||
if (format.equals("* Mirage Block")) {
|
||||
return Arrays.asList("MIR", "VIS", "WTH");
|
||||
}
|
||||
if (format.equals("Mirage")) {
|
||||
return Arrays.asList("MIR");
|
||||
}
|
||||
if (format.equals("Visions")) {
|
||||
return Arrays.asList("VIS");
|
||||
}
|
||||
if (format.equals("Weatherlight")) {
|
||||
return Arrays.asList("WTH");
|
||||
}
|
||||
if (format.equals("* Tempest Block")) {
|
||||
return Arrays.asList("TMP", "STH", "EXO");
|
||||
}
|
||||
if (format.equals("Tempest")) {
|
||||
return Arrays.asList("TMP");
|
||||
}
|
||||
if (format.equals("Stronghold")) {
|
||||
return Arrays.asList("STH");
|
||||
}
|
||||
if (format.equals("Exodus")) {
|
||||
return Arrays.asList("EXO");
|
||||
}
|
||||
if (format.equals("* Urza Block")) {
|
||||
return Arrays.asList("USG", "ULG", "UDS");
|
||||
}
|
||||
if (format.equals("Urza's Saga")) {
|
||||
return Arrays.asList("USG");
|
||||
}
|
||||
if (format.equals("Urza's Legacy")) {
|
||||
return Arrays.asList("ULG");
|
||||
}
|
||||
if (format.equals("Urza's Destiny")) {
|
||||
return Arrays.asList("UDS");
|
||||
}
|
||||
if (format.equals("* Masquerade Block")) {
|
||||
return Arrays.asList("MMQ", "NMS", "PCY");
|
||||
}
|
||||
if (format.equals("Mercadian Masques")) {
|
||||
return Arrays.asList("MMQ");
|
||||
}
|
||||
if (format.equals("Nemesis")) {
|
||||
return Arrays.asList("NMS");
|
||||
}
|
||||
if (format.equals("Prophecy")) {
|
||||
return Arrays.asList("PCY");
|
||||
}
|
||||
if (format.equals("* Invasion Block")) {
|
||||
return Arrays.asList("INV", "PLS", "APC");
|
||||
}
|
||||
if (format.equals("Invasion")) {
|
||||
return Arrays.asList("INV");
|
||||
}
|
||||
if (format.equals("Planeshift")) {
|
||||
return Arrays.asList("PLS");
|
||||
}
|
||||
if (format.equals("Apocalypse")) {
|
||||
return Arrays.asList("APC");
|
||||
}
|
||||
if (format.equals("* Odyssey Block")) {
|
||||
return Arrays.asList("ODY", "TOR", "JUD");
|
||||
}
|
||||
if (format.equals("Odyssey")) {
|
||||
return Arrays.asList("ODY");
|
||||
}
|
||||
if (format.equals("Torment")) {
|
||||
return Arrays.asList("TOR");
|
||||
}
|
||||
if (format.equals("Judgment")) {
|
||||
return Arrays.asList("JUD");
|
||||
}
|
||||
if (format.equals("* Onslaught Block")) {
|
||||
return Arrays.asList("ONS", "LGN", "SCG");
|
||||
}
|
||||
if (format.equals("Onslaught")) {
|
||||
return Arrays.asList("ONS");
|
||||
}
|
||||
if (format.equals("Legions")) {
|
||||
return Arrays.asList("LGN");
|
||||
}
|
||||
if (format.equals("Scourge")) {
|
||||
return Arrays.asList("SCG");
|
||||
}
|
||||
if (format.equals("* Mirrodin Block")) {
|
||||
return Arrays.asList("MRD", "DST", "5DN");
|
||||
}
|
||||
if (format.equals("Mirrodin")) {
|
||||
return Arrays.asList("MRD");
|
||||
}
|
||||
if (format.equals("Darksteel")) {
|
||||
return Arrays.asList("DST");
|
||||
}
|
||||
if (format.equals("Fifth Dawn")) {
|
||||
return Arrays.asList("5DN");
|
||||
}
|
||||
if (format.equals("* Kamigawa Block")) {
|
||||
return Arrays.asList("CHK", "BOK", "SOK");
|
||||
}
|
||||
if (format.equals("Champions of Kamigawa")) {
|
||||
return Arrays.asList("CHK");
|
||||
}
|
||||
if (format.equals("Betrayers of Kamigawa")) {
|
||||
return Arrays.asList("BOK");
|
||||
}
|
||||
if (format.equals("Saviors of Kamigawa")) {
|
||||
return Arrays.asList("SOK");
|
||||
}
|
||||
if (format.equals("* Ravnica Block")) {
|
||||
return Arrays.asList("RAV", "GPT", "DIS");
|
||||
}
|
||||
if (format.equals("Ravnica: City of Guilds")) {
|
||||
return Arrays.asList("RAV");
|
||||
}
|
||||
if (format.equals("Guildpact")) {
|
||||
return Arrays.asList("GPT");
|
||||
}
|
||||
if (format.equals("Dissension")) {
|
||||
return Arrays.asList("DIS");
|
||||
}
|
||||
if (format.equals("* Time Spiral Block")) {
|
||||
return Arrays.asList("TSP", "TSB", "PLC", "FUT");
|
||||
}
|
||||
if (format.equals("Time Spiral")) {
|
||||
return Arrays.asList("TSP", "TSB");
|
||||
}
|
||||
if (format.equals("Planar Chaos")) {
|
||||
return Arrays.asList("PLC");
|
||||
}
|
||||
if (format.equals("Future Sight")) {
|
||||
return Arrays.asList("FUT");
|
||||
}
|
||||
if (format.equals("* Lorwyn Block")) {
|
||||
return Arrays.asList("LRW", "MOR");
|
||||
}
|
||||
if (format.equals("Lorwyn")) {
|
||||
return Arrays.asList("LRW");
|
||||
}
|
||||
if (format.equals("Morningtide")) {
|
||||
return Arrays.asList("MOR");
|
||||
}
|
||||
if (format.equals("* Shadowmoor Block")) {
|
||||
return Arrays.asList("SHM", "EVE");
|
||||
}
|
||||
if (format.equals("Shadowmoor")) {
|
||||
return Arrays.asList("SHM");
|
||||
}
|
||||
if (format.equals("Eventide")) {
|
||||
return Arrays.asList("EVE");
|
||||
}
|
||||
if (format.equals("* Shards of Alara Block")) {
|
||||
return Arrays.asList("ALA", "CON", "ARB");
|
||||
}
|
||||
if (format.equals("Alara Reborn")) {
|
||||
return Arrays.asList("ALA");
|
||||
}
|
||||
if (format.equals("Conflux")) {
|
||||
return Arrays.asList("CON");
|
||||
}
|
||||
if (format.equals("Shards of Alara")) {
|
||||
return Arrays.asList("ARB");
|
||||
}
|
||||
if (format.equals("* Zendikar Block")) {
|
||||
return Arrays.asList("ZEN", "WWK", "ROE");
|
||||
}
|
||||
if (format.equals("Zendikar")) {
|
||||
return Arrays.asList("ZEN");
|
||||
}
|
||||
if (format.equals("Worldwake")) {
|
||||
return Arrays.asList("WWK");
|
||||
}
|
||||
if (format.equals("Rise of the Eldrazi")) {
|
||||
return Arrays.asList("ROE");
|
||||
}
|
||||
if (format.equals("* Scars of Mirrodin Block")) {
|
||||
return Arrays.asList("SOM", "MBS", "NPH");
|
||||
}
|
||||
if (format.equals("Scars of Mirrodin")) {
|
||||
return Arrays.asList("SOM");
|
||||
}
|
||||
if (format.equals("Mirrodin Besieged")) {
|
||||
return Arrays.asList("MBS");
|
||||
}
|
||||
if (format.equals("New Phyrexia")) {
|
||||
return Arrays.asList("NPH");
|
||||
}
|
||||
if (format.equals("* Innistrad Block")) {
|
||||
return Arrays.asList("ISD", "DKA", "AVR");
|
||||
}
|
||||
if (format.equals("Innistrad")) {
|
||||
return Arrays.asList("ISD");
|
||||
}
|
||||
if (format.equals("Dark Ascension")) {
|
||||
return Arrays.asList("DKA");
|
||||
}
|
||||
if (format.equals("Avacyn Restored")) {
|
||||
return Arrays.asList("AVR");
|
||||
}
|
||||
if (format.equals("* Return to Ravnica Block")) {
|
||||
return Arrays.asList("RTR");
|
||||
}
|
||||
if (format.equals("Return to Ravnica")) {
|
||||
return Arrays.asList("RTR");
|
||||
}
|
||||
|
||||
if (format.equals("Fourth Edition")) {
|
||||
return Arrays.asList("4ED");
|
||||
}
|
||||
if (format.equals("Fifth Edition")) {
|
||||
return Arrays.asList("5ED");
|
||||
}
|
||||
if (format.equals("Sixth Edition")) {
|
||||
return Arrays.asList("6ED");
|
||||
}
|
||||
if (format.equals("Seventh Edition")) {
|
||||
return Arrays.asList("7ED");
|
||||
}
|
||||
if (format.equals("Eighth Edition")) {
|
||||
return Arrays.asList("8ED");
|
||||
}
|
||||
|
||||
if (format.equals("Ninth Edition")) {
|
||||
return Arrays.asList("9ED");
|
||||
}
|
||||
if (format.equals("Tenth Edition")) {
|
||||
return Arrays.asList("10E");
|
||||
}
|
||||
|
||||
if (format.equals("Magic 2010")) {
|
||||
return Arrays.asList("M10");
|
||||
}
|
||||
if (format.equals("Magic 2011")) {
|
||||
return Arrays.asList("M11");
|
||||
}
|
||||
if (format.equals("Magic 2012")) {
|
||||
return Arrays.asList("M12");
|
||||
}
|
||||
if (format.equals("Magic 2013")) {
|
||||
return Arrays.asList("M13");
|
||||
}
|
||||
if (format.equals("Guru")) {
|
||||
return Arrays.asList("GUR");
|
||||
}
|
||||
if (format.equals("Duel Decks: Elspeth vs. Tezzeret")) {
|
||||
return Arrays.asList("DDF");
|
||||
}
|
||||
|
||||
if (format.equals("- Standard")) {
|
||||
return standard;
|
||||
}
|
||||
if (format.equals("Extended")) {
|
||||
if (format.equals("- Extended")) {
|
||||
return extended;
|
||||
}
|
||||
if (format.equals("Modern")) {
|
||||
if (format.equals("- Modern")) {
|
||||
return modern;
|
||||
}
|
||||
return all;
|
||||
}
|
||||
|
||||
private static void buildLists() {
|
||||
|
||||
for (String setCode : CardsStorage.getSetCodes()) {
|
||||
ExpansionSet set = Sets.findSet(setCode);
|
||||
if (set.getReleaseDate().after(m13Date)) {
|
||||
m13.add(set.getCode());
|
||||
}
|
||||
if (set.getReleaseDate().after(innistradBlockDate) && set.getReleaseDate().before(m13Date)) {
|
||||
innistradBlock.add(set.getCode());
|
||||
}
|
||||
|
||||
if (set.getReleaseDate().after(standardDate)) {
|
||||
standard.add(set.getCode());
|
||||
}
|
||||
|
@ -69,17 +360,11 @@ public class ConstructedFormats {
|
|||
}
|
||||
}
|
||||
|
||||
private static final List<String> m13= new ArrayList<String>();
|
||||
private static final Date m13Date = new GregorianCalendar(2012, 6, 6).getTime();
|
||||
|
||||
private static final List<String> innistradBlock = new ArrayList<String>();
|
||||
private static final Date innistradBlockDate = new GregorianCalendar(2011, 9, 29).getTime();
|
||||
|
||||
private static final List<String> standard = new ArrayList<String>();
|
||||
private static final Date standardDate = new GregorianCalendar(2010, 9, 20).getTime();
|
||||
private static final Date standardDate = new GregorianCalendar(2011, 9, 29).getTime();
|
||||
|
||||
private static final List<String> extended = new ArrayList<String>();
|
||||
private static final Date extendedDate = new GregorianCalendar(2008, 9, 20).getTime();
|
||||
private static final Date extendedDate = new GregorianCalendar(2009, 8, 20).getTime();
|
||||
|
||||
private static final List<String> modern = new ArrayList<String>();
|
||||
private static final Date modernDate = new GregorianCalendar(2003, 7, 20).getTime();
|
||||
|
|
Loading…
Add table
Reference in a new issue