From 0a0c7c6895c0039d05b3693786198468dea51203 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 4 Nov 2021 22:04:06 -0400 Subject: [PATCH] [VOW] Implemented Winged Portent --- Mage.Sets/src/mage/cards/w/WingedPortent.java | 58 +++++++++++++++++++ .../src/mage/sets/InnistradCrimsonVow.java | 1 + 2 files changed, 59 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/w/WingedPortent.java diff --git a/Mage.Sets/src/mage/cards/w/WingedPortent.java b/Mage.Sets/src/mage/cards/w/WingedPortent.java new file mode 100644 index 0000000000..b0e5d2c055 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WingedPortent.java @@ -0,0 +1,58 @@ +package mage.cards.w; + +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.abilities.keyword.CleaveAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class WingedPortent extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledCreaturePermanent(); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + private static final DynamicValue xValue1 = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE); + private static final DynamicValue xValue2 = new PermanentsOnBattlefieldCount(filter); + private static final Hint hint1 = new ValueHint("Creatures you control", xValue1); + private static final Hint hint2 = new ValueHint("Creatures you control with flying", xValue2); + + public WingedPortent(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); + + // Cleave {4}{G}{U} + this.addAbility(new CleaveAbility( + this, new DrawCardSourceControllerEffect(xValue1), "{4}{G}{U}" + ).addHint(hint1)); + + // Draw a card for each creature [with flying] you control. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(xValue2) + .setText("draw a card for each creature [with flying] you control")); + this.getSpellAbility().addHint(hint2); + } + + private WingedPortent(final WingedPortent card) { + super(card); + } + + @Override + public WingedPortent copy() { + return new WingedPortent(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java index 9734263e3f..10743efb51 100644 --- a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java +++ b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java @@ -177,6 +177,7 @@ public final class InnistradCrimsonVow extends ExpansionSet { cards.add(new SetCardInfo("Wedding Invitation", 260, Rarity.COMMON, mage.cards.w.WeddingInvitation.class)); cards.add(new SetCardInfo("Wedding Security", 138, Rarity.UNCOMMON, mage.cards.w.WeddingSecurity.class)); cards.add(new SetCardInfo("Whispering Wizard", 88, Rarity.UNCOMMON, mage.cards.w.WhisperingWizard.class)); + cards.add(new SetCardInfo("Winged Portent", 89, Rarity.RARE, mage.cards.w.WingedPortent.class)); cards.add(new SetCardInfo("Wrathful Jailbreaker", 184, Rarity.COMMON, mage.cards.w.WrathfulJailbreaker.class)); cards.add(new SetCardInfo("Wretched Throng", 91, Rarity.COMMON, mage.cards.w.WretchedThrong.class));