From fb27bf1b2e8694806c98fb070c26449d5288881c Mon Sep 17 00:00:00 2001 From: weirddan455 Date: Fri, 25 Dec 2020 10:40:56 -0600 Subject: [PATCH] [KHM] Implemented Realmwalker (#7279) * [KHM] Implemented Realmwalker --- Mage.Sets/src/mage/cards/r/Realmwalker.java | 59 +++++++++++++++++++++ Mage.Sets/src/mage/sets/Kaldheim.java | 1 + 2 files changed, 60 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/Realmwalker.java diff --git a/Mage.Sets/src/mage/cards/r/Realmwalker.java b/Mage.Sets/src/mage/cards/r/Realmwalker.java new file mode 100644 index 0000000000..5264b65e28 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/Realmwalker.java @@ -0,0 +1,59 @@ +package mage.cards.r; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.ChooseCreatureTypeEffect; +import mage.abilities.effects.common.continuous.LookAtTopCardOfLibraryAnyTimeEffect; +import mage.abilities.effects.common.continuous.PlayTheTopCardEffect; +import mage.abilities.keyword.ChangelingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.ChosenSubtypePredicate; + +/** + * + * @author weirddan455 + */ +public final class Realmwalker extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("cast creature spells of the chosen type"); + static { + filter.add(ChosenSubtypePredicate.instance); + } + + public Realmwalker(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.SHAPESHIFTER); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Changeling + this.setIsAllCreatureTypes(true); + this.addAbility(ChangelingAbility.getInstance()); + + // As Realmwalker enters the battlefield, choose a creature type. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.Benefit))); + + // You may look at the top card of your library any time. + this.addAbility(new SimpleStaticAbility(new LookAtTopCardOfLibraryAnyTimeEffect())); + + // You may cast creature spells of the chosen type from the top of your library. + this.addAbility(new SimpleStaticAbility(new PlayTheTopCardEffect(filter))); + } + + private Realmwalker(final Realmwalker card) { + super(card); + } + + @Override + public Realmwalker copy() { + return new Realmwalker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Kaldheim.java b/Mage.Sets/src/mage/sets/Kaldheim.java index 29b32e2717..da078d6c60 100644 --- a/Mage.Sets/src/mage/sets/Kaldheim.java +++ b/Mage.Sets/src/mage/sets/Kaldheim.java @@ -44,6 +44,7 @@ public final class Kaldheim extends ExpansionSet { cards.add(new SetCardInfo("Gladewalker Ritualist", 392, Rarity.UNCOMMON, mage.cards.g.GladewalkerRitualist.class)); cards.add(new SetCardInfo("Hengegate Pathway", 260, Rarity.RARE, mage.cards.h.HengegatePathway.class)); cards.add(new SetCardInfo("Rampage of the Valkyries", 393, Rarity.UNCOMMON, mage.cards.r.RampageOfTheValkyries.class)); + cards.add(new SetCardInfo("Realmwalker", 188, Rarity.RARE, mage.cards.r.Realmwalker.class)); cards.add(new SetCardInfo("Renegade Reaper", 386, Rarity.UNCOMMON, mage.cards.r.RenegadeReaper.class)); cards.add(new SetCardInfo("Showdown of the Skalds", 229, Rarity.RARE, mage.cards.s.ShowdownOfTheSkalds.class)); cards.add(new SetCardInfo("Starnheim Aspirant", 380, Rarity.UNCOMMON, mage.cards.s.StarnheimAspirant.class));