huge rework on subtypes (#3668)

* huge rework on subtypes

* update for coat of arms

* fix test
This commit is contained in:
ingmargoudt 2017-07-16 23:57:39 +02:00 committed by Jeff Wadsworth
parent 81fb4b5d92
commit 09f0c9ad97
185 changed files with 1068 additions and 906 deletions

View file

@ -40,9 +40,6 @@ import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
import mage.util.functions.CopyTokenFunction;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
/**
@ -54,24 +51,7 @@ public final class CardUtil {
private static final String SOURCE_EXILE_ZONE_TEXT = "SourceExileZone";
static final String[] numberStrings = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
"ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty"};
private static final String[] NON_CHANGELING_SUBTYPES_VALUES = new String[]{
// basic lands subtypes
"Mountain", "Forest", "Plains", "Swamp", "Island",
// Enchantment subtypes
"Aura", "Cartouche", "Curse", "Shrine",
// Artifact subtypes
"Clue", "Equipment", "Fortification", "Contraption", "Vehicle",
// Land subtypes
"Desert", "Gate", "Lair", "Locus", "Urza's", "Mine", "Power-Plant", "Tower",
// Planeswalker subtypes
"Ajani", "Arlinn", "Ashiok", "Bolas", "Chandra", "Dack", "Daretti", "Domri", "Dovin", "Elspeth", "Freyalise", "Garruk", "Gideon", "Jace",
"Karn", "Kiora", "Koth", "Liliana", "Nahiri", "Nissa", "Narset", "Nixilis", "Ral", "Saheeli", "Sarkhan", "Sorin", "Tamiyo", "Teferi",
"Tezzeret", "Tibalt", "Ugin", "Venser", "Vraska", "Xenagos",
// Instant sorcery subtypes
"Trap", "Arcane"};
private static final Set<String> NON_CREATURE_SUBTYPES = new HashSet<>(Arrays.asList(NON_CHANGELING_SUBTYPES_VALUES));
"ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty"};
/**
* Increase spell or ability cost to be paid.
@ -502,12 +482,6 @@ public final class CardUtil {
return "<font color = 'blue'>" + text + "</font>";
}
public static boolean isNonCreatureSubtype(String subtype) {
return NON_CREATURE_SUBTYPES.contains(subtype);
}
public static boolean cardCanBePlayedNow(Card card, UUID playerId, Game game) {
if (card.isLand()) {
return game.canPlaySorcery(playerId) && game.getPlayer(playerId).canPlayLand();