forked from External/mage
Refactor set's legality, Modern Horizons now available for modern formats;
This commit is contained in:
parent
6bfea7bfd9
commit
e30eecead3
29 changed files with 86 additions and 89 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package mage.constants;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public enum SetType {
|
||||
|
|
@ -10,6 +9,7 @@ public enum SetType {
|
|||
MAGIC_ONLINE("Magic Online"),
|
||||
SUPPLEMENTAL("Supplemental"),
|
||||
SUPPLEMENTAL_STANDARD_LEGAL("Standard Legal Supplemental"),
|
||||
SUPPLEMENTAL_MODERN_LEGAL("Modern Legal Supplemental"),
|
||||
PROMOTIONAL("Promotional"),
|
||||
JOKESET("Joke Set"),
|
||||
CUSTOM_SET("Unofficial Set");
|
||||
|
|
@ -24,4 +24,27 @@ public enum SetType {
|
|||
public String toString() {
|
||||
return text;
|
||||
}
|
||||
|
||||
public boolean isCustomSet() {
|
||||
return this == SetType.CUSTOM_SET;
|
||||
}
|
||||
|
||||
public boolean isJokeSet() {
|
||||
return this == SetType.JOKESET;
|
||||
}
|
||||
|
||||
public boolean isEternalLegal() {
|
||||
// any official sets except un-sets
|
||||
return this != SetType.CUSTOM_SET && this != SetType.JOKESET;
|
||||
}
|
||||
|
||||
public boolean isStandardLegal() {
|
||||
// any official sets that was in standard
|
||||
return this == SetType.CORE || this == SetType.EXPANSION || this == SetType.SUPPLEMENTAL_STANDARD_LEGAL;
|
||||
}
|
||||
|
||||
public boolean isModernLegal() {
|
||||
// any official sets that was in modern (standard + Modern Horizons)
|
||||
return this.isStandardLegal() || this == SetType.SUPPLEMENTAL_MODERN_LEGAL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue