diff --git a/Mage.Sets/src/mage/cards/f/Flicker.java b/Mage.Sets/src/mage/cards/f/Flicker.java index dd16b1d1cb0..7e79eb719fb 100644 --- a/Mage.Sets/src/mage/cards/f/Flicker.java +++ b/Mage.Sets/src/mage/cards/f/Flicker.java @@ -30,7 +30,7 @@ public final class Flicker extends CardImpl { // Exile target nontoken permanent, then return it to the battlefield under its owner's control. this.getSpellAbility().addTarget(new TargetPermanent(filter)); this.getSpellAbility().addEffect(new ExileTargetForSourceEffect()); - this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect()); + this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, true)); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/ControlEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/ControlEnchantedEffect.java index 3b8d579a0c7..d11d5c39470 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/ControlEnchantedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/ControlEnchantedEffect.java @@ -8,6 +8,7 @@ import mage.constants.Outcome; import mage.constants.SubLayer; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.players.Player; /** * @author nantuko @@ -19,7 +20,7 @@ public class ControlEnchantedEffect extends ContinuousEffectImpl { } public ControlEnchantedEffect(String targetDescription) { - super(Duration.WhileOnBattlefield, Outcome.GainControl); + super(Duration.WhileOnBattlefield, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); staticText = "You control enchanted " + targetDescription; } @@ -35,8 +36,10 @@ public class ControlEnchantedEffect extends ContinuousEffectImpl { @Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { Permanent enchantment = game.getPermanent(source.getSourceId()); + Player controllerOfEnchantment = game.getPlayer(source.getControllerId()); if (enchantment != null - && enchantment.getAttachedTo() != null) { + && enchantment.getAttachedTo() != null + && controllerOfEnchantment != null) { Permanent permanent = game.getPermanent(enchantment.getAttachedTo()); if (permanent != null) { switch (layer) { @@ -50,6 +53,8 @@ public class ControlEnchantedEffect extends ContinuousEffectImpl { break; } return true; + } else { //remove effect if the aura or attachedTo permanent or controller of the enchantment is null + discard(); } } return false;