- Fixed NotEnchantedBy broken in my previous commit

This commit is contained in:
moomarc
2012-12-06 11:31:43 +00:00
parent 3011758bd9
commit bb303333a7

View File

@@ -6438,8 +6438,7 @@ public class Card extends GameEntity implements Comparable<Card> {
return false; return false;
} }
} else if (property.startsWith("NotEnchantedBy")) { } else if (property.startsWith("NotEnchantedBy")) {
final String rest = property.split("NotEnchantedBy")[1]; if (property.substring(14).equals("Targeted")) {
if (rest.equals("Targeted")) {
for (final SpellAbility sa : source.getCharacteristics().getSpellAbility()) { for (final SpellAbility sa : source.getCharacteristics().getSpellAbility()) {
final SpellAbility saTargeting = sa.getSATargetingCard(); final SpellAbility saTargeting = sa.getSATargetingCard();
if (saTargeting != null) { if (saTargeting != null) {
@@ -6464,9 +6463,7 @@ public class Card extends GameEntity implements Comparable<Card> {
return false; return false;
} }
} else if (property.startsWith("CanBeEnchantedBy")) { } else if (property.startsWith("CanBeEnchantedBy")) {
Card aura = source; if (property.substring(16).equals("Targeted")) {
final String rest = property.split("CanBeEnchantedBy")[1];
if (rest.equals("Targeted")) {
for (final SpellAbility sa : source.getCharacteristics().getSpellAbility()) { for (final SpellAbility sa : source.getCharacteristics().getSpellAbility()) {
final SpellAbility saTargeting = sa.getSATargetingCard(); final SpellAbility saTargeting = sa.getSATargetingCard();
if (saTargeting != null) { if (saTargeting != null) {