From bf3b662a0031f905d5564d1c0831862bd06e21fe Mon Sep 17 00:00:00 2001 From: jmlundeen Date: Sun, 13 Apr 2025 09:06:06 -0500 Subject: [PATCH] [TDC] Implement Shiko and Narset, Unified --- .../mage/cards/s/ShikoAndNarsetUnified.java | 97 +++++++++++++++++++ .../mage/sets/TarkirDragonstormCommander.java | 1 + 2 files changed, 98 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/ShikoAndNarsetUnified.java diff --git a/Mage.Sets/src/mage/cards/s/ShikoAndNarsetUnified.java b/Mage.Sets/src/mage/cards/s/ShikoAndNarsetUnified.java new file mode 100644 index 00000000000..51e4ef4e9fc --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ShikoAndNarsetUnified.java @@ -0,0 +1,97 @@ +package mage.cards.s; + +import java.util.Collection; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.FlurryAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.Target; + +/** + * + * @author Jmlundeen + */ +public final class ShikoAndNarsetUnified extends CardImpl { + + public ShikoAndNarsetUnified(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{R}{W}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.DRAGON); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Flurry -- Whenever you cast your second spell each turn, copy that spell if it targets a permanent or player, and you may choose new targets for the copy. If you don't copy a spell this way, draw a card. + this.addAbility(new FlurryAbility(new ShikoAndNarsetEffect())); + } + + private ShikoAndNarsetUnified(final ShikoAndNarsetUnified card) { + super(card); + } + + @Override + public ShikoAndNarsetUnified copy() { + return new ShikoAndNarsetUnified(this); + } + +} +class ShikoAndNarsetEffect extends OneShotEffect { + + public ShikoAndNarsetEffect() { + super(Outcome.Copy); + this.staticText = "copy that spell if it targets a permanent or player, and you may choose new targets for the copy. " + + "If you don't copy a spell this way, draw a card."; + } + + private ShikoAndNarsetEffect(final ShikoAndNarsetEffect effect) { + super(effect); + } + + @Override + public ShikoAndNarsetEffect copy() { + return new ShikoAndNarsetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Spell spell = (Spell) this.getValue("spellCast"); + if (controller == null || spell == null) { + return false; + } + + boolean targetsPermOrPlayer = spell.getStackAbility().getTargets().stream() + .map(Target::getTargets) + .flatMap(Collection::stream) + .anyMatch(uuid -> game.getPlayer(uuid) != null || game.getPermanent(uuid) != null); + if (targetsPermOrPlayer) { + boolean newTargets = controller.chooseUse(Outcome.Neutral, "Choose new targets for the copy of " + spell.getLogName() + "?", source, game); + spell.createCopyOnStack(game, source, source.getControllerId(), newTargets); + } + else { + controller.drawCards(1, source, game); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/TarkirDragonstormCommander.java b/Mage.Sets/src/mage/sets/TarkirDragonstormCommander.java index d407bcb0b10..c7db37256c8 100644 --- a/Mage.Sets/src/mage/sets/TarkirDragonstormCommander.java +++ b/Mage.Sets/src/mage/sets/TarkirDragonstormCommander.java @@ -285,6 +285,7 @@ public final class TarkirDragonstormCommander extends ExpansionSet { cards.add(new SetCardInfo("Shattered Sanctum", 391, Rarity.RARE, mage.cards.s.ShatteredSanctum.class)); cards.add(new SetCardInfo("Sheltered Thicket", 392, Rarity.RARE, mage.cards.s.ShelteredThicket.class)); cards.add(new SetCardInfo("Shigeki, Jukai Visionary", 270, Rarity.RARE, mage.cards.s.ShigekiJukaiVisionary.class)); + cards.add(new SetCardInfo("Shiko and Narset, Unified", 7, Rarity.MYTHIC, mage.cards.s.ShikoAndNarsetUnified.class)); cards.add(new SetCardInfo("Shiny Impetus", 231, Rarity.COMMON, mage.cards.s.ShinyImpetus.class)); cards.add(new SetCardInfo("Shivan Reef", 393, Rarity.RARE, mage.cards.s.ShivanReef.class)); cards.add(new SetCardInfo("Sidar Kondo of Jamuraa", 303, Rarity.MYTHIC, mage.cards.s.SidarKondoOfJamuraa.class));