From 8bcfbec7199a3a00c3e7a7740439b7d21deeda75 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 10 Nov 2021 07:09:34 -0500 Subject: [PATCH] [VOW] Implemented Eruth, Tormented Prophet --- .../mage/cards/e/EruthTormentedProphet.java | 92 +++++++++++++++++++ .../src/mage/sets/InnistradCrimsonVow.java | 1 + 2 files changed, 93 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/e/EruthTormentedProphet.java diff --git a/Mage.Sets/src/mage/cards/e/EruthTormentedProphet.java b/Mage.Sets/src/mage/cards/e/EruthTormentedProphet.java new file mode 100644 index 00000000000..26b95c9d1b5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/e/EruthTormentedProphet.java @@ -0,0 +1,92 @@ +package mage.cards.e; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; +import mage.util.CardUtil; + +import java.util.Set; +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class EruthTormentedProphet extends CardImpl { + + public EruthTormentedProphet(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // If you would draw a card, exile the top two cards of your library instead. You may play those cards this turn. + this.addAbility(new SimpleStaticAbility(new EruthTormentedProphetEffect())); + } + + private EruthTormentedProphet(final EruthTormentedProphet card) { + super(card); + } + + @Override + public EruthTormentedProphet copy() { + return new EruthTormentedProphet(this); + } +} + +class EruthTormentedProphetEffect extends ReplacementEffectImpl { + + EruthTormentedProphetEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "if you would draw a card, exile the top two cards " + + "of your library instead. You may play those cards this turn"; + } + + private EruthTormentedProphetEffect(final EruthTormentedProphetEffect effect) { + super(effect); + } + + @Override + public EruthTormentedProphetEffect copy() { + return new EruthTormentedProphetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Player player = game.getPlayer(event.getPlayerId()); + if (player == null) { + return true; + } + Set cards = player.getLibrary().getTopCards(game, 2); + player.moveCards(cards, Zone.EXILED, source, game); + for (Card card : cards) { + CardUtil.makeCardPlayable(game, source, card, Duration.EndOfTurn, false); + } + return true; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DRAW_CARD; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + return source.isControlledBy(event.getPlayerId()); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java index fa6b2ea636f..bc0ce56df5f 100644 --- a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java +++ b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java @@ -120,6 +120,7 @@ public final class InnistradCrimsonVow extends ExpansionSet { cards.add(new SetCardInfo("Edgar's Awakening", 110, Rarity.UNCOMMON, mage.cards.e.EdgarsAwakening.class)); cards.add(new SetCardInfo("Edgar, Charmed Groom", 236, Rarity.RARE, mage.cards.e.EdgarCharmedGroom.class)); cards.add(new SetCardInfo("End the Festivities", 155, Rarity.COMMON, mage.cards.e.EndTheFestivities.class)); + cards.add(new SetCardInfo("Eruth, Tormented Prophet", 237, Rarity.RARE, mage.cards.e.EruthTormentedProphet.class)); cards.add(new SetCardInfo("Estwald Shieldbasher", 11, Rarity.COMMON, mage.cards.e.EstwaldShieldbasher.class)); cards.add(new SetCardInfo("Evolving Wilds", 263, Rarity.COMMON, mage.cards.e.EvolvingWilds.class)); cards.add(new SetCardInfo("Faithbound Judge", 12, Rarity.MYTHIC, mage.cards.f.FaithboundJudge.class));