From 46190b09f7c986d4a60a39ec3f2d2cc2ec3ff5ad Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 13 Nov 2024 11:15:24 -0500 Subject: [PATCH] [J25] Implement Scythecat Cub --- Mage.Sets/src/mage/cards/s/ScythecatCub.java | 81 +++++++++++++++++++ .../src/mage/sets/FoundationsJumpstart.java | 1 + 2 files changed, 82 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/ScythecatCub.java diff --git a/Mage.Sets/src/mage/cards/s/ScythecatCub.java b/Mage.Sets/src/mage/cards/s/ScythecatCub.java new file mode 100644 index 00000000000..529865c7875 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ScythecatCub.java @@ -0,0 +1,81 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LandfallAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.watchers.common.AbilityResolvedWatcher; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ScythecatCub extends CardImpl { + + public ScythecatCub(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.CAT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Landfall -- Whenever a land you control enters, put a +1/+1 counter on target creature you control. If this is the second time this ability has resolved this turn, double the number of +1/+1 counters on that creature instead. + Ability ability = new LandfallAbility(new ScythecatCubEffect()); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability, new AbilityResolvedWatcher()); + } + + private ScythecatCub(final ScythecatCub card) { + super(card); + } + + @Override + public ScythecatCub copy() { + return new ScythecatCub(this); + } +} + +class ScythecatCubEffect extends OneShotEffect { + + ScythecatCubEffect() { + super(Outcome.Benefit); + staticText = "put a +1/+1 counter on target creature you control. " + + "If this is the second time this ability has resolved this turn, " + + "double the number of +1/+1 counters on that creature instead"; + } + + private ScythecatCubEffect(final ScythecatCubEffect effect) { + super(effect); + } + + @Override + public ScythecatCubEffect copy() { + return new ScythecatCubEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (permanent == null) { + return false; + } + int count = AbilityResolvedWatcher.getResolutionCount(game, source) == 2 + ? permanent.getCounters(game).getCount(CounterType.P1P1) + : 1; + return count > 0 && permanent.addCounters(CounterType.P1P1.createInstance(count), source, game); + } +} diff --git a/Mage.Sets/src/mage/sets/FoundationsJumpstart.java b/Mage.Sets/src/mage/sets/FoundationsJumpstart.java index 87adfe5a24e..ddbf7a9863d 100644 --- a/Mage.Sets/src/mage/sets/FoundationsJumpstart.java +++ b/Mage.Sets/src/mage/sets/FoundationsJumpstart.java @@ -582,6 +582,7 @@ public final class FoundationsJumpstart extends ExpansionSet { cards.add(new SetCardInfo("Scion of the Swarm", 487, Rarity.UNCOMMON, mage.cards.s.ScionOfTheSwarm.class)); cards.add(new SetCardInfo("Scourge of the Undercity", 11, Rarity.COMMON, mage.cards.s.ScourgeOfTheUndercity.class)); cards.add(new SetCardInfo("Screaming Swarm", 351, Rarity.UNCOMMON, mage.cards.s.ScreamingSwarm.class)); + cards.add(new SetCardInfo("Scythecat Cub", 24, Rarity.RARE, mage.cards.s.ScythecatCub.class)); cards.add(new SetCardInfo("Search Party Captain", 250, Rarity.COMMON, mage.cards.s.SearchPartyCaptain.class)); cards.add(new SetCardInfo("Seat of the Synod", 773, Rarity.COMMON, mage.cards.s.SeatOfTheSynod.class)); cards.add(new SetCardInfo("Secluded Steppe", 774, Rarity.UNCOMMON, mage.cards.s.SecludedSteppe.class));