From 7180fd06ff2221cc6664ba28632ca226c8d8bf4f Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Mon, 21 Aug 2023 15:24:44 +0200 Subject: [PATCH] [WOE] Implement Hylda of the Icy Crown (#10901) * tap trigger from Icewrought Sentry branch * [WOE] Implement Hylda of the Icy Crown --------- Co-authored-by: Evan Kranzler --- .../src/mage/cards/h/HyldaOfTheIcyCrown.java | 67 +++++++++++++++++++ Mage.Sets/src/mage/sets/WildsOfEldraine.java | 1 + .../permanent/token/Elemental44WUToken.java | 30 +++++++++ 3 files changed, 98 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HyldaOfTheIcyCrown.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/Elemental44WUToken.java diff --git a/Mage.Sets/src/mage/cards/h/HyldaOfTheIcyCrown.java b/Mage.Sets/src/mage/cards/h/HyldaOfTheIcyCrown.java new file mode 100644 index 00000000000..d274a9521d3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HyldaOfTheIcyCrown.java @@ -0,0 +1,67 @@ +package mage.cards.h; + +import mage.MageInt; +import mage.abilities.Mode; +import mage.abilities.common.TapUntappedPermanentTriggeredAbility; +import mage.abilities.common.delayed.ReflexiveTriggeredAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DoWhenCostPaid; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.permanent.token.Elemental44WUToken; + +import java.util.UUID; + +/** + * @author Susucr + */ +public final class HyldaOfTheIcyCrown extends CardImpl { + + public HyldaOfTheIcyCrown(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARLOCK); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Whenever you tap an untapped creature an opponent controls, you may pay {1}. When you do, choose one -- + // * Create a 4/4 white and blue Elemental creature token. + ReflexiveTriggeredAbility delayed = new ReflexiveTriggeredAbility( + new CreateTokenEffect(new Elemental44WUToken()), false + ); + // * Put a +1/+1 counter on each creature you control. + delayed.addMode(new Mode(new AddCountersAllEffect( + CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE + ))); + + // * Scry 2, then draw a card. + Mode mode = new Mode(new ScryEffect(2, false)); + mode.addEffect(new DrawCardSourceControllerEffect(1)); + delayed.addMode(mode); + + this.addAbility(new TapUntappedPermanentTriggeredAbility( + new DoWhenCostPaid(delayed, new GenericManaCost(1), "Pay {1}?"), + StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE + )); + } + + private HyldaOfTheIcyCrown(final HyldaOfTheIcyCrown card) { + super(card); + } + + @Override + public HyldaOfTheIcyCrown copy() { + return new HyldaOfTheIcyCrown(this); + } +} diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraine.java b/Mage.Sets/src/mage/sets/WildsOfEldraine.java index fc77bcd0563..c2db3cb2f6d 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraine.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraine.java @@ -65,6 +65,7 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Harried Spearguard", 135, Rarity.COMMON, mage.cards.h.HarriedSpearguard.class)); 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("Icewrought Sentry", 55, Rarity.UNCOMMON, mage.cards.i.IcewroughtSentry.class)); cards.add(new SetCardInfo("Ingenious Prodigy", 56, Rarity.RARE, mage.cards.i.IngeniousProdigy.class)); cards.add(new SetCardInfo("Into the Fae Court", 57, Rarity.COMMON, mage.cards.i.IntoTheFaeCourt.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/Elemental44WUToken.java b/Mage/src/main/java/mage/game/permanent/token/Elemental44WUToken.java new file mode 100644 index 00000000000..a4298e1218e --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/Elemental44WUToken.java @@ -0,0 +1,30 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class Elemental44WUToken extends TokenImpl { + + public Elemental44WUToken() { + super("Elemental Token", "4/4 white and blue Elemental creature token"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + color.setBlue(true); + subtype.add(SubType.ELEMENTAL); + power = new MageInt(4); + toughness = new MageInt(4); + } + + private Elemental44WUToken(final Elemental44WUToken token) { + super(token); + } + + @Override + public Elemental44WUToken copy() { + return new Elemental44WUToken(this); + } +}