From f9d4c37d2d26b51aeae1f309d628408b517e092d Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sat, 1 Apr 2023 12:12:40 -0400 Subject: [PATCH] [MOM] Implement Errant and Giada --- .../src/mage/cards/e/ErrantAndGiada.java | 65 +++++++++++++++++++ .../src/mage/sets/MarchOfTheMachine.java | 1 + 2 files changed, 66 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/e/ErrantAndGiada.java diff --git a/Mage.Sets/src/mage/cards/e/ErrantAndGiada.java b/Mage.Sets/src/mage/cards/e/ErrantAndGiada.java new file mode 100644 index 0000000000..cacbaecd5f --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/ErrantAndGiada.java @@ -0,0 +1,65 @@ +package mage.cards.e; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.LookAtTopCardOfLibraryAnyTimeEffect; +import mage.abilities.effects.common.continuous.PlayTheTopCardEffect; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ErrantAndGiada extends CardImpl { + + private static final FilterCard filter = new FilterCard("cast spells with flash or flying"); + + static { + filter.add(Predicates.or( + new AbilityPredicate(FlashAbility.class), + new AbilityPredicate(FlyingAbility.class) + )); + } + + public ErrantAndGiada(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{U}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ANGEL); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // You may look at the top card of your library any time. + this.addAbility(new SimpleStaticAbility(new LookAtTopCardOfLibraryAnyTimeEffect())); + + // You may cast spells with flash or flying from the top of your library. + this.addAbility(new SimpleStaticAbility(new PlayTheTopCardEffect(TargetController.YOU, filter, false))); + } + + private ErrantAndGiada(final ErrantAndGiada card) { + super(card); + } + + @Override + public ErrantAndGiada copy() { + return new ErrantAndGiada(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index 73d5a244a7..3eafc92776 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -38,6 +38,7 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Dismal Backwater", 269, Rarity.COMMON, mage.cards.d.DismalBackwater.class)); cards.add(new SetCardInfo("Dusk Legion Duelist", 11, Rarity.RARE, mage.cards.d.DuskLegionDuelist.class)); cards.add(new SetCardInfo("Elspeth's Smite", 13, Rarity.UNCOMMON, mage.cards.e.ElspethsSmite.class)); + cards.add(new SetCardInfo("Errant and Giada", 224, Rarity.RARE, mage.cards.e.ErrantAndGiada.class)); cards.add(new SetCardInfo("Faerie Mastermind", 58, Rarity.RARE, mage.cards.f.FaerieMastermind.class)); cards.add(new SetCardInfo("Fairgrounds Trumpeter", 335, Rarity.COMMON, mage.cards.f.FairgroundsTrumpeter.class)); cards.add(new SetCardInfo("Forest", 281, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));