From 2a062e5f56d32fe1f568e91f6b0656da9dfd8ee5 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 10 Jan 2020 23:49:20 -0500 Subject: [PATCH] Implemented Final Flare --- Mage.Sets/src/mage/cards/f/FinalFlare.java | 49 +++++++++++++++++++ .../src/mage/sets/TherosBeyondDeath.java | 1 + 2 files changed, 50 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FinalFlare.java diff --git a/Mage.Sets/src/mage/cards/f/FinalFlare.java b/Mage.Sets/src/mage/cards/f/FinalFlare.java new file mode 100644 index 0000000000..ae5632e4bc --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FinalFlare.java @@ -0,0 +1,49 @@ +package mage.cards.f; + +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FinalFlare extends CardImpl { + + private static final FilterControlledPermanent filter + = new FilterControlledPermanent("a creature or enchantment"); + + static { + filter.add(Predicates.or( + CardType.CREATURE.getPredicate(), + CardType.ENCHANTMENT.getPredicate() + )); + } + + public FinalFlare(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); + + // As an additional cost to cast this spell, sacrifice a creature or enchantment. + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); + + // Final Flare deals 5 damage to target creature. + this.getSpellAbility().addEffect(new DamageTargetEffect(5)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + private FinalFlare(final FinalFlare card) { + super(card); + } + + @Override + public FinalFlare copy() { + return new FinalFlare(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java index 262c8320bc..0ac835d781 100644 --- a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java +++ b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java @@ -91,6 +91,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("Final Flare", 134, Rarity.COMMON, mage.cards.f.FinalFlare.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));