[OTJ] Implement Annie Flash, the Veteran

This commit is contained in:
Susucre 2024-03-31 13:41:31 +02:00
parent 29f9d48989
commit 04de16bbe7
2 changed files with 67 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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));