From 58a8e7dc7560597d1abb0e31a58d4ee6eaa4237a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 25 May 2015 17:13:39 +0200 Subject: [PATCH] Added missing implementation of Flicker and Flickering Spirit. --- .../mage/sets/timespiral/FlickeringSpirit.java | 11 +++++++++++ .../src/mage/sets/urzasdestiny/Flicker.java | 18 +++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/timespiral/FlickeringSpirit.java b/Mage.Sets/src/mage/sets/timespiral/FlickeringSpirit.java index 240355f9bd..93e1dbde31 100644 --- a/Mage.Sets/src/mage/sets/timespiral/FlickeringSpirit.java +++ b/Mage.Sets/src/mage/sets/timespiral/FlickeringSpirit.java @@ -29,10 +29,16 @@ package mage.sets.timespiral; import java.util.UUID; import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.constants.Zone; /** * @@ -49,7 +55,12 @@ public class FlickeringSpirit extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); + // {3}{W}: Exile Flickering Spirit, then return it to the battlefield under its owner's control. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(true), new ManaCostsImpl("{3}{W}")); + ability.addEffect(new ReturnToBattlefieldUnderOwnerControlSourceEffect()); + this.addAbility(ability); + } public FlickeringSpirit(final FlickeringSpirit card) { diff --git a/Mage.Sets/src/mage/sets/urzasdestiny/Flicker.java b/Mage.Sets/src/mage/sets/urzasdestiny/Flicker.java index b690ecf5f9..d60bacd520 100644 --- a/Mage.Sets/src/mage/sets/urzasdestiny/Flicker.java +++ b/Mage.Sets/src/mage/sets/urzasdestiny/Flicker.java @@ -28,21 +28,37 @@ package mage.sets.urzasdestiny; import java.util.UUID; +import mage.abilities.effects.common.ExileTargetForSourceEffect; +import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.target.TargetPermanent; /** * * @author LevelX2 */ public class Flicker extends CardImpl { - + + private static final FilterPermanent filter = new FilterPermanent("nontoken permanent"); + + static { + filter.add(Predicates.not(new TokenPredicate())); + } + public Flicker(UUID ownerId) { super(ownerId, 9, "Flicker", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{1}{W}"); this.expansionSetCode = "UDS"; // 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()); + } public Flicker(final Flicker card) {