diff --git a/Mage/src/mage/abilities/effects/common/CantTargetControlledEffect.java b/Mage/src/mage/abilities/effects/common/CantTargetEffect.java similarity index 87% rename from Mage/src/mage/abilities/effects/common/CantTargetControlledEffect.java rename to Mage/src/mage/abilities/effects/common/CantTargetEffect.java index f7fd9672c6..5e7e4149cb 100644 --- a/Mage/src/mage/abilities/effects/common/CantTargetControlledEffect.java +++ b/Mage/src/mage/abilities/effects/common/CantTargetEffect.java @@ -46,23 +46,23 @@ import mage.game.stack.StackObject; * * @author BetaSteward_at_googlemail.com */ -public class CantTargetControlledEffect extends ReplacementEffectImpl { +public class CantTargetEffect extends ReplacementEffectImpl { private FilterPermanent filterTarget; private FilterStackObject filterSource; - public CantTargetControlledEffect(FilterPermanent filterTarget, FilterStackObject filterSource, Duration duration) { + public CantTargetEffect(FilterPermanent filterTarget, FilterStackObject filterSource, Duration duration) { super(duration, Outcome.Benefit); this.filterTarget = filterTarget; this.filterSource = filterSource; setText(); } - public CantTargetControlledEffect(FilterPermanent filterTarget, Duration duration) { + public CantTargetEffect(FilterPermanent filterTarget, Duration duration) { this(filterTarget, null, duration); } - public CantTargetControlledEffect(final CantTargetControlledEffect effect) { + public CantTargetEffect(final CantTargetEffect effect) { super(effect); if (effect.filterTarget != null) this.filterTarget = effect.filterTarget.copy(); @@ -71,8 +71,8 @@ public class CantTargetControlledEffect extends ReplacementEffectImpl { +public class FilterSpell extends FilterStackObject { public FilterSpell() { super("spell"); @@ -47,6 +50,14 @@ public class FilterSpell extends FilterStackObject { public FilterSpell(final FilterSpell filter) { super(filter); } + + @Override + public boolean match(StackObject stackObject, UUID playerId, Game game) { + if (!(stackObject instanceof Spell)) { + return false; + } + return super.match(stackObject, playerId, game); + } @Override public FilterSpell copy() {