diff --git a/forge-core/src/main/java/forge/card/CardType.java b/forge-core/src/main/java/forge/card/CardType.java index 57186ba0be0..3f2fe85c337 100644 --- a/forge-core/src/main/java/forge/card/CardType.java +++ b/forge-core/src/main/java/forge/card/CardType.java @@ -199,6 +199,10 @@ public final class CardType implements Comparable, CardTypeView { if (subtypes.contains(t)) { return true; } + char firstChar = t.charAt(0); + if (Character.isLowerCase(firstChar)) { + t = Character.toUpperCase(firstChar) + t.substring(1); //ensure string is proper case for enum types + } CoreType type = stringToCoreType.get(t); if (type != null) { return hasType(type); diff --git a/forge-game/src/main/java/forge/game/spellability/SpellAbilityRestriction.java b/forge-game/src/main/java/forge/game/spellability/SpellAbilityRestriction.java index 9c46b2b959e..f0ecf0206e1 100644 --- a/forge-game/src/main/java/forge/game/spellability/SpellAbilityRestriction.java +++ b/forge-game/src/main/java/forge/game/spellability/SpellAbilityRestriction.java @@ -292,7 +292,6 @@ public class SpellAbilityRestriction extends SpellAbilityVariables { } public final boolean checkOtherRestrictions(final Card c, final SpellAbility sa, final Player activator) { - final Game game = activator.getGame(); if (this.getCardsInHand() != -1) { @@ -398,7 +397,6 @@ public class SpellAbilityRestriction extends SpellAbilityVariables { if (!Expressions.compare(svarValue, this.getsVarOperator(), operandValue)) { return false; } - } if (this.getsVarToCheck() != null) { @@ -408,7 +406,6 @@ public class SpellAbilityRestriction extends SpellAbilityVariables { if (!Expressions.compare(svarValue, this.getsVarOperator(), operandValue)) { return false; } - } return true; } diff --git a/forge-gui/src/main/java/forge/match/input/InputSelectTargets.java b/forge-gui/src/main/java/forge/match/input/InputSelectTargets.java index 57c42a42ac0..dda14915e4d 100644 --- a/forge-gui/src/main/java/forge/match/input/InputSelectTargets.java +++ b/forge-gui/src/main/java/forge/match/input/InputSelectTargets.java @@ -104,9 +104,8 @@ public final class InputSelectTargets extends InputSyncronizedBase { if (!tgt.isUniqueTargets() && targetDepth.containsKey(card)) { return false; } - - // leave this in temporarily, there some seriously wrong things going on here - // Can be targeted doesn't check if the target is a valid type, only if a card is generally "targetable" + + //If the card is not a valid target if (!card.canBeTargetedBy(sa)) { showMessage(sa.getHostCard() + " - Cannot target this card (Shroud? Protection? Restrictions)."); return false;