forked from External/mage
add verify check for "custom" subtypes that become official
This commit is contained in:
parent
250826d631
commit
e03a164bb3
3 changed files with 11 additions and 4 deletions
|
|
@ -42,6 +42,7 @@ public final class MtgJsonCard {
|
|||
public boolean isFullArt;
|
||||
public String frameVersion;
|
||||
public List<String> printings; // set codes with that card
|
||||
public boolean isFunny;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
|
|
|||
|
|
@ -2055,7 +2055,13 @@ public class VerifyCardDataTest {
|
|||
expected.removeIf(subtypesToIgnore::contains);
|
||||
|
||||
for (SubType subType : card.getSubtype()) {
|
||||
if (!subType.isCustomSet() && !subType.canGain(card)) {
|
||||
if (subType.isCustomSet()) {
|
||||
if (!ref.isFunny) {
|
||||
fail(card, "subtypes", "subtype " + subType + " is marked as \"custom\" but is in an official set");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!subType.canGain(card)) {
|
||||
String cardTypeString = card
|
||||
.getCardType()
|
||||
.stream()
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ public enum SubType {
|
|||
FROG("Frog", SubTypeSet.CreatureType),
|
||||
FUNGUS("Fungus", SubTypeSet.CreatureType),
|
||||
// G
|
||||
GAMER("Gamer", SubTypeSet.CreatureType, true), // Un-sets
|
||||
GAMER("Gamer", SubTypeSet.CreatureType),
|
||||
GAMORREAN("Gamorrean", SubTypeSet.CreatureType, true), // Star Wars
|
||||
GAND("Gand", SubTypeSet.CreatureType, true), // Star Wars
|
||||
GARGOYLE("Gargoyle", SubTypeSet.CreatureType),
|
||||
|
|
@ -355,7 +355,7 @@ public enum SubType {
|
|||
SAPROLING("Saproling", SubTypeSet.CreatureType),
|
||||
SATYR("Satyr", SubTypeSet.CreatureType),
|
||||
SCARECROW("Scarecrow", SubTypeSet.CreatureType),
|
||||
SCIENTIST("Scientist", SubTypeSet.CreatureType, true), // Unstable
|
||||
SCIENTIST("Scientist", SubTypeSet.CreatureType),
|
||||
SCION("Scion", SubTypeSet.CreatureType),
|
||||
SCORPION("Scorpion", SubTypeSet.CreatureType),
|
||||
SCOUT("Scout", SubTypeSet.CreatureType),
|
||||
|
|
@ -426,7 +426,7 @@ public enum SubType {
|
|||
VAMPIRE("Vampire", SubTypeSet.CreatureType),
|
||||
VARMINT("Varmint", SubTypeSet.CreatureType),
|
||||
VEDALKEN("Vedalken", SubTypeSet.CreatureType),
|
||||
VILLAIN("Villain", SubTypeSet.CreatureType, true), // Unstable
|
||||
VILLAIN("Villain", SubTypeSet.CreatureType),
|
||||
VOLVER("Volver", SubTypeSet.CreatureType),
|
||||
// W
|
||||
WALL("Wall", SubTypeSet.CreatureType),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue