From 8defedc72ea21fb457b90629fa2f568dd4f7dc86 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 10 Jan 2020 20:25:45 -0500 Subject: [PATCH] Implemented Flicker of Fate --- Mage.Sets/src/mage/cards/f/FlickerOfFate.java | 45 +++++++++++++++++++ .../src/mage/sets/TherosBeyondDeath.java | 1 + 2 files changed, 46 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FlickerOfFate.java diff --git a/Mage.Sets/src/mage/cards/f/FlickerOfFate.java b/Mage.Sets/src/mage/cards/f/FlickerOfFate.java new file mode 100644 index 0000000000..ff89b167fd --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlickerOfFate.java @@ -0,0 +1,45 @@ +package mage.cards.f; + +import mage.abilities.effects.common.ExileTargetForSourceEffect; +import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FlickerOfFate extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("creature or enchantment"); + + static { + filter.add(Predicates.or( + CardType.CREATURE.getPredicate(), + CardType.ENCHANTMENT.getPredicate() + )); + } + + public FlickerOfFate(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}"); + + // Exile target creature or enchantment, then return it to the battlefield under its owner's control. + this.getSpellAbility().addEffect(new ExileTargetForSourceEffect()); + this.getSpellAbility().addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect(true)); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + private FlickerOfFate(final FlickerOfFate card) { + super(card); + } + + @Override + public FlickerOfFate copy() { + return new FlickerOfFate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java index d972fce83c..744297a9b7 100644 --- a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java +++ b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java @@ -89,6 +89,7 @@ public final class TherosBeyondDeath extends ExpansionSet { cards.add(new SetCardInfo("Favored of Iroas", 15, Rarity.UNCOMMON, mage.cards.f.FavoredOfIroas.class)); cards.add(new SetCardInfo("Field of Ruin", 242, Rarity.UNCOMMON, mage.cards.f.FieldOfRuin.class)); cards.add(new SetCardInfo("Final Death", 95, Rarity.COMMON, mage.cards.f.FinalDeath.class)); + cards.add(new SetCardInfo("Flicker of Fate", 16, Rarity.COMMON, mage.cards.f.FlickerOfFate.class)); cards.add(new SetCardInfo("Forest", 254, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Fruit of Tizerus", 96, Rarity.COMMON, mage.cards.f.FruitOfTizerus.class)); cards.add(new SetCardInfo("Funeral Rites", 97, Rarity.COMMON, mage.cards.f.FuneralRites.class));