diff --git a/Mage.Sets/src/mage/cards/h/HyldasCrownOfWinter.java b/Mage.Sets/src/mage/cards/h/HyldasCrownOfWinter.java new file mode 100644 index 00000000000..51d266276c8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HyldasCrownOfWinter.java @@ -0,0 +1,90 @@ +package mage.cards.h; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.CostAdjuster; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SuperType; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.game.Game; +import mage.target.common.TargetCreaturePermanent; +import mage.util.CardUtil; + +import java.util.UUID; + +/** + * + * @author Susucr + */ +public final class HyldasCrownOfWinter extends CardImpl { + + private static final FilterCreaturePermanent filter = + new FilterCreaturePermanent("tapped creature your opponents control"); + + static { + filter.add(TappedPredicate.TAPPED); + filter.add(TargetController.OPPONENT.getControllerPredicate()); + } + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter); + private static final Hint hint = new ValueHint("Tapped creatures your opponents control", xValue); + + public HyldasCrownOfWinter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + this.supertype.add(SuperType.LEGENDARY); + + // {1}, {T}: Tap target creature. This ability cost {1} less to activate during your turn. + Ability ability = new SimpleActivatedAbility( + new TapTargetEffect(), new GenericManaCost(1) + ); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + ability.addEffect(new InfoEffect("this ability costs {1} less to activate during your turn")); + ability.setCostAdjuster(HyldasCrownOfWinterAdjuster.instance); + this.addAbility(ability); + + // {3}, Sacrifice Hylda's Crown of Winter: Draw a card for each tapped creature your opponents control. + ability = new SimpleActivatedAbility( + new DrawCardSourceControllerEffect(xValue), + new GenericManaCost(3) + ); + ability.addCost(new SacrificeSourceCost()); + ability.addHint(hint); + this.addAbility(ability); + } + + private HyldasCrownOfWinter(final HyldasCrownOfWinter card) { + super(card); + } + + @Override + public HyldasCrownOfWinter copy() { + return new HyldasCrownOfWinter(this); + } +} + +enum HyldasCrownOfWinterAdjuster implements CostAdjuster { + instance; + + @Override + public void adjustCosts(Ability ability, Game game) { + if (ability.getControllerId().equals(game.getActivePlayerId())) { + CardUtil.reduceCost(ability, 1); + } + } +} diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraine.java b/Mage.Sets/src/mage/sets/WildsOfEldraine.java index 6cfe1f934b5..145f8fa2b0d 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraine.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraine.java @@ -74,6 +74,7 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Hopeless Nightmare", 95, Rarity.COMMON, mage.cards.h.HopelessNightmare.class)); cards.add(new SetCardInfo("Howling Galefang", 175, Rarity.UNCOMMON, mage.cards.h.HowlingGalefang.class)); cards.add(new SetCardInfo("Hylda of the Icy Crown", 206, Rarity.MYTHIC, mage.cards.h.HyldaOfTheIcyCrown.class)); + cards.add(new SetCardInfo("Hylda's Crown of Winter", 247, Rarity.RARE, mage.cards.h.HyldasCrownOfWinter.class)); cards.add(new SetCardInfo("Ice Out", 54, Rarity.COMMON, mage.cards.i.IceOut.class)); cards.add(new SetCardInfo("Icewrought Sentry", 55, Rarity.UNCOMMON, mage.cards.i.IcewroughtSentry.class)); cards.add(new SetCardInfo("Ingenious Prodigy", 56, Rarity.RARE, mage.cards.i.IngeniousProdigy.class)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 3af6bd262b4..fd394d4c157 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -50342,7 +50342,7 @@ Scan the Clouds|Wilds of Eldraine|238|U|{1}{U}|Instant - Adventure|3|4|Draw two Threadbind Clique|Wilds of Eldraine|239|U|{3}{U}|Creature - Faerie|3|3|Flying| Rip the Seams|Wilds of Eldraine|239|U|{2}{W}|Instant - Adventure|3|3|Destroy target tapped creature.| Agatha's Soul Cauldron|Wilds of Eldraine|242|M|{2}|Legendary Artifact|||You may spend mana as though it were mana of any color to activate abilities of creatures you control.$Creatures you control with +1/+1 counters on them have all activated abilities of all creature cards exiled with Agatha's Soul Cauldron.${T}: Exile target card from a graveyard. When a creature card is exiled this way, put a +1/+1 counter on target creature you control.| -Hyldra's Crown of Winter|Wilds of Eldraine|247|R|{3}|Legendary Artifact|||{1}, {T}: Tap target creature. This ability cost {1} less to activate during your turn.${3}, Sacrifice Hyldra's Crown of Winter: Draw a card for each tapped creature your opponents control.| +Hylda's Crown of Winter|Wilds of Eldraine|247|R|{3}|Legendary Artifact|||{1}, {T}: Tap target creature. This ability cost {1} less to activate during your turn.${3}, Sacrifice Hylda's Crown of Winter: Draw a card for each tapped creature your opponents control.| Prophetic Prism|Wilds of Eldraine|249|C|{2}|Artifact|||When Prophetic Prism enters the battlefield, draw a card.${1}, {T}: Add one mana of any color.| Soul-Guide Lantern|Wilds of Eldraine|251|U|{1}|Artifact|||When Soul-Guide Lantern enters the battlefield, exile target card from a graveyard.${T}, Sacrifice Soul-Guide Lantern: Exile each opponent's graveyard.${1}, {T}, Sacrifice Soul-Guide Lantern: Draw a card.| Syr Ginger, the Meal Ender|Wilds of Eldraine|252|R|{2}|Legendary Artifact Creature - Food Knight|3|1|Syr Ginger, the Meal Ender has trample, hexproof, and haste as long as an opponent controls a planeswalker.$Whenever another artifact you control is put into a graveyard from the battlefield, put a +1/+1 counter on Syr Ginger and scry 1.${2}, {T}, Sacrifice Syr Ginger: You gain life equal to its power.|