From 04de16bbe7041d72207d388a782b101bd2c46fb2 Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Sun, 31 Mar 2024 13:41:31 +0200 Subject: [PATCH] [OTJ] Implement Annie Flash, the Veteran --- .../mage/cards/a/AnnieFlashTheVeteran.java | 66 +++++++++++++++++++ .../mage/sets/OutlawsOfThunderJunction.java | 1 + 2 files changed, 67 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AnnieFlashTheVeteran.java diff --git a/Mage.Sets/src/mage/cards/a/AnnieFlashTheVeteran.java b/Mage.Sets/src/mage/cards/a/AnnieFlashTheVeteran.java new file mode 100644 index 00000000000..675e5f356ed --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AnnieFlashTheVeteran.java @@ -0,0 +1,66 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BecomesTappedSourceTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.CastFromEverywhereSourceCondition; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.effects.common.ExileTopXMayPlayUntilEffect; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.mageobject.ManaValuePredicate; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author Susucr + */ +public final class AnnieFlashTheVeteran extends CardImpl { + + private static final FilterPermanentCard filter = + new FilterPermanentCard("permanent card with mana value 3 or less from your graveyard"); + + static { + filter.add(new ManaValuePredicate(ComparisonType.OR_LESS, 3)); + } + + public AnnieFlashTheVeteran(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}{W}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // When Annie Flash, the Veteran enters the battlefield, if you cast it, return target permanent card with mana value 3 or less from your graveyard to the battlefield tapped. + Ability ability = new ConditionalInterveningIfTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(true)), + CastFromEverywhereSourceCondition.instance, + "When {this} enters the battlefield, if you cast it, " + + "return target permanent card with mana value 3 or less from your graveyard to the battlefield tapped" + ); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + + // Whenever Annie Flash becomes tapped, exile the top two cards of your library. You may play those cards this turn. + this.addAbility(new BecomesTappedSourceTriggeredAbility(new ExileTopXMayPlayUntilEffect(2, Duration.EndOfTurn))); + } + + private AnnieFlashTheVeteran(final AnnieFlashTheVeteran card) { + super(card); + } + + @Override + public AnnieFlashTheVeteran copy() { + return new AnnieFlashTheVeteran(this); + } +} diff --git a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java index 168210f917a..689e1458a7b 100644 --- a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java +++ b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java @@ -27,6 +27,7 @@ public final class OutlawsOfThunderJunction extends ExpansionSet { this.hasBoosters = false; // temporary cards.add(new SetCardInfo("Abraded Bluffs", 251, Rarity.COMMON, mage.cards.a.AbradedBluffs.class)); + cards.add(new SetCardInfo("Annie Flash, the Veteran", 190, Rarity.MYTHIC, mage.cards.a.AnnieFlashTheVeteran.class)); cards.add(new SetCardInfo("Archangel of Tithes", 2, Rarity.MYTHIC, mage.cards.a.ArchangelOfTithes.class)); cards.add(new SetCardInfo("Archmage's Newt", 39, Rarity.RARE, mage.cards.a.ArchmagesNewt.class)); cards.add(new SetCardInfo("Arid Archway", 252, Rarity.UNCOMMON, mage.cards.a.AridArchway.class));