diff --git a/Mage.Sets/src/mage/cards/g/GreenwardenOfMurasa.java b/Mage.Sets/src/mage/cards/g/GreenwardenOfMurasa.java index 1c3c179b5b..3a2bdfcaaa 100644 --- a/Mage.Sets/src/mage/cards/g/GreenwardenOfMurasa.java +++ b/Mage.Sets/src/mage/cards/g/GreenwardenOfMurasa.java @@ -47,40 +47,4 @@ public final class GreenwardenOfMurasa extends CardImpl { public GreenwardenOfMurasa copy() { return new GreenwardenOfMurasa(this); } -} - -//class GreenwardenOfMurasaEffect extends OneShotEffect { -// -// public GreenwardenOfMurasaEffect() { -// super(Outcome.Benefit); -// this.staticText = "you may exile it. If you do, return target card from your graveyard to your hand"; -// } -// -// public GreenwardenOfMurasaEffect(final GreenwardenOfMurasaEffect effect) { -// super(effect); -// } -// -// @Override -// public GreenwardenOfMurasaEffect copy() { -// return new GreenwardenOfMurasaEffect(this); -// } -// -// @Override -// public boolean apply(Game game, Ability source) { -// Player controller = game.getPlayer(source.getControllerId()); -// MageObject sourceObject = game.getObject(source.getSourceId()); -// Card targetCard = game.getCard(getTargetPointer().getFirst(game, source)); -// if (controller != null && sourceObject != null && targetCard != null) { -// if (controller.chooseUse(outcome, "Exile " + sourceObject.getLogName() + " to return card from your graveyard to your hand?", source, game)) { -// // Setting the fixed target prevents to return Greenwarden of Murasa itself (becuase it's exiled meanwhile), -// // but of course you can target it as the ability triggers I guess -// Effect effect = new ReturnToHandTargetEffect(); -// effect.setTargetPointer(new FixedTarget(targetCard.getId(), targetCard.getZoneChangeCounter(game))); -// new ExileSourceEffect().apply(game, source); -// return effect.apply(game, source); -// } -// return true; -// } -// return false; -// } -//} +} \ No newline at end of file diff --git a/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToHandTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToHandTargetEffect.java index c7b01a71f2..46fdf8631c 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToHandTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ReturnFromGraveyardToHandTargetEffect.java @@ -1,9 +1,10 @@ - package mage.abilities.effects.common; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.Cards; import mage.cards.CardsImpl; import mage.constants.Outcome; import mage.constants.Zone; @@ -34,8 +35,15 @@ public class ReturnFromGraveyardToHandTargetEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - return controller.moveCards(new CardsImpl(getTargetPointer().getTargets(game, source)), Zone.HAND, source, game); + if (controller == null) { + return false; + } + Cards cardsInGraveyard = new CardsImpl(getTargetPointer().getTargets(game, source)); + for (Card card : cardsInGraveyard.getCards(game)) { + if (card != null + && game.getState().getZone(card.getId()) == Zone.GRAVEYARD) { + controller.moveCards(card, Zone.HAND, source, game); //verify the target card is still in the graveyard + } } return false; }