From 7b8dd44e7a64d38c7ee4ac793f62f2fb27cc511d Mon Sep 17 00:00:00 2001 From: bobwoco Date: Fri, 27 Jan 2023 21:07:45 -0600 Subject: [PATCH] Fix Mistmeadow Witch behavior when flickering itself; also fixes #8504 (#9880) Co-authored-by: Ethan Ward --- .../abilities/effects/common/MistmeadowWitchEffect.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/effects/common/MistmeadowWitchEffect.java b/Mage/src/main/java/mage/abilities/effects/common/MistmeadowWitchEffect.java index 24bec4ae22..0f546759df 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/MistmeadowWitchEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/MistmeadowWitchEffect.java @@ -2,12 +2,13 @@ package mage.abilities.effects.common; import mage.abilities.Ability; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.constants.Outcome; -import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import mage.target.targetpointer.FixedTarget; import mage.util.CardUtil; /** @@ -32,7 +33,10 @@ public class MistmeadowWitchEffect extends OneShotEffect { return false; } player.moveCardsToExile(permanent, source, game, true, CardUtil.getExileZoneId(game, source), CardUtil.getSourceName(game, source)); - game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(Zone.BATTLEFIELD, "return the exiled card to the battlefield under its owner's control")), source); + Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, false); + effect.setText("Return the exiled card to the battlefield under its owner's control"); + effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game)); + game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), source); return true; }