From 592638b406da5de8489660b7816dae92b8083473 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 18 Sep 2019 19:02:28 -0400 Subject: [PATCH] Implemented Fae of Wishes --- Mage.Sets/src/mage/cards/f/FaeOfWishes.java | 56 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 57 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FaeOfWishes.java diff --git a/Mage.Sets/src/mage/cards/f/FaeOfWishes.java b/Mage.Sets/src/mage/cards/f/FaeOfWishes.java new file mode 100644 index 0000000000..d6aa24c094 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FaeOfWishes.java @@ -0,0 +1,56 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.effects.common.WishEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.AdventureCard; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.target.common.TargetCardInHand; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FaeOfWishes extends AdventureCard { + + public FaeOfWishes(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{1}{U}", "Granted", "{3}{U}"); + + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {1}{U}, Discard two cards: Return Fae of Wishes to its owner's hand. + Ability ability = new SimpleActivatedAbility( + new ReturnToHandSourceEffect(true), new ManaCostsImpl("{1}{U}") + ); + ability.addCost(new DiscardTargetCost(new TargetCardInHand(2, StaticFilters.FILTER_CARD))); + this.addAbility(ability); + + // Granted + // You may choose a noncreature card you own from outside the game, reveal it, and put it into your hand. + this.getAdventureSpellAbility().addEffect(new WishEffect(StaticFilters.FILTER_CARD_A_NON_LAND)); + } + + private FaeOfWishes(final FaeOfWishes card) { + super(card); + } + + @Override + public FaeOfWishes copy() { + return new FaeOfWishes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 0dcfac4cab..8c7eb6d5c6 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -80,6 +80,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Epic Downfall", 85, Rarity.UNCOMMON, mage.cards.e.EpicDownfall.class)); cards.add(new SetCardInfo("Escape to the Wilds", 189, Rarity.RARE, mage.cards.e.EscapeToTheWilds.class)); cards.add(new SetCardInfo("Eye Collector", 86, Rarity.COMMON, mage.cards.e.EyeCollector.class)); + cards.add(new SetCardInfo("Fae of Wishes", 44, Rarity.RARE, mage.cards.f.FaeOfWishes.class)); cards.add(new SetCardInfo("Faeburrow Elder", 190, Rarity.RARE, mage.cards.f.FaeburrowElder.class)); cards.add(new SetCardInfo("Faerie Formation", 316, Rarity.RARE, mage.cards.f.FaerieFormation.class)); cards.add(new SetCardInfo("Faerie Guidemother", 11, Rarity.COMMON, mage.cards.f.FaerieGuidemother.class));