Resolve "Format: pioneer"

This commit is contained in:
Hans Mackowiak
2019-11-06 01:04:02 +00:00
committed by swordshine
parent 6a76cc8bc6
commit a6ff0b5b10
5 changed files with 25 additions and 9 deletions

View File

@@ -35,6 +35,7 @@ public class StaticData {
private Predicate<PaperCard> standardPredicate;
private Predicate<PaperCard> brawlPredicate;
private Predicate<PaperCard> pioneerPredicate;
private Predicate<PaperCard> modernPredicate;
private Predicate<PaperCard> commanderPredicate;
private Predicate<PaperCard> oathbreakerPredicate;
@@ -197,13 +198,13 @@ public class StaticData {
public TokenDb getAllTokens() { return allTokens; }
public Predicate<PaperCard> getStandardPredicate() {
return standardPredicate;
}
public void setStandardPredicate(Predicate<PaperCard> standardPredicate) { this.standardPredicate = standardPredicate; }
public void setModernPredicate(Predicate<PaperCard> modernPredicate) { this.modernPredicate = standardPredicate; }
public void setPioneerPredicate(Predicate<PaperCard> pioneerPredicate) { this.pioneerPredicate = pioneerPredicate; }
public void setModernPredicate(Predicate<PaperCard> modernPredicate) { this.modernPredicate = modernPredicate; }
public void setCommanderPredicate(Predicate<PaperCard> commanderPredicate) { this.commanderPredicate = commanderPredicate; }
@@ -211,9 +212,11 @@ public class StaticData {
public void setBrawlPredicate(Predicate<PaperCard> brawlPredicate) { this.brawlPredicate = brawlPredicate; }
public Predicate<PaperCard> getModernPredicate() {
return modernPredicate;
}
public Predicate<PaperCard> getStandardPredicate() { return standardPredicate; }
public Predicate<PaperCard> getPioneerPredicate() { return pioneerPredicate; }
public Predicate<PaperCard> getModernPredicate() { return modernPredicate; }
public Predicate<PaperCard> getCommanderPredicate() { return commanderPredicate; }

View File

@@ -47,7 +47,7 @@ import java.util.Map.Entry;
public class GameFormat implements Comparable<GameFormat> {
private final String name;
public enum FormatType {Sanctioned, Casual, Historic, Digital, Custom}
public enum FormatSubType {Block, Standard, Extended, Modern, Legacy, Vintage, Commander, Planechase, Videogame, MTGO, Custom}
public enum FormatSubType {Block, Standard, Extended, Pioneer, Modern, Legacy, Vintage, Commander, Planechase, Videogame, MTGO, Custom}
// contains allowed sets, when empty allows all sets
private FormatType formatType;
@@ -290,6 +290,7 @@ public class GameFormat implements Comparable<GameFormat> {
private List<String> coreFormats = new ArrayList<>();
{
coreFormats.add("Standard.txt");
coreFormats.add("Pioneer.txt");
coreFormats.add("Modern.txt");
coreFormats.add("Legacy.txt");
coreFormats.add("Vintage.txt");
@@ -468,6 +469,10 @@ public class GameFormat implements Comparable<GameFormat> {
return this.map.get("Extended");
}
public GameFormat getPioneer() {
return this.map.get("Pioneer");
}
public GameFormat getModern() {
return this.map.get("Modern");
}

View File

@@ -1,6 +1,6 @@
[format]
Name:Modern
Order:102
Order:103
Subtype:Modern
Type:Sanctioned
Sets:8ED, MRD, DST, 5DN, CHK, BOK, SOK, 9ED, RAV, GPT, DIS, CSP, TSP, TSB, PLC, FUT, 10E, LRW, EVE, SHM, MOR, ALA, CFX, ARB, M10, ZEN, WWK, ROE, M11, SOM, MBS, NPH, M12, ISD, DKA, AVR, M13, RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, MM2, ORI, BFZ, OGW, SOI, EMN, KLD, AER, AKH, W17, HOU, XLN, RIX, DOM, M19, G18, GRN, RNA, WAR, MH1, M20, ELD

View File

@@ -0,0 +1,7 @@
[format]
Name:Pioneer
Order:102
Subtype:Pioneer
Type:Sanctioned
Sets:RTR, GTC, DGM, M14, THS, BNG, JOU, M15, KTK, FRF, DTK, ORI, BFZ, OGW, SOI, EMN, KLD, AER, AKH, HOU, XLN, RIX, DOM, M19, GRN, RNA, WAR, M20, ELD
Banned:Bloodstained Mire; Flooded Strand; Polluted Delta; Windswept Heath; Wooded Foothills; Felidar Guardian; Leyline of Abundance; Oath of Nissa

View File

@@ -168,6 +168,7 @@ public final class FModel {
new File(ForgeConstants.USER_FORMATS_DIR), preferences.getPrefBoolean(FPref.LOAD_HISTORIC_FORMATS)));
magicDb.setStandardPredicate(formats.getStandard().getFilterRules());
magicDb.setPioneerPredicate(formats.getPioneer().getFilterRules());
magicDb.setModernPredicate(formats.getModern().getFilterRules());
magicDb.setCommanderPredicate(formats.get("Commander").getFilterRules());
magicDb.setOathbreakerPredicate(formats.get("Oathbreaker").getFilterRules());