Code Cleanup

Deprecated SubTypeList methods that expect strings and List<String>.
Readability cleanup for SubType Enum.
This commit is contained in:
Justin Herlehy 2017-09-06 20:38:11 -07:00
parent 5bb9318c57
commit b6dceb28c8
3 changed files with 354 additions and 319 deletions

View file

@ -29,13 +29,16 @@ package mage.abilities.effects.common.continuous;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.ContinuousEffectImpl;
import mage.constants.*; import mage.constants.AttachmentType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer;
import mage.constants.SubType;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.util.SubTypeList; import mage.util.SubTypeList;
import java.util.List;
/** /**
* @author nantuko * @author nantuko
*/ */
@ -44,7 +47,14 @@ public class SetCardSubtypeAttachedEffect extends ContinuousEffectImpl {
private SubTypeList setSubtypes = new SubTypeList(); private SubTypeList setSubtypes = new SubTypeList();
private final AttachmentType attachmentType; private final AttachmentType attachmentType;
public SetCardSubtypeAttachedEffect(SubType setSubtype, Duration duration, AttachmentType attachmentType) { public SetCardSubtypeAttachedEffect(Duration duration, AttachmentType attachmentType, SubType... setSubtype) {
super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
this.setSubtypes.add(setSubtype);
this.attachmentType = attachmentType;
this.setText();
}
/*public SetCardSubtypeAttachedEffect(SubType setSubtype, Duration duration, AttachmentType attachmentType) {
super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit); super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
this.setSubtypes.add(setSubtype); this.setSubtypes.add(setSubtype);
this.attachmentType = attachmentType; this.attachmentType = attachmentType;
@ -56,7 +66,7 @@ public class SetCardSubtypeAttachedEffect extends ContinuousEffectImpl {
this.setSubtypes.addAll(setSubtypes); this.setSubtypes.addAll(setSubtypes);
this.attachmentType = attachmentType; this.attachmentType = attachmentType;
setText(); setText();
} }*/
public SetCardSubtypeAttachedEffect(final SetCardSubtypeAttachedEffect effect) { public SetCardSubtypeAttachedEffect(final SetCardSubtypeAttachedEffect effect) {
super(effect); super(effect);

View file

@ -1,396 +1,410 @@
package mage.constants; package mage.constants;
import mage.util.SubTypeList;
import java.util.Arrays; import java.util.Arrays;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import mage.util.SubTypeList;
public enum SubType { public enum SubType {
//205.3k Instants and sorceries share their lists of subtypes; these subtypes are called spell types. //205.3k Instants and sorceries share their lists of subtypes; these subtypes are called spell types.
ARCANE("Arcane", SubTypeSet.SpellType, false), ARCANE("Arcane", SubTypeSet.SpellType),
TRAP("Trap", SubTypeSet.SpellType, false), TRAP("Trap", SubTypeSet.SpellType),
// 205.3i: Lands have their own unique set of subtypes; these subtypes are called land types. // 205.3i: Lands have their own unique set of subtypes; these subtypes are called land types.
// Of that list, Forest, Island, Mountain, Plains, and Swamp are the basic land types. // Of that list, Forest, Island, Mountain, Plains, and Swamp are the basic land types.
FOREST("Forest", SubTypeSet.BasicLandType, false), FOREST("Forest", SubTypeSet.BasicLandType),
ISLAND("Island", SubTypeSet.BasicLandType, false), ISLAND("Island", SubTypeSet.BasicLandType),
MOUNTAIN("Mountain", SubTypeSet.BasicLandType, false), MOUNTAIN("Mountain", SubTypeSet.BasicLandType),
PLAINS("Plains", SubTypeSet.BasicLandType, false), PLAINS("Plains", SubTypeSet.BasicLandType),
SWAMP("Swamp", SubTypeSet.BasicLandType, false), SWAMP("Swamp", SubTypeSet.BasicLandType),
DESERT("Desert", SubTypeSet.NonBasicLandType, false), DESERT("Desert", SubTypeSet.NonBasicLandType),
GATE("Gate", SubTypeSet.NonBasicLandType, false), GATE("Gate", SubTypeSet.NonBasicLandType),
LAIR("Lair", SubTypeSet.NonBasicLandType, false), LAIR("Lair", SubTypeSet.NonBasicLandType),
LOCUS("Locus", SubTypeSet.NonBasicLandType, false), LOCUS("Locus", SubTypeSet.NonBasicLandType),
URZAS("Urza's", SubTypeSet.NonBasicLandType, false), URZAS("Urza's", SubTypeSet.NonBasicLandType),
MINE("Mine", SubTypeSet.NonBasicLandType, false), MINE("Mine", SubTypeSet.NonBasicLandType),
POWER_PLANT("Power-Plant", SubTypeSet.NonBasicLandType, false), POWER_PLANT("Power-Plant", SubTypeSet.NonBasicLandType),
TOWER("Tower", SubTypeSet.NonBasicLandType, false), TOWER("Tower", SubTypeSet.NonBasicLandType),
// 205.3h Enchantments have their own unique set of subtypes; these subtypes are called enchantment types. // 205.3h Enchantments have their own unique set of subtypes; these subtypes are called enchantment types.
AURA("Aura", SubTypeSet.EnchantmentType, false), AURA("Aura", SubTypeSet.EnchantmentType),
CARTOUCHE("Cartouche", SubTypeSet.EnchantmentType, false), CARTOUCHE("Cartouche", SubTypeSet.EnchantmentType),
CURSE("Curse", SubTypeSet.EnchantmentType, false), CURSE("Curse", SubTypeSet.EnchantmentType),
SHRINE("Shrine", SubTypeSet.EnchantmentType, false), SHRINE("Shrine", SubTypeSet.EnchantmentType),
// 205.3g: Artifacts have their own unique set of subtypes; these subtypes are called artifact types. // 205.3g: Artifacts have their own unique set of subtypes; these subtypes are called artifact types.
CLUE("Clue", SubTypeSet.ArtifactType, false), CLUE("Clue", SubTypeSet.ArtifactType),
CONTRAPTION("Contraption", SubTypeSet.ArtifactType, false), CONTRAPTION("Contraption", SubTypeSet.ArtifactType),
EQUIPMENT("Equipment", SubTypeSet.ArtifactType, false), EQUIPMENT("Equipment", SubTypeSet.ArtifactType),
FORTIFICATION("Fortification", SubTypeSet.ArtifactType, false), FORTIFICATION("Fortification", SubTypeSet.ArtifactType),
TREASURE("Treasure", SubTypeSet.ArtifactType, false), TREASURE("Treasure", SubTypeSet.ArtifactType),
VEHICLE("Vehicle", SubTypeSet.ArtifactType, false), VEHICLE("Vehicle", SubTypeSet.ArtifactType),
// 205.3m : Creatures and tribals share their lists of subtypes; these subtypes are called creature types. // 205.3m : Creatures and tribals share their lists of subtypes; these subtypes are called creature types.
// A // A
ADVISOR("Advisor", SubTypeSet.CreatureType, false), ADVISOR("Advisor", SubTypeSet.CreatureType),
AETHERBORN("Aetherborn", SubTypeSet.CreatureType, false), AETHERBORN("Aetherborn", SubTypeSet.CreatureType),
ALLY("Ally", SubTypeSet.CreatureType, false), ALLY("Ally", SubTypeSet.CreatureType),
ANGEL("Angel", SubTypeSet.CreatureType, false), ANGEL("Angel", SubTypeSet.CreatureType),
ANTELOPE("Antelope", SubTypeSet.CreatureType, false), ANTELOPE("Antelope", SubTypeSet.CreatureType),
AQUALISH("Aqualish", SubTypeSet.CreatureType, true), // Star Wars AQUALISH("Aqualish", SubTypeSet.CreatureType, true), // Star Wars
APE("Ape", SubTypeSet.CreatureType, false), APE("Ape", SubTypeSet.CreatureType),
ARCONA("Arcona", SubTypeSet.CreatureType, true), ARCONA("Arcona", SubTypeSet.CreatureType, true),
ARCHER("Archer", SubTypeSet.CreatureType, false), ARCHER("Archer", SubTypeSet.CreatureType),
ARCHON("Archon", SubTypeSet.CreatureType, false), ARCHON("Archon", SubTypeSet.CreatureType),
ARTIFICER("Artificer", SubTypeSet.CreatureType, false), ARTIFICER("Artificer", SubTypeSet.CreatureType),
ARTIFICIER("Artificier", SubTypeSet.CreatureType, true), ARTIFICIER("Artificier", SubTypeSet.CreatureType, true),
ASSASSIN("Assassin", SubTypeSet.CreatureType, false), ASSASSIN("Assassin", SubTypeSet.CreatureType),
ASSEMBLY_WORKER("Assembly-Worker", SubTypeSet.CreatureType, false), ASSEMBLY_WORKER("Assembly-Worker", SubTypeSet.CreatureType),
ATOG("Atog", SubTypeSet.CreatureType, false), ATOG("Atog", SubTypeSet.CreatureType),
ATAT("AT-AT", SubTypeSet.CreatureType, true), ATAT("AT-AT", SubTypeSet.CreatureType, true),
AUROCHS("Aurochs", SubTypeSet.CreatureType, false), AUROCHS("Aurochs", SubTypeSet.CreatureType),
AUTOBOT("Autobot", SubTypeSet.CreatureType, true), // H17, Grimlock AUTOBOT("Autobot", SubTypeSet.CreatureType, true), // H17, Grimlock
AVATAR("Avatar", SubTypeSet.CreatureType, false), AVATAR("Avatar", SubTypeSet.CreatureType),
// B // B
BADGER("Badger", SubTypeSet.CreatureType, false), BADGER("Badger", SubTypeSet.CreatureType),
BARBARIAN("Barbarian", SubTypeSet.CreatureType, false), BARBARIAN("Barbarian", SubTypeSet.CreatureType),
BASILISK("Basilisk", SubTypeSet.CreatureType, false), BASILISK("Basilisk", SubTypeSet.CreatureType),
BAT("Bat", SubTypeSet.CreatureType, false), BAT("Bat", SubTypeSet.CreatureType),
BEAR("Bear", SubTypeSet.CreatureType, false), BEAR("Bear", SubTypeSet.CreatureType),
BEAST("Beast", SubTypeSet.CreatureType, false), BEAST("Beast", SubTypeSet.CreatureType),
BEEBLE("Beeble", SubTypeSet.CreatureType, false), BEEBLE("Beeble", SubTypeSet.CreatureType),
BERSERKER("Berserker", SubTypeSet.CreatureType, false), BERSERKER("Berserker", SubTypeSet.CreatureType),
BIRD("Bird", SubTypeSet.CreatureType, false), BIRD("Bird", SubTypeSet.CreatureType),
BITH("Bith", SubTypeSet.CreatureType, true), // Star Wars BITH("Bith", SubTypeSet.CreatureType, true), // Star Wars
BLINKMOTH("Blinkmoth", SubTypeSet.CreatureType, false), BLINKMOTH("Blinkmoth", SubTypeSet.CreatureType),
BOAR("Boar", SubTypeSet.CreatureType, false), BOAR("Boar", SubTypeSet.CreatureType),
BRINGER("Bringer", SubTypeSet.CreatureType, false), BRINGER("Bringer", SubTypeSet.CreatureType),
BRUSHWAGG("Brushwagg", SubTypeSet.CreatureType, false), BRUSHWAGG("Brushwagg", SubTypeSet.CreatureType),
// C // C
CALAMARI("Calamari", SubTypeSet.CreatureType, true), // Star Wars CALAMARI("Calamari", SubTypeSet.CreatureType, true), // Star Wars
CAMARID("Camarid", SubTypeSet.CreatureType, false), CAMARID("Camarid", SubTypeSet.CreatureType),
CAMEL("Camel", SubTypeSet.CreatureType, false), CAMEL("Camel", SubTypeSet.CreatureType),
CARIBOU("Caribou", SubTypeSet.CreatureType, false), CARIBOU("Caribou", SubTypeSet.CreatureType),
CARRIER("Carrier", SubTypeSet.CreatureType, false), CARRIER("Carrier", SubTypeSet.CreatureType),
CAT("Cat", SubTypeSet.CreatureType, false), CAT("Cat", SubTypeSet.CreatureType),
CENTAUR("Centaur", SubTypeSet.CreatureType, false), CENTAUR("Centaur", SubTypeSet.CreatureType),
CEREAN("Cerean", SubTypeSet.CreatureType, true), // Star Wars CEREAN("Cerean", SubTypeSet.CreatureType, true), // Star Wars
CEPHALID("Cephalid", SubTypeSet.CreatureType, false), CEPHALID("Cephalid", SubTypeSet.CreatureType),
CHIMERA("Chimera", SubTypeSet.CreatureType, false), CHIMERA("Chimera", SubTypeSet.CreatureType),
CHISS("Chiss", SubTypeSet.CreatureType, true), CHISS("Chiss", SubTypeSet.CreatureType, true),
CITIZEN("Citizen", SubTypeSet.CreatureType, false), CITIZEN("Citizen", SubTypeSet.CreatureType),
CLERIC("Cleric", SubTypeSet.CreatureType, false), CLERIC("Cleric", SubTypeSet.CreatureType),
COCKATRICE("Cockatrice", SubTypeSet.CreatureType, false), COCKATRICE("Cockatrice", SubTypeSet.CreatureType),
CONSTRUCT("Construct", SubTypeSet.CreatureType, false), CONSTRUCT("Construct", SubTypeSet.CreatureType),
COWARD("Coward", SubTypeSet.CreatureType, false), COWARD("Coward", SubTypeSet.CreatureType),
CRAB("Crab", SubTypeSet.CreatureType, false), CRAB("Crab", SubTypeSet.CreatureType),
CROCODILE("Crocodile", SubTypeSet.CreatureType, false), CROCODILE("Crocodile", SubTypeSet.CreatureType),
CYBORG("Cyborg", SubTypeSet.CreatureType, true), // Star Wars CYBORG("Cyborg", SubTypeSet.CreatureType, true), // Star Wars
CYCLOPS("Cyclops", SubTypeSet.CreatureType, false), CYCLOPS("Cyclops", SubTypeSet.CreatureType),
// D // D
DATHOMIRIAN("Dathomirian", SubTypeSet.CreatureType, true), // Star Wars DATHOMIRIAN("Dathomirian", SubTypeSet.CreatureType, true), // Star Wars
DAUTHI("Dauthi", SubTypeSet.CreatureType, false), DAUTHI("Dauthi", SubTypeSet.CreatureType),
DEMON("Demon", SubTypeSet.CreatureType, false), DEMON("Demon", SubTypeSet.CreatureType),
DESERTER("Deserter", SubTypeSet.CreatureType, false), DESERTER("Deserter", SubTypeSet.CreatureType),
DEVIL("Devil", SubTypeSet.CreatureType, false), DEVIL("Devil", SubTypeSet.CreatureType),
DINOSAUR("Dinosaur", SubTypeSet.CreatureType, false), // With Ixalan now being spoiled, need this to be selectable DINOSAUR("Dinosaur", SubTypeSet.CreatureType), // With Ixalan now being spoiled, need this to be selectable
DJINN("Djinn", SubTypeSet.CreatureType, false), DJINN("Djinn", SubTypeSet.CreatureType),
DRAGON("Dragon", SubTypeSet.CreatureType, false), DRAGON("Dragon", SubTypeSet.CreatureType),
DRAKE("Drake", SubTypeSet.CreatureType, false), DRAKE("Drake", SubTypeSet.CreatureType),
DREADNOUGHT("Dreadnought", SubTypeSet.CreatureType, false), DREADNOUGHT("Dreadnought", SubTypeSet.CreatureType),
DRONE("Drone", SubTypeSet.CreatureType, false), DRONE("Drone", SubTypeSet.CreatureType),
DRUID("Druid", SubTypeSet.CreatureType, false), DRUID("Druid", SubTypeSet.CreatureType),
DROID("Droid", SubTypeSet.CreatureType, true), // Star Wars DROID("Droid", SubTypeSet.CreatureType, true), // Star Wars
DRYAD("Dryad", SubTypeSet.CreatureType, false), DRYAD("Dryad", SubTypeSet.CreatureType),
DWARF("Dwarf", SubTypeSet.CreatureType, false), DWARF("Dwarf", SubTypeSet.CreatureType),
// E // E
EFREET("Efreet", SubTypeSet.CreatureType, false), EFREET("Efreet", SubTypeSet.CreatureType),
ELDER("Elder", SubTypeSet.CreatureType, false), ELDER("Elder", SubTypeSet.CreatureType),
ELDRAZI("Eldrazi", SubTypeSet.CreatureType, false), ELDRAZI("Eldrazi", SubTypeSet.CreatureType),
ELEMENTAL("Elemental", SubTypeSet.CreatureType, false), ELEMENTAL("Elemental", SubTypeSet.CreatureType),
ELEPHANT("Elephant", SubTypeSet.CreatureType, false), ELEPHANT("Elephant", SubTypeSet.CreatureType),
ELF("Elf", SubTypeSet.CreatureType, false), ELF("Elf", SubTypeSet.CreatureType),
ELK("Elk", SubTypeSet.CreatureType, false), ELK("Elk", SubTypeSet.CreatureType),
EYE("Eye", SubTypeSet.CreatureType, false), EYE("Eye", SubTypeSet.CreatureType),
EWOK("Ewok", SubTypeSet.CreatureType, true), // Star Wars EWOK("Ewok", SubTypeSet.CreatureType, true), // Star Wars
// F // F
FAERIE("Faerie", SubTypeSet.CreatureType, false), FAERIE("Faerie", SubTypeSet.CreatureType),
FERRET("Ferret", SubTypeSet.CreatureType, false), FERRET("Ferret", SubTypeSet.CreatureType),
FISH("Fish", SubTypeSet.CreatureType, false), FISH("Fish", SubTypeSet.CreatureType),
FLAGBEARER("Flagbearer", SubTypeSet.CreatureType, false), FLAGBEARER("Flagbearer", SubTypeSet.CreatureType),
FOX("Fox", SubTypeSet.CreatureType, false), FOX("Fox", SubTypeSet.CreatureType),
FROG("Frog", SubTypeSet.CreatureType, false), FROG("Frog", SubTypeSet.CreatureType),
FUNGUS("Fungus", SubTypeSet.CreatureType, false), FUNGUS("Fungus", SubTypeSet.CreatureType),
// G // G
GAMORREAN("Gamorrean", SubTypeSet.CreatureType, true), // Star Wars GAMORREAN("Gamorrean", SubTypeSet.CreatureType, true), // Star Wars
GAND("Gand", SubTypeSet.CreatureType, true), // Star Wars GAND("Gand", SubTypeSet.CreatureType, true), // Star Wars
GARGOYLE("Gargoyle", SubTypeSet.CreatureType, false), GARGOYLE("Gargoyle", SubTypeSet.CreatureType),
GERM("Germ", SubTypeSet.CreatureType, false), GERM("Germ", SubTypeSet.CreatureType),
GIANT("Giant", SubTypeSet.CreatureType, false), GIANT("Giant", SubTypeSet.CreatureType),
GNOME("Gnome", SubTypeSet.CreatureType, false), GNOME("Gnome", SubTypeSet.CreatureType),
GOLEM("Golem", SubTypeSet.CreatureType, false), GOLEM("Golem", SubTypeSet.CreatureType),
GOAT("Goat", SubTypeSet.CreatureType, false), GOAT("Goat", SubTypeSet.CreatureType),
GOBLIN("Goblin", SubTypeSet.CreatureType, false), GOBLIN("Goblin", SubTypeSet.CreatureType),
GOD("God", SubTypeSet.CreatureType, false), GOD("God", SubTypeSet.CreatureType),
GORGON("Gorgon", SubTypeSet.CreatureType, false), GORGON("Gorgon", SubTypeSet.CreatureType),
GRAVEBORN("Graveborn", SubTypeSet.CreatureType, false), GRAVEBORN("Graveborn", SubTypeSet.CreatureType),
GREMLIN("Gremlin", SubTypeSet.CreatureType, false), GREMLIN("Gremlin", SubTypeSet.CreatureType),
GRIFFIN("Griffin", SubTypeSet.CreatureType, false), GRIFFIN("Griffin", SubTypeSet.CreatureType),
GUNGAN("Gungan", SubTypeSet.CreatureType, true), // Star Wars GUNGAN("Gungan", SubTypeSet.CreatureType, true), // Star Wars
// H // H
HAG("Hag", SubTypeSet.CreatureType, false), HAG("Hag", SubTypeSet.CreatureType),
HARPY("Harpy", SubTypeSet.CreatureType, false), HARPY("Harpy", SubTypeSet.CreatureType),
HELLION("Hellion", SubTypeSet.CreatureType, false), HELLION("Hellion", SubTypeSet.CreatureType),
HIPPO("Hippo", SubTypeSet.CreatureType, false), HIPPO("Hippo", SubTypeSet.CreatureType),
HIPPOGRIFF("Hippogriff", SubTypeSet.CreatureType, false), HIPPOGRIFF("Hippogriff", SubTypeSet.CreatureType),
HOMARID("Homarid", SubTypeSet.CreatureType, false), HOMARID("Homarid", SubTypeSet.CreatureType),
HOMUNCULUS("Homunculus", SubTypeSet.CreatureType, false), HOMUNCULUS("Homunculus", SubTypeSet.CreatureType),
HORROR("Horror", SubTypeSet.CreatureType, false), HORROR("Horror", SubTypeSet.CreatureType),
HORSE("Horse", SubTypeSet.CreatureType, false), HORSE("Horse", SubTypeSet.CreatureType),
HOUND("Hound", SubTypeSet.CreatureType, false), HOUND("Hound", SubTypeSet.CreatureType),
HUMAN("Human", SubTypeSet.CreatureType, false), HUMAN("Human", SubTypeSet.CreatureType),
HUNTER("Hunter", SubTypeSet.CreatureType, false), HUNTER("Hunter", SubTypeSet.CreatureType),
HUTT("Hutt", SubTypeSet.CreatureType, true), // Star Wars HUTT("Hutt", SubTypeSet.CreatureType, true), // Star Wars
HYDRA("Hydra", SubTypeSet.CreatureType, false), HYDRA("Hydra", SubTypeSet.CreatureType),
HYENA("Hyena", SubTypeSet.CreatureType, false), HYENA("Hyena", SubTypeSet.CreatureType),
// I // I
ILLUSION("Illusion", SubTypeSet.CreatureType, false), ILLUSION("Illusion", SubTypeSet.CreatureType),
IMP("Imp", SubTypeSet.CreatureType, false), IMP("Imp", SubTypeSet.CreatureType),
INCARNATION("Incarnation", SubTypeSet.CreatureType, false), INCARNATION("Incarnation", SubTypeSet.CreatureType),
INSECT("Insect", SubTypeSet.CreatureType, false), INSECT("Insect", SubTypeSet.CreatureType),
ITHORIAN("Ithorian", SubTypeSet.CreatureType, true), // Star Wars ITHORIAN("Ithorian", SubTypeSet.CreatureType, true), // Star Wars
// J // J
JACKAL("Jackal", SubTypeSet.CreatureType, false), JACKAL("Jackal", SubTypeSet.CreatureType),
JAWA("Jawa", SubTypeSet.CreatureType, true), JAWA("Jawa", SubTypeSet.CreatureType, true),
JEDI("Jedi", SubTypeSet.CreatureType, true), // Star Wars JEDI("Jedi", SubTypeSet.CreatureType, true), // Star Wars
JELLYFISH("Jellyfish", SubTypeSet.CreatureType, false), JELLYFISH("Jellyfish", SubTypeSet.CreatureType),
JUGGERNAUT("Juggernaut", SubTypeSet.CreatureType, false), JUGGERNAUT("Juggernaut", SubTypeSet.CreatureType),
// K // K
KALEESH("Kaleesh", SubTypeSet.CreatureType, true), // Star Wars KALEESH("Kaleesh", SubTypeSet.CreatureType, true), // Star Wars
KAVU("Kavu", SubTypeSet.CreatureType, false), KAVU("Kavu", SubTypeSet.CreatureType),
KELDOR("KelDor", SubTypeSet.CreatureType, true), KELDOR("KelDor", SubTypeSet.CreatureType, true),
KIRIN("Kirin", SubTypeSet.CreatureType, false), KIRIN("Kirin", SubTypeSet.CreatureType),
KITHKIN("Kithkin", SubTypeSet.CreatureType, false), KITHKIN("Kithkin", SubTypeSet.CreatureType),
KNIGHT("Knight", SubTypeSet.CreatureType, false), KNIGHT("Knight", SubTypeSet.CreatureType),
KOBOLD("Kobold", SubTypeSet.CreatureType, false), KOBOLD("Kobold", SubTypeSet.CreatureType),
KOORIVAR("Koorivar", SubTypeSet.CreatureType, true), KOORIVAR("Koorivar", SubTypeSet.CreatureType, true),
KOR("Kor", SubTypeSet.CreatureType, false), KOR("Kor", SubTypeSet.CreatureType),
KRAKEN("Kraken", SubTypeSet.CreatureType, false), KRAKEN("Kraken", SubTypeSet.CreatureType),
// L // L
LAMIA("Lamia", SubTypeSet.CreatureType, false), LAMIA("Lamia", SubTypeSet.CreatureType),
LAMMASU("Lammasu", SubTypeSet.CreatureType, false), LAMMASU("Lammasu", SubTypeSet.CreatureType),
LEECH("Leech", SubTypeSet.CreatureType, false), LEECH("Leech", SubTypeSet.CreatureType),
LEVIATHAN("Leviathan", SubTypeSet.CreatureType, false), LEVIATHAN("Leviathan", SubTypeSet.CreatureType),
LHURGOYF("Lhurgoyf", SubTypeSet.CreatureType, false), LHURGOYF("Lhurgoyf", SubTypeSet.CreatureType),
LICID("Licid", SubTypeSet.CreatureType, false), LICID("Licid", SubTypeSet.CreatureType),
LIZARD("Lizard", SubTypeSet.CreatureType, false), LIZARD("Lizard", SubTypeSet.CreatureType),
// M // M
MANTELLIAN("Mantellian", SubTypeSet.CreatureType, true), // Star Wars MANTELLIAN("Mantellian", SubTypeSet.CreatureType, true), // Star Wars
MANTICORE("Manticore", SubTypeSet.CreatureType, false), MANTICORE("Manticore", SubTypeSet.CreatureType),
MASTICORE("Masticore", SubTypeSet.CreatureType, false), MASTICORE("Masticore", SubTypeSet.CreatureType),
MERCENARY("Mercenary", SubTypeSet.CreatureType, false), MERCENARY("Mercenary", SubTypeSet.CreatureType),
MERFOLK("Merfolk", SubTypeSet.CreatureType, false), MERFOLK("Merfolk", SubTypeSet.CreatureType),
METATHRAN("Metathran", SubTypeSet.CreatureType, false), METATHRAN("Metathran", SubTypeSet.CreatureType),
MINION("Minion", SubTypeSet.CreatureType, false), MINION("Minion", SubTypeSet.CreatureType),
MINOTAUR("Minotaur", SubTypeSet.CreatureType, false), MINOTAUR("Minotaur", SubTypeSet.CreatureType),
MIRIALAN("Mirialan", SubTypeSet.CreatureType, true), // Star Wars MIRIALAN("Mirialan", SubTypeSet.CreatureType, true), // Star Wars
MOLE("Mole", SubTypeSet.CreatureType, false), MOLE("Mole", SubTypeSet.CreatureType),
MONGER("Monger", SubTypeSet.CreatureType, false), MONGER("Monger", SubTypeSet.CreatureType),
MONGOOSE("Mongoose", SubTypeSet.CreatureType, false), MONGOOSE("Mongoose", SubTypeSet.CreatureType),
MONK("Monk", SubTypeSet.CreatureType, false), MONK("Monk", SubTypeSet.CreatureType),
MONKEY("Monkey", SubTypeSet.CreatureType, false), MONKEY("Monkey", SubTypeSet.CreatureType),
MOONFOLK("Moonfolk", SubTypeSet.CreatureType, false), MOONFOLK("Moonfolk", SubTypeSet.CreatureType),
MUTANT("Mutant", SubTypeSet.CreatureType, false), MUTANT("Mutant", SubTypeSet.CreatureType),
MYR("Myr", SubTypeSet.CreatureType, false), MYR("Myr", SubTypeSet.CreatureType),
MYSTIC("Mystic", SubTypeSet.CreatureType, false), MYSTIC("Mystic", SubTypeSet.CreatureType),
// N // N
NAGA("Naga", SubTypeSet.CreatureType, false), NAGA("Naga", SubTypeSet.CreatureType),
NAUTILUS("Nautilus", SubTypeSet.CreatureType, false), NAUTILUS("Nautilus", SubTypeSet.CreatureType),
NAUTOLAN("Nautolan", SubTypeSet.CreatureType, true), // Star Wars NAUTOLAN("Nautolan", SubTypeSet.CreatureType, true), // Star Wars
NEIMOIDIAN("Neimoidian", SubTypeSet.CreatureType, true), // Star Wars NEIMOIDIAN("Neimoidian", SubTypeSet.CreatureType, true), // Star Wars
NEPHILIM("Nephilim", SubTypeSet.CreatureType, false), NEPHILIM("Nephilim", SubTypeSet.CreatureType),
NIGHTMARE("Nightmare", SubTypeSet.CreatureType, false), NIGHTMARE("Nightmare", SubTypeSet.CreatureType),
NIGHTSTALKER("Nightstalker", SubTypeSet.CreatureType, false), NIGHTSTALKER("Nightstalker", SubTypeSet.CreatureType),
NINJA("Ninja", SubTypeSet.CreatureType, false), NINJA("Ninja", SubTypeSet.CreatureType),
NOGGLE("Noggle", SubTypeSet.CreatureType, false), NOGGLE("Noggle", SubTypeSet.CreatureType),
NOMAD("Nomad", SubTypeSet.CreatureType, false), NOMAD("Nomad", SubTypeSet.CreatureType),
NYMPH("Nymph", SubTypeSet.CreatureType, false), NYMPH("Nymph", SubTypeSet.CreatureType),
// O // O
OCTOPUS("Octopus", SubTypeSet.CreatureType, false), OCTOPUS("Octopus", SubTypeSet.CreatureType),
OGRE("Ogre", SubTypeSet.CreatureType, false), OGRE("Ogre", SubTypeSet.CreatureType),
OOZE("Ooze", SubTypeSet.CreatureType, false), OOZE("Ooze", SubTypeSet.CreatureType),
ORB("Orb", SubTypeSet.CreatureType, false), ORB("Orb", SubTypeSet.CreatureType),
ORC("Orc", SubTypeSet.CreatureType, false), ORC("Orc", SubTypeSet.CreatureType),
ORGG("Orgg", SubTypeSet.CreatureType, false), ORGG("Orgg", SubTypeSet.CreatureType),
ORTOLAN("Ortolan", SubTypeSet.CreatureType, true), ORTOLAN("Ortolan", SubTypeSet.CreatureType, true),
OUPHE("Ouphe", SubTypeSet.CreatureType, false), OUPHE("Ouphe", SubTypeSet.CreatureType),
OX("Ox", SubTypeSet.CreatureType, false), OX("Ox", SubTypeSet.CreatureType),
OYSTER("Oyster", SubTypeSet.CreatureType, false), OYSTER("Oyster", SubTypeSet.CreatureType),
// P // P
PEGASUS("Pegasus", SubTypeSet.CreatureType, false), PEGASUS("Pegasus", SubTypeSet.CreatureType),
PENTAVITE("Pentavite", SubTypeSet.CreatureType, false), PENTAVITE("Pentavite", SubTypeSet.CreatureType),
PEST("Pest", SubTypeSet.CreatureType, false), PEST("Pest", SubTypeSet.CreatureType),
PHELDDAGRIF("Phelddagrif", SubTypeSet.CreatureType, false), PHELDDAGRIF("Phelddagrif", SubTypeSet.CreatureType),
PHOENIX("Phoenix", SubTypeSet.CreatureType, false), PHOENIX("Phoenix", SubTypeSet.CreatureType),
PILOT("Pilot", SubTypeSet.CreatureType, false), PILOT("Pilot", SubTypeSet.CreatureType),
PINCHER("Pincher", SubTypeSet.CreatureType, false), PINCHER("Pincher", SubTypeSet.CreatureType),
PIRATE("Pirate", SubTypeSet.CreatureType, false), PIRATE("Pirate", SubTypeSet.CreatureType),
PLANT("Plant", SubTypeSet.CreatureType, false), PLANT("Plant", SubTypeSet.CreatureType),
PRAETOR("Praetor", SubTypeSet.CreatureType, false), PRAETOR("Praetor", SubTypeSet.CreatureType),
PRISM("Prism", SubTypeSet.CreatureType, false), PRISM("Prism", SubTypeSet.CreatureType),
PROCESSOR("Processor", SubTypeSet.CreatureType, false), PROCESSOR("Processor", SubTypeSet.CreatureType),
PUREBLOOD("Pureblood", SubTypeSet.CreatureType, true), PUREBLOOD("Pureblood", SubTypeSet.CreatureType, true),
// Q // Q
QUARREN("Quarren", SubTypeSet.CreatureType, true), // Star Wars QUARREN("Quarren", SubTypeSet.CreatureType, true), // Star Wars
// R // R
RABBIT("Rabbit", SubTypeSet.CreatureType, false), RABBIT("Rabbit", SubTypeSet.CreatureType),
RAT("Rat", SubTypeSet.CreatureType, false), RAT("Rat", SubTypeSet.CreatureType),
REBEL("Rebel", SubTypeSet.CreatureType, false), REBEL("Rebel", SubTypeSet.CreatureType),
REFLECTION("Reflection", SubTypeSet.CreatureType, false), REFLECTION("Reflection", SubTypeSet.CreatureType),
RHINO("Rhino", SubTypeSet.CreatureType, false), RHINO("Rhino", SubTypeSet.CreatureType),
RIGGER("Rigger", SubTypeSet.CreatureType, false), RIGGER("Rigger", SubTypeSet.CreatureType),
RODIAN("Rodian", SubTypeSet.CreatureType, true), // Star Wars RODIAN("Rodian", SubTypeSet.CreatureType, true), // Star Wars
ROGUE("Rogue", SubTypeSet.CreatureType, false), ROGUE("Rogue", SubTypeSet.CreatureType),
// S // S
SABLE("Sable", SubTypeSet.CreatureType, false), SABLE("Sable", SubTypeSet.CreatureType),
SALAMANDER("Salamander", SubTypeSet.CreatureType, false), SALAMANDER("Salamander", SubTypeSet.CreatureType),
SAMURAI("Samurai", SubTypeSet.CreatureType, false), SAMURAI("Samurai", SubTypeSet.CreatureType),
SAND("Sand", SubTypeSet.CreatureType, false), SAND("Sand", SubTypeSet.CreatureType),
SAPROLING("Saproling", SubTypeSet.CreatureType, false), SAPROLING("Saproling", SubTypeSet.CreatureType),
SATYR("Satyr", SubTypeSet.CreatureType, false), SATYR("Satyr", SubTypeSet.CreatureType),
SCARECROW("Scarecrow", SubTypeSet.CreatureType, false), SCARECROW("Scarecrow", SubTypeSet.CreatureType),
SCION("Scion", SubTypeSet.CreatureType, false), SCION("Scion", SubTypeSet.CreatureType),
SCORPION("Scorpion", SubTypeSet.CreatureType, false), SCORPION("Scorpion", SubTypeSet.CreatureType),
SCOUT("Scout", SubTypeSet.CreatureType, false), SCOUT("Scout", SubTypeSet.CreatureType),
SERF("Serf", SubTypeSet.CreatureType, false), SERF("Serf", SubTypeSet.CreatureType),
SERPENT("Serpent", SubTypeSet.CreatureType, false), SERPENT("Serpent", SubTypeSet.CreatureType),
SERVO("Servo", SubTypeSet.CreatureType, false), SERVO("Servo", SubTypeSet.CreatureType),
SHADE("Shade", SubTypeSet.CreatureType, false), SHADE("Shade", SubTypeSet.CreatureType),
SHAMAN("Shaman", SubTypeSet.CreatureType, false), SHAMAN("Shaman", SubTypeSet.CreatureType),
SHAPESHIFTER("Shapeshifter", SubTypeSet.CreatureType, false), SHAPESHIFTER("Shapeshifter", SubTypeSet.CreatureType),
SHEEP("Sheep", SubTypeSet.CreatureType, false), SHEEP("Sheep", SubTypeSet.CreatureType),
SIREN("Siren", SubTypeSet.CreatureType, false), SIREN("Siren", SubTypeSet.CreatureType),
SITH("Sith", SubTypeSet.CreatureType, false), SITH("Sith", SubTypeSet.CreatureType),
SKELETON("Skeleton", SubTypeSet.CreatureType, false), SKELETON("Skeleton", SubTypeSet.CreatureType),
SLITH("Slith", SubTypeSet.CreatureType, false), SLITH("Slith", SubTypeSet.CreatureType),
SLIVER("Sliver", SubTypeSet.CreatureType, false), SLIVER("Sliver", SubTypeSet.CreatureType),
SLUG("Slug", SubTypeSet.CreatureType, false), SLUG("Slug", SubTypeSet.CreatureType),
SNAKE("Snake", SubTypeSet.CreatureType, false), SNAKE("Snake", SubTypeSet.CreatureType),
SOLDIER("Soldier", SubTypeSet.CreatureType, false), SOLDIER("Soldier", SubTypeSet.CreatureType),
SOLTARI("Soltari", SubTypeSet.CreatureType, false), SOLTARI("Soltari", SubTypeSet.CreatureType),
SPAWN("Spawn", SubTypeSet.CreatureType, false), SPAWN("Spawn", SubTypeSet.CreatureType),
SPECTER("Specter", SubTypeSet.CreatureType, false), SPECTER("Specter", SubTypeSet.CreatureType),
SPELLSHAPER("Spellshaper", SubTypeSet.CreatureType, false), SPELLSHAPER("Spellshaper", SubTypeSet.CreatureType),
SPHINX("Sphinx", SubTypeSet.CreatureType, false), SPHINX("Sphinx", SubTypeSet.CreatureType),
SPIDER("Spider", SubTypeSet.CreatureType, false), SPIDER("Spider", SubTypeSet.CreatureType),
SPIKE("Spike", SubTypeSet.CreatureType, false), SPIKE("Spike", SubTypeSet.CreatureType),
SPIRIT("Spirit", SubTypeSet.CreatureType, false), SPIRIT("Spirit", SubTypeSet.CreatureType),
SPLITTER("Splitter", SubTypeSet.CreatureType, false), SPLITTER("Splitter", SubTypeSet.CreatureType),
SPONGE("Sponge", SubTypeSet.CreatureType, false), SPONGE("Sponge", SubTypeSet.CreatureType),
SQUID("Squid", SubTypeSet.CreatureType, false), SQUID("Squid", SubTypeSet.CreatureType),
SQUIRREL("Squirrel", SubTypeSet.CreatureType, false), SQUIRREL("Squirrel", SubTypeSet.CreatureType),
STARFISH("Starfish", SubTypeSet.CreatureType, false), STARFISH("Starfish", SubTypeSet.CreatureType),
STARSHIP("Starship", SubTypeSet.CreatureType, true), // Star Wars STARSHIP("Starship", SubTypeSet.CreatureType, true), // Star Wars
SULLUSTAN("Sullustan", SubTypeSet.CreatureType, true), // Star Wars SULLUSTAN("Sullustan", SubTypeSet.CreatureType, true), // Star Wars
SURRAKAR("Surrakar", SubTypeSet.CreatureType, false), SURRAKAR("Surrakar", SubTypeSet.CreatureType),
SURVIVOR("Survivor", SubTypeSet.CreatureType, false), SURVIVOR("Survivor", SubTypeSet.CreatureType),
// T // T
TETRAVITE("Tetravite", SubTypeSet.CreatureType, false), TETRAVITE("Tetravite", SubTypeSet.CreatureType),
THALAKOS("Thalakos", SubTypeSet.CreatureType, false), THALAKOS("Thalakos", SubTypeSet.CreatureType),
THOPTER("Thopter", SubTypeSet.CreatureType, false), THOPTER("Thopter", SubTypeSet.CreatureType),
TRANDOSHAN("Trandoshan", SubTypeSet.CreatureType, true), // Star Wars TRANDOSHAN("Trandoshan", SubTypeSet.CreatureType, true), // Star Wars
THRULL("Thrull", SubTypeSet.CreatureType, false), THRULL("Thrull", SubTypeSet.CreatureType),
TREEFOLK("Treefolk", SubTypeSet.CreatureType, false), TREEFOLK("Treefolk", SubTypeSet.CreatureType),
TRISKELAVITE("Triskelavite", SubTypeSet.CreatureType, false), TRISKELAVITE("Triskelavite", SubTypeSet.CreatureType),
TROLL("Troll", SubTypeSet.CreatureType, false), TROLL("Troll", SubTypeSet.CreatureType),
TURTLE("Turtle", SubTypeSet.CreatureType, false), TURTLE("Turtle", SubTypeSet.CreatureType),
TROOPER("Trooper", SubTypeSet.CreatureType, true), // Star Wars TROOPER("Trooper", SubTypeSet.CreatureType, true), // Star Wars
TWILEK("Twi'lek", SubTypeSet.CreatureType, true), // Star Wars TWILEK("Twi'lek", SubTypeSet.CreatureType, true), // Star Wars
// U // U
UGNAUGHT("Ugnaught", SubTypeSet.CreatureType, true), UGNAUGHT("Ugnaught", SubTypeSet.CreatureType, true),
UNICORN("Unicorn", SubTypeSet.CreatureType, false), UNICORN("Unicorn", SubTypeSet.CreatureType),
//V //V
VAMPIRE("Vampire", SubTypeSet.CreatureType, false), VAMPIRE("Vampire", SubTypeSet.CreatureType),
VEDALKEN("Vedalken", SubTypeSet.CreatureType, false), VEDALKEN("Vedalken", SubTypeSet.CreatureType),
VIASHINO("Viashino", SubTypeSet.CreatureType, false), VIASHINO("Viashino", SubTypeSet.CreatureType),
VOLVER("Volver", SubTypeSet.CreatureType, false), VOLVER("Volver", SubTypeSet.CreatureType),
//W //W
WALL("Wall", SubTypeSet.CreatureType, false), WALL("Wall", SubTypeSet.CreatureType),
WARRIOR("Warrior", SubTypeSet.CreatureType, false), WARRIOR("Warrior", SubTypeSet.CreatureType),
WEEQUAY("Weequay", SubTypeSet.CreatureType, true), WEEQUAY("Weequay", SubTypeSet.CreatureType, true),
WEIRD("Weird", SubTypeSet.CreatureType, false), WEIRD("Weird", SubTypeSet.CreatureType),
WEREWOLF("Werewolf", SubTypeSet.CreatureType, false), WEREWOLF("Werewolf", SubTypeSet.CreatureType),
WHALE("Whale", SubTypeSet.CreatureType, false), WHALE("Whale", SubTypeSet.CreatureType),
WIZARD("Wizard", SubTypeSet.CreatureType, false), WIZARD("Wizard", SubTypeSet.CreatureType),
WOLF("Wolf", SubTypeSet.CreatureType, false), WOLF("Wolf", SubTypeSet.CreatureType),
WOLVERINE("Wolverine", SubTypeSet.CreatureType, false), WOLVERINE("Wolverine", SubTypeSet.CreatureType),
WOMBAT("Wombat", SubTypeSet.CreatureType, false), WOMBAT("Wombat", SubTypeSet.CreatureType),
WOOKIEE("Wookiee", SubTypeSet.CreatureType, true), // Star Wars WOOKIEE("Wookiee", SubTypeSet.CreatureType, true), // Star Wars
WORM("Worm", SubTypeSet.CreatureType, false), WORM("Worm", SubTypeSet.CreatureType),
WRAITH("Wraith", SubTypeSet.CreatureType, false), WRAITH("Wraith", SubTypeSet.CreatureType),
WURM("Wurm", SubTypeSet.CreatureType, false), WURM("Wurm", SubTypeSet.CreatureType),
// Y // Y
YETI("Yeti", SubTypeSet.CreatureType, false), YETI("Yeti", SubTypeSet.CreatureType),
// Z // Z
ZABRAK("Zabrak", SubTypeSet.CreatureType, true), // Star Wars ZABRAK("Zabrak", SubTypeSet.CreatureType, true), // Star Wars
ZOMBIE("Zombie", SubTypeSet.CreatureType, false), ZOMBIE("Zombie", SubTypeSet.CreatureType),
ZUBERA("Zubera", SubTypeSet.CreatureType, false), ZUBERA("Zubera", SubTypeSet.CreatureType),
// Planeswalker // Planeswalker
AJANI("Ajani", SubTypeSet.PlaneswalkerType, false), AJANI("Ajani", SubTypeSet.PlaneswalkerType),
ARLINN("Arlinn", SubTypeSet.PlaneswalkerType, false), ARLINN("Arlinn", SubTypeSet.PlaneswalkerType),
ASHIOK("Ashiok", SubTypeSet.PlaneswalkerType, false), ASHIOK("Ashiok", SubTypeSet.PlaneswalkerType),
AURRA("Aurra", SubTypeSet.PlaneswalkerType, true), // Star Wars AURRA("Aurra", SubTypeSet.PlaneswalkerType, true), // Star Wars
BOLAS("Bolas", SubTypeSet.PlaneswalkerType, false), BOLAS("Bolas", SubTypeSet.PlaneswalkerType),
CHANDRA("Chandra", SubTypeSet.PlaneswalkerType, false), CHANDRA("Chandra", SubTypeSet.PlaneswalkerType),
DACK("Dack", SubTypeSet.PlaneswalkerType, false), DACK("Dack", SubTypeSet.PlaneswalkerType),
DARETTI("Daretti", SubTypeSet.PlaneswalkerType, false), DARETTI("Daretti", SubTypeSet.PlaneswalkerType),
DOMRI("Domri", SubTypeSet.PlaneswalkerType, false), DOMRI("Domri", SubTypeSet.PlaneswalkerType),
DOOKU("Dooku", SubTypeSet.PlaneswalkerType, true), // Star Wars DOOKU("Dooku", SubTypeSet.PlaneswalkerType, true), // Star Wars
DOVIN("Dovin", SubTypeSet.PlaneswalkerType, false), DOVIN("Dovin", SubTypeSet.PlaneswalkerType),
ELSPETH("Elspeth", SubTypeSet.PlaneswalkerType, false), ELSPETH("Elspeth", SubTypeSet.PlaneswalkerType),
FREYALISE("Freyalise", SubTypeSet.PlaneswalkerType, false), FREYALISE("Freyalise", SubTypeSet.PlaneswalkerType),
GARRUK("Garruk", SubTypeSet.PlaneswalkerType, false), GARRUK("Garruk", SubTypeSet.PlaneswalkerType),
GIDEON("Gideon", SubTypeSet.PlaneswalkerType, false), GIDEON("Gideon", SubTypeSet.PlaneswalkerType),
HUATLI("Huatli", SubTypeSet.PlaneswalkerType, false), HUATLI("Huatli", SubTypeSet.PlaneswalkerType),
JACE("Jace", SubTypeSet.PlaneswalkerType, false), JACE("Jace", SubTypeSet.PlaneswalkerType),
KARN("Karn", SubTypeSet.PlaneswalkerType, false), KARN("Karn", SubTypeSet.PlaneswalkerType),
KAYA("Kaya", SubTypeSet.PlaneswalkerType, false), KAYA("Kaya", SubTypeSet.PlaneswalkerType),
KIORA("Kiora", SubTypeSet.PlaneswalkerType, false), KIORA("Kiora", SubTypeSet.PlaneswalkerType),
KOTH("Koth", SubTypeSet.PlaneswalkerType, false), KOTH("Koth", SubTypeSet.PlaneswalkerType),
LILIANA("Liliana", SubTypeSet.PlaneswalkerType, false), LILIANA("Liliana", SubTypeSet.PlaneswalkerType),
NAHIRI("Nahiri", SubTypeSet.PlaneswalkerType, false), NAHIRI("Nahiri", SubTypeSet.PlaneswalkerType),
NARSET("Narset", SubTypeSet.PlaneswalkerType, false), NARSET("Narset", SubTypeSet.PlaneswalkerType),
NISSA("Nissa", SubTypeSet.PlaneswalkerType, false), NISSA("Nissa", SubTypeSet.PlaneswalkerType),
NIXILIS("Nixilis", SubTypeSet.PlaneswalkerType, false), NIXILIS("Nixilis", SubTypeSet.PlaneswalkerType),
OBI_WAN("Obi-Wan", SubTypeSet.PlaneswalkerType, true), // Star Wars OBI_WAN("Obi-Wan", SubTypeSet.PlaneswalkerType, true), // Star Wars
RAL("Ral", SubTypeSet.PlaneswalkerType, false), RAL("Ral", SubTypeSet.PlaneswalkerType),
SAHEELI("Saheeli", SubTypeSet.PlaneswalkerType, false), SAHEELI("Saheeli", SubTypeSet.PlaneswalkerType),
SAMUT("Samut", SubTypeSet.PlaneswalkerType, false), SAMUT("Samut", SubTypeSet.PlaneswalkerType),
SARKHAN("Sarkhan", SubTypeSet.PlaneswalkerType, false), SARKHAN("Sarkhan", SubTypeSet.PlaneswalkerType),
SIDIOUS("Sidious", SubTypeSet.PlaneswalkerType, true), // Star Wars SIDIOUS("Sidious", SubTypeSet.PlaneswalkerType, true), // Star Wars
SORIN("Sorin", SubTypeSet.PlaneswalkerType, false), SORIN("Sorin", SubTypeSet.PlaneswalkerType),
TAMIYO("Tamiyo", SubTypeSet.PlaneswalkerType, false), TAMIYO("Tamiyo", SubTypeSet.PlaneswalkerType),
TEFERI("Teferi", SubTypeSet.PlaneswalkerType, false), TEFERI("Teferi", SubTypeSet.PlaneswalkerType),
TEZZERET("Tezzeret", SubTypeSet.PlaneswalkerType, false), TEZZERET("Tezzeret", SubTypeSet.PlaneswalkerType),
TIBALT("Tibalt", SubTypeSet.PlaneswalkerType, false), TIBALT("Tibalt", SubTypeSet.PlaneswalkerType),
UGIN("Ugin", SubTypeSet.PlaneswalkerType, false), UGIN("Ugin", SubTypeSet.PlaneswalkerType),
VENSER("Venser", SubTypeSet.PlaneswalkerType, false), VENSER("Venser", SubTypeSet.PlaneswalkerType),
VRASKA("Vraska", SubTypeSet.PlaneswalkerType, false), VRASKA("Vraska", SubTypeSet.PlaneswalkerType),
XENAGOS("Xenagos", SubTypeSet.PlaneswalkerType, false), XENAGOS("Xenagos", SubTypeSet.PlaneswalkerType),
YODA("Yoda", SubTypeSet.PlaneswalkerType, true); // Star Wars YODA("Yoda", SubTypeSet.PlaneswalkerType, true); // Star Wars
private final SubTypeSet subTypeSet; private final SubTypeSet subTypeSet;
SubType(String description, SubTypeSet subTypeSet) {
this(description, subTypeSet, false);
}
SubType(String description, SubTypeSet subTypeSet, boolean customSet) {
this.description = description;
this.subTypeSet = subTypeSet;
this.customSet = customSet;
}
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -404,12 +418,6 @@ public enum SubType {
return description; return description;
} }
SubType(String description, SubTypeSet subTypeSet, boolean customSet) {
this.description = description;
this.subTypeSet = subTypeSet;
this.customSet = customSet;
}
public static SubType byDescription(String subType) { public static SubType byDescription(String subType) {
for (SubType s : values()) { for (SubType s : values()) {
if (s.getDescription().equals(subType)) { if (s.getDescription().equals(subType)) {
@ -434,7 +442,10 @@ public enum SubType {
} }
public static Set<SubType> getBasicLands(boolean customSet) { public static Set<SubType> getBasicLands(boolean customSet) {
return Arrays.stream(values()).filter(s -> s.customSet == customSet).filter(p -> p.getSubTypeSet() == SubTypeSet.BasicLandType).collect(Collectors.toSet()); return Arrays.stream(values())
.filter(p -> p.getSubTypeSet() == SubTypeSet.BasicLandType)
.filter(s -> s.customSet == customSet)
.collect(Collectors.toSet());
} }
public static SubTypeList getLandTypes(boolean customSet) { public static SubTypeList getLandTypes(boolean customSet) {

View file

@ -1,20 +1,27 @@
package mage.util; package mage.util;
import mage.constants.SubType;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import mage.constants.SubType;
public class SubTypeList extends ArrayList<SubType> { public class SubTypeList extends ArrayList<SubType> {
@Deprecated
public boolean addAll(List<String> subtypes) { public boolean addAll(List<String> subtypes) {
return addAll(subtypes.stream().map(SubType::byDescription).collect(Collectors.toList())); return addAll(subtypes.stream()
.map(SubType::byDescription)
.collect(Collectors.toList()));
} }
@Deprecated
public boolean removeAll(List<String> subtypes){ public boolean removeAll(List<String> subtypes){
return removeAll(subtypes.stream().map(SubType::byDescription).collect(Collectors.toList())); return removeAll(subtypes.stream()
.map(SubType::byDescription)
.collect(Collectors.toList()));
} }
@ -22,10 +29,17 @@ public class SubTypeList extends ArrayList<SubType> {
return Collections.addAll(this, subTypes); return Collections.addAll(this, subTypes);
} }
public boolean removeAll(SubType... subTypes) {
return super.removeAll(Arrays.stream(subTypes)
.collect(Collectors.toList()));
}
@Deprecated
public boolean add(String s) { public boolean add(String s) {
return add(SubType.byDescription(s)); return add(SubType.byDescription(s));
} }
@Deprecated
public boolean contains(String s) { public boolean contains(String s) {
return contains(SubType.byDescription(s)); return contains(SubType.byDescription(s));
} }