From 6bc695fd1e9c5e166ccb36f8bea1b84f16bc0ff5 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sun, 13 Sep 2020 10:28:38 -0400 Subject: [PATCH] [ZNR] Implemented Turntimber Symbiosis / Turntimber, Serpentine Wood --- .../cards/t/TurntimberSerpentineWood.java | 42 +++++++++ .../src/mage/cards/t/TurntimberSymbiosis.java | 88 +++++++++++++++++++ Mage.Sets/src/mage/sets/ZendikarRising.java | 2 + 3 files changed, 132 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TurntimberSerpentineWood.java create mode 100644 Mage.Sets/src/mage/cards/t/TurntimberSymbiosis.java diff --git a/Mage.Sets/src/mage/cards/t/TurntimberSerpentineWood.java b/Mage.Sets/src/mage/cards/t/TurntimberSerpentineWood.java new file mode 100644 index 0000000000..8c926b1e06 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TurntimberSerpentineWood.java @@ -0,0 +1,42 @@ +package mage.cards.t; + +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.effects.common.TapSourceUnlessPaysEffect; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TurntimberSerpentineWood extends CardImpl { + + public TurntimberSerpentineWood(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + this.modalDFC = true; + this.nightCard = true; + + // As Turntimber, Serpentine Wood enters the battlefield, you may pay 3 life. If you don't, it enters the battlefield tapped. + this.addAbility(new AsEntersBattlefieldAbility( + new TapSourceUnlessPaysEffect(new PayLifeCost(3)), + "you may pay 3 life. If you don't, it enters the battlefield tapped" + )); + + // {T}: Add {G}. + this.addAbility(new GreenManaAbility()); + } + + private TurntimberSerpentineWood(final TurntimberSerpentineWood card) { + super(card); + } + + @Override + public TurntimberSerpentineWood copy() { + return new TurntimberSerpentineWood(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TurntimberSymbiosis.java b/Mage.Sets/src/mage/cards/t/TurntimberSymbiosis.java new file mode 100644 index 0000000000..c87b32a7a2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TurntimberSymbiosis.java @@ -0,0 +1,88 @@ +package mage.cards.t; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.*; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TurntimberSymbiosis extends CardImpl { + + public TurntimberSymbiosis(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}{G}{G}"); + + this.modalDFC = true; + this.secondSideCardClazz = mage.cards.t.TurntimberSerpentineWood.class; + + // Look at the top seven cards of your library. You may put a creature card from among them onto the battlefield. If that card has converted mana cost 3 or less, it enters with three additional +1/+1 counters on it. Put the rest on the bottom of your library in a random order. + this.getSpellAbility().addEffect(new TurntimberSymbiosisEffect()); + } + + private TurntimberSymbiosis(final TurntimberSymbiosis card) { + super(card); + } + + @Override + public TurntimberSymbiosis copy() { + return new TurntimberSymbiosis(this); + } +} + +class TurntimberSymbiosisEffect extends OneShotEffect { + + TurntimberSymbiosisEffect() { + super(Outcome.Benefit); + staticText = "Look at the top seven cards of your library. You may put a creature card " + + "from among them onto the battlefield. If that card has converted mana cost 3 or less, " + + "it enters with three additional +1/+1 counters on it. " + + "Put the rest on the bottom of your library in a random order."; + } + + private TurntimberSymbiosisEffect(final TurntimberSymbiosisEffect effect) { + super(effect); + } + + @Override + public TurntimberSymbiosisEffect copy() { + return new TurntimberSymbiosisEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 7)); + TargetCard target = new TargetCardInLibrary( + 0, 1, StaticFilters.FILTER_CARD_CREATURE + ); + player.choose(outcome, cards, target, game); + Card card = game.getCard(target.getFirstTarget()); + if (card == null) { + player.putCardsOnBottomOfLibrary(cards, game, source, false); + return true; + } + boolean small = card.getConvertedManaCost() <= 3; + player.moveCards(card, Zone.BATTLEFIELD, source, game); + Permanent permanent = game.getPermanent(card.getId()); + if (permanent == null || !small) { + return true; + } + permanent.addCounters(CounterType.P1P1.createInstance(3), source, game); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/ZendikarRising.java b/Mage.Sets/src/mage/sets/ZendikarRising.java index 22d7a62011..2b37a4b933 100644 --- a/Mage.Sets/src/mage/sets/ZendikarRising.java +++ b/Mage.Sets/src/mage/sets/ZendikarRising.java @@ -385,6 +385,8 @@ public final class ZendikarRising extends ExpansionSet { cards.add(new SetCardInfo("Tormenting Voice", 172, Rarity.COMMON, mage.cards.t.TormentingVoice.class)); cards.add(new SetCardInfo("Tuktuk Rubblefort", 173, Rarity.COMMON, mage.cards.t.TuktukRubblefort.class)); cards.add(new SetCardInfo("Turntimber Ascetic", 214, Rarity.COMMON, mage.cards.t.TurntimberAscetic.class)); + cards.add(new SetCardInfo("Turntimber Symbiosis", 215, Rarity.MYTHIC, mage.cards.t.TurntimberSymbiosis.class)); + cards.add(new SetCardInfo("Turntimber, Serpentine Wood", 215, Rarity.MYTHIC, mage.cards.t.TurntimberSerpentineWood.class)); cards.add(new SetCardInfo("Umara Mystic", 238, Rarity.UNCOMMON, mage.cards.u.UmaraMystic.class)); cards.add(new SetCardInfo("Umara Skyfalls", 86, Rarity.UNCOMMON, mage.cards.u.UmaraSkyfalls.class)); cards.add(new SetCardInfo("Umara Wizard", 86, Rarity.UNCOMMON, mage.cards.u.UmaraWizard.class));