Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public final class ConstructedFormats {
public static final String JOKE = "- Joke Sets";
public static final String CUSTOM = "- Custom";
public static final String XMAGE_SETS = "- XMAGE"; // inner sets like XMAGE (special tokens)
public static final String OLDSCHOOL = "- Old School";
public static final Standard STANDARD_CARDS = new Standard();

// Attention -Month is 0 Based so Feb = 1 for example. //
Expand All @@ -37,6 +38,7 @@ public final class ConstructedFormats {
private static final Date pioneerDate = new GregorianCalendar(2012, Calendar.OCTOBER, 5 - 1).getTime();
private static final Date modernDate = new GregorianCalendar(2003, Calendar.JULY, 28 - 1).getTime();
private static final Date historicDate = new GregorianCalendar(2017, Calendar.SEPTEMBER, 29 - 1).getTime();
private static final Date oldschoolDate = new GregorianCalendar(1994, Calendar.AUGUST, 10 - 1).getTime();

// for all sets just return empty list
private static final List<String> all = new ArrayList<>();
Expand Down Expand Up @@ -105,6 +107,7 @@ public static void buildLists() {
underlyingSetCodesPerFormat.put(JOKE, new ArrayList<>());
underlyingSetCodesPerFormat.put(CUSTOM, new ArrayList<>());
underlyingSetCodesPerFormat.put(XMAGE_SETS, new ArrayList<>());
underlyingSetCodesPerFormat.put(OLDSCHOOL, new ArrayList<>());
final Map<String, ExpansionInfo> expansionInfo = new HashMap<>();
formats.clear(); // prevent NPE on sorting if this is not the first try

Expand Down Expand Up @@ -171,6 +174,12 @@ public static void buildLists() {
underlyingSetCodesPerFormat.get(MODERN).add(set.getCode());
}

// old school
if(set.getReleaseDate().before(oldschoolDate)){
underlyingSetCodesPerFormat.get(OLDSCHOOL).add(set.getCode());
}


// BLOCKS formats

if (set.getType() == SetType.EXPANSION && set.getBlockName() != null) {
Expand Down Expand Up @@ -289,6 +298,7 @@ public static void buildLists() {
formats.add(0, FRONTIER);
formats.add(0, EXTENDED);
formats.add(0, STANDARD);
formats.add(0, OLDSCHOOL);
}
formats.add(0, ALL_SETS);
}
Expand Down