From a683146aba4ce6c668606a2b4b14b5b9abd4ab25 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 21 Jun 2019 08:13:36 -0400 Subject: [PATCH] Implemented Winged Words --- Mage.Sets/src/mage/cards/w/WingedWords.java | 50 +++++++++++++++++++++ Mage.Sets/src/mage/sets/CoreSet2020.java | 1 + 2 files changed, 51 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/w/WingedWords.java diff --git a/Mage.Sets/src/mage/cards/w/WingedWords.java b/Mage.Sets/src/mage/cards/w/WingedWords.java new file mode 100644 index 0000000000..146ebf5111 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WingedWords.java @@ -0,0 +1,50 @@ +package mage.cards.w; + +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class WingedWords extends CardImpl { + + private static final FilterControlledPermanent filter + = new FilterControlledPermanent("you control a creature with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public WingedWords(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}"); + + // This spell costs {1} less to cast if you control a creature with flying. + this.addAbility(new SimpleStaticAbility( + Zone.STACK, new SpellCostReductionSourceEffect( + 1, new PermanentsOnTheBattlefieldCondition(filter) + )).setRuleAtTheTop(true)); + + // Draw two cards. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2)); + } + + private WingedWords(final WingedWords card) { + super(card); + } + + @Override + public WingedWords copy() { + return new WingedWords(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CoreSet2020.java b/Mage.Sets/src/mage/sets/CoreSet2020.java index 3904d600b2..52d3e78506 100644 --- a/Mage.Sets/src/mage/sets/CoreSet2020.java +++ b/Mage.Sets/src/mage/sets/CoreSet2020.java @@ -119,6 +119,7 @@ public final class CoreSet2020 extends ExpansionSet { cards.add(new SetCardInfo("Vial of Dragonfire", 241, Rarity.COMMON, mage.cards.v.VialOfDragonfire.class)); cards.add(new SetCardInfo("Voracious Hydra", 200, Rarity.RARE, mage.cards.v.VoraciousHydra.class)); cards.add(new SetCardInfo("Wakeroot Elemental", 202, Rarity.RARE, mage.cards.w.WakerootElemental.class)); + cards.add(new SetCardInfo("Winged Words", 80, Rarity.COMMON, mage.cards.w.WingedWords.class)); cards.add(new SetCardInfo("Wolfkin Bond", 203, Rarity.COMMON, mage.cards.w.WolfkinBond.class)); cards.add(new SetCardInfo("Wolfrider's Saddle", 204, Rarity.UNCOMMON, mage.cards.w.WolfridersSaddle.class)); cards.add(new SetCardInfo("Yarok's Fenlurker", 123, Rarity.UNCOMMON, mage.cards.y.YaroksFenlurker.class));