From 2022bd9bb1b29c0abffe4474c842386d18bd0357 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 31 Dec 2019 12:11:33 -0500 Subject: [PATCH] Implemented Escape Velocity --- .../src/mage/cards/e/EscapeVelocity.java | 56 +++++++++++++++++++ .../src/mage/sets/TherosBeyondDeath.java | 1 + 2 files changed, 57 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/e/EscapeVelocity.java diff --git a/Mage.Sets/src/mage/cards/e/EscapeVelocity.java b/Mage.Sets/src/mage/cards/e/EscapeVelocity.java new file mode 100644 index 00000000000..b563a99ea86 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EscapeVelocity.java @@ -0,0 +1,56 @@ +package mage.cards.e; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.EscapeAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class EscapeVelocity extends CardImpl { + + public EscapeVelocity(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +1/+0 and has haste. + ability = new SimpleStaticAbility(new BoostEnchantedEffect(1, 0)); + ability.addEffect(new GainAbilityAttachedEffect( + HasteAbility.getInstance(), AttachmentType.AURA, + Duration.WhileOnBattlefield, "and has haste" + )); + this.addAbility(ability); + + // Escape—{1}{R}, Exile two other cards from your graveyard. + this.addAbility(new EscapeAbility(this, "{1}{R}", 2)); + } + + private EscapeVelocity(final EscapeVelocity card) { + super(card); + } + + @Override + public EscapeVelocity copy() { + return new EscapeVelocity(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java index a90269680ed..a505ae7569f 100644 --- a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java +++ b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java @@ -40,6 +40,7 @@ public final class TherosBeyondDeath extends ExpansionSet { cards.add(new SetCardInfo("Elspeth, Sun's Nemesis", 14, Rarity.MYTHIC, mage.cards.e.ElspethSunsNemesis.class)); cards.add(new SetCardInfo("Elspeth, Undaunted Hero", 270, Rarity.MYTHIC, mage.cards.e.ElspethUndauntedHero.class)); cards.add(new SetCardInfo("Erebos, Bleak-Hearted", 93, Rarity.MYTHIC, mage.cards.e.ErebosBleakHearted.class)); + cards.add(new SetCardInfo("Escape Velocity", 132, Rarity.UNCOMMON, mage.cards.e.EscapeVelocity.class)); cards.add(new SetCardInfo("Field of Ruin", 242, Rarity.UNCOMMON, mage.cards.f.FieldOfRuin.class)); cards.add(new SetCardInfo("Forest", 254, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Gallia of the Endless Dance", 217, Rarity.RARE, mage.cards.g.GalliaOfTheEndlessDance.class));