From b8f3c4f55dbf84363b56c76c237ea3db89861c1d Mon Sep 17 00:00:00 2001 From: theelk801 Date: Tue, 16 Jul 2024 16:55:47 -0400 Subject: [PATCH] [BLB] Implement Stormsplitter --- Mage.Sets/src/mage/cards/s/Stormsplitter.java | 81 +++++++++++++++++++ Mage.Sets/src/mage/sets/Bloomburrow.java | 1 + 2 files changed, 82 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/Stormsplitter.java diff --git a/Mage.Sets/src/mage/cards/s/Stormsplitter.java b/Mage.Sets/src/mage/cards/s/Stormsplitter.java new file mode 100644 index 00000000000..eb551d50108 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/Stormsplitter.java @@ -0,0 +1,81 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; +import mage.abilities.keyword.HasteAbility; +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.game.permanent.Permanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class Stormsplitter extends CardImpl { + + public Stormsplitter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.OTTER); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // Whenever you cast an instant or sorcery spell, create a token that's a copy of Stormsplitter. Exile those copies at the beginning of the next end step. + this.addAbility(new SpellCastControllerTriggeredAbility( + new StormsplitterEffect(), StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false + )); + } + + private Stormsplitter(final Stormsplitter card) { + super(card); + } + + @Override + public Stormsplitter copy() { + return new Stormsplitter(this); + } +} + +class StormsplitterEffect extends OneShotEffect { + + StormsplitterEffect() { + super(Outcome.Benefit); + staticText = "create a token that's a copy of {this}. " + + "Exile those copies at the beginning of the next end step"; + } + + private StormsplitterEffect(final StormsplitterEffect effect) { + super(effect); + } + + @Override + public StormsplitterEffect copy() { + return new StormsplitterEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = source.getSourcePermanentOrLKI(game); + if (permanent == null) { + return false; + } + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(); + effect.setSavedPermanent(permanent); + effect.apply(game, source); + effect.exileTokensCreatedAtNextEndStep(game, source); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/Bloomburrow.java b/Mage.Sets/src/mage/sets/Bloomburrow.java index dc0f4a1a9a8..cc058a46636 100644 --- a/Mage.Sets/src/mage/sets/Bloomburrow.java +++ b/Mage.Sets/src/mage/sets/Bloomburrow.java @@ -144,6 +144,7 @@ public final class Bloomburrow extends ExpansionSet { cards.add(new SetCardInfo("Steampath Charger", 153, Rarity.COMMON, mage.cards.s.SteampathCharger.class)); cards.add(new SetCardInfo("Stickytongue Sentinel", 193, Rarity.COMMON, mage.cards.s.StickytongueSentinel.class)); cards.add(new SetCardInfo("Stormcatch Mentor", 234, Rarity.UNCOMMON, mage.cards.s.StormcatchMentor.class)); + cards.add(new SetCardInfo("Stormsplitter", 154, Rarity.MYTHIC, mage.cards.s.Stormsplitter.class)); cards.add(new SetCardInfo("Sunshower Druid", 195, Rarity.COMMON, mage.cards.s.SunshowerDruid.class)); cards.add(new SetCardInfo("Sunspine Lynx", 155, Rarity.RARE, mage.cards.s.SunspineLynx.class)); cards.add(new SetCardInfo("Swamp", 270, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));