From 83caa6aa1287910034846fda3efbb007e996ace9 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 8 Nov 2021 07:42:59 -0500 Subject: [PATCH] [VOW] Implemented Concealing Curtains / Revealing Eye --- .../src/mage/cards/c/ConcealingCurtains.java | 47 +++++++++ Mage.Sets/src/mage/cards/r/RevealingEye.java | 95 +++++++++++++++++++ .../src/mage/sets/InnistradCrimsonVow.java | 2 + 3 files changed, 144 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/ConcealingCurtains.java create mode 100644 Mage.Sets/src/mage/cards/r/RevealingEye.java diff --git a/Mage.Sets/src/mage/cards/c/ConcealingCurtains.java b/Mage.Sets/src/mage/cards/c/ConcealingCurtains.java new file mode 100644 index 0000000000..ced78dc8f3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ConcealingCurtains.java @@ -0,0 +1,47 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ConcealingCurtains extends CardImpl { + + public ConcealingCurtains(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); + + this.subtype.add(SubType.WALL); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + this.secondSideCardClazz = mage.cards.r.RevealingEye.class; + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // {2}{B}: Transform Concealing Curtains. Activate only as a sorcery. + this.addAbility(new TransformAbility()); + this.addAbility(new ActivateAsSorceryActivatedAbility( + new TransformSourceEffect(), new ManaCostsImpl<>("{2}{B}") + )); + } + + private ConcealingCurtains(final ConcealingCurtains card) { + super(card); + } + + @Override + public ConcealingCurtains copy() { + return new ConcealingCurtains(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RevealingEye.java b/Mage.Sets/src/mage/cards/r/RevealingEye.java new file mode 100644 index 0000000000..a903684060 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RevealingEye.java @@ -0,0 +1,95 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.TransformIntoSourceTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetOpponent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RevealingEye extends CardImpl { + + public RevealingEye(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); + + this.subtype.add(SubType.EYE); + this.subtype.add(SubType.HORROR); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + this.color.setBlack(true); + this.nightCard = true; + + // Menace + this.addAbility(new MenaceAbility()); + + // When this creature transforms into Revealing Eye, target opponent reveals their hand. You may choose a nonland card from it. If you do, that player discards that card, then draws a card. + Ability ability = new TransformIntoSourceTriggeredAbility(new RevealingEyeEffect()); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + private RevealingEye(final RevealingEye card) { + super(card); + } + + @Override + public RevealingEye copy() { + return new RevealingEye(this); + } +} + +class RevealingEyeEffect extends OneShotEffect { + + RevealingEyeEffect() { + super(Outcome.Discard); + staticText = "target opponent reveals their hand. You may choose a nonland card from it. " + + "If you do, that player discards that card, then draws a card"; + } + + private RevealingEyeEffect(final RevealingEyeEffect effect) { + super(effect); + } + + @Override + public RevealingEyeEffect copy() { + return new RevealingEyeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Player opponent = game.getPlayer(source.getFirstTarget()); + if (controller == null || opponent == null) { + return false; + } + opponent.revealCards(source, opponent.getHand(), game); + if (opponent.getHand().count(StaticFilters.FILTER_CARD_NON_LAND, game) < 1) { + return true; + } + TargetCard target = new TargetCardInHand(0, 1, StaticFilters.FILTER_CARD_NON_LAND); + controller.choose(outcome, opponent.getHand(), target, game); + Card card = game.getCard(target.getFirstTarget()); + if (card == null) { + return true; + } + opponent.discard(card, false, source, game); + opponent.drawCards(1, source, game); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java index c6adc8a7ad..bd161795c6 100644 --- a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java +++ b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java @@ -85,6 +85,7 @@ public final class InnistradCrimsonVow extends ExpansionSet { cards.add(new SetCardInfo("Clever Distraction", 9, Rarity.UNCOMMON, mage.cards.c.CleverDistraction.class)); cards.add(new SetCardInfo("Cloaked Cadet", 192, Rarity.UNCOMMON, mage.cards.c.CloakedCadet.class)); cards.add(new SetCardInfo("Cobbled Lancer", 52, Rarity.UNCOMMON, mage.cards.c.CobbledLancer.class)); + cards.add(new SetCardInfo("Concealing Curtains", 101, Rarity.RARE, mage.cards.c.ConcealingCurtains.class)); cards.add(new SetCardInfo("Consuming Tide", 53, Rarity.RARE, mage.cards.c.ConsumingTide.class)); cards.add(new SetCardInfo("Courier Bat", 102, Rarity.COMMON, mage.cards.c.CourierBat.class)); cards.add(new SetCardInfo("Cradle of Safety", 54, Rarity.COMMON, mage.cards.c.CradleOfSafety.class)); @@ -235,6 +236,7 @@ public final class InnistradCrimsonVow extends ExpansionSet { cards.add(new SetCardInfo("Resistance Squad", 32, Rarity.UNCOMMON, mage.cards.r.ResistanceSquad.class)); cards.add(new SetCardInfo("Restless Bloodseeker", 128, Rarity.UNCOMMON, mage.cards.r.RestlessBloodseeker.class)); cards.add(new SetCardInfo("Retrieve", 215, Rarity.UNCOMMON, mage.cards.r.Retrieve.class)); + cards.add(new SetCardInfo("Revealing Eye", 101, Rarity.RARE, mage.cards.r.RevealingEye.class)); cards.add(new SetCardInfo("Riphook Raider", 203, Rarity.COMMON, mage.cards.r.RiphookRaider.class)); cards.add(new SetCardInfo("Rot-Tide Gargantua", 129, Rarity.COMMON, mage.cards.r.RotTideGargantua.class)); cards.add(new SetCardInfo("Runebound Wolf", 176, Rarity.UNCOMMON, mage.cards.r.RuneboundWolf.class));