From 9e24bff19f8b8610e237d55c8167c5c708e461ea Mon Sep 17 00:00:00 2001 From: Neil Gentleman Date: Sat, 15 Oct 2016 20:25:03 -0700 Subject: [PATCH] Resurrection: just use ReturnFromGraveyardToBattlefieldTargetEffect --- Mage.Sets/src/mage/cards/r/Resurrection.java | 40 +------------------- 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/Mage.Sets/src/mage/cards/r/Resurrection.java b/Mage.Sets/src/mage/cards/r/Resurrection.java index 7ac4d2b2170..34d1be82240 100644 --- a/Mage.Sets/src/mage/cards/r/Resurrection.java +++ b/Mage.Sets/src/mage/cards/r/Resurrection.java @@ -28,23 +28,16 @@ package mage.cards.r; import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; -import mage.game.Game; -import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; /** * * @author KholdFuzion - */ public class Resurrection extends CardImpl { @@ -53,7 +46,7 @@ public class Resurrection extends CardImpl { // Return target creature card from your graveyard to the battlefield. - this.getSpellAbility().addEffect(new ResurrectionEffect()); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); } @@ -67,32 +60,3 @@ public class Resurrection extends CardImpl { return new Resurrection(this); } } - -class ResurrectionEffect extends OneShotEffect { - - public ResurrectionEffect() { - super(Outcome.PutCreatureInPlay); - this.staticText = "Return target creature card from your graveyard to the battlefield."; - } - - public ResurrectionEffect(final ResurrectionEffect effect) { - super(effect); - } - - @Override - public ResurrectionEffect copy() { - return new ResurrectionEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Card card = game.getCard(source.getFirstTarget()); - Player player = game.getPlayer(card.getOwnerId()); - if (card != null && player != null) { - card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId()); - return true; - } - - return false; - } -}