From fc6abe8b7b085ec7ff955389a41e0ca5babd9066 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Fri, 23 Feb 2024 10:11:44 -0500 Subject: [PATCH] [PIP] Implement Watchful Radstag --- .../src/mage/cards/w/WatchfulRadstag.java | 72 +++++++++++++++++++ Mage.Sets/src/mage/sets/Fallout.java | 1 + 2 files changed, 73 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/w/WatchfulRadstag.java diff --git a/Mage.Sets/src/mage/cards/w/WatchfulRadstag.java b/Mage.Sets/src/mage/cards/w/WatchfulRadstag.java new file mode 100644 index 00000000000..9ce66f51185 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WatchfulRadstag.java @@ -0,0 +1,72 @@ +package mage.cards.w; + +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.CreateTokenCopySourceEffect; +import mage.abilities.keyword.EvolveAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class WatchfulRadstag extends CardImpl { + + public WatchfulRadstag(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.ELK); + this.subtype.add(SubType.MUTANT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Evolve + this.addAbility(new EvolveAbility()); + + // Whenever Watchful Radstag evolves, create a token that's a copy of it. + this.addAbility(new WatchfulRadstagTriggeredAbility()); + } + + private WatchfulRadstag(final WatchfulRadstag card) { + super(card); + } + + @Override + public WatchfulRadstag copy() { + return new WatchfulRadstag(this); + } +} + +class WatchfulRadstagTriggeredAbility extends TriggeredAbilityImpl { + + WatchfulRadstagTriggeredAbility() { + super(Zone.BATTLEFIELD, new CreateTokenCopySourceEffect().setText("create a token that's a copy of it"), false); + setTriggerPhrase("Whenever {this} evolves, "); + } + + private WatchfulRadstagTriggeredAbility(final WatchfulRadstagTriggeredAbility ability) { + super(ability); + } + + @Override + public WatchfulRadstagTriggeredAbility copy() { + return new WatchfulRadstagTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.EVOLVED_CREATURE; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return event.getTargetId().equals(getSourceId()); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/Fallout.java b/Mage.Sets/src/mage/sets/Fallout.java index 2c653e54115..5890378c8e3 100644 --- a/Mage.Sets/src/mage/sets/Fallout.java +++ b/Mage.Sets/src/mage/sets/Fallout.java @@ -161,6 +161,7 @@ public final class Fallout extends ExpansionSet { cards.add(new SetCardInfo("Walking Ballista", 352, Rarity.RARE, mage.cards.w.WalkingBallista.class)); cards.add(new SetCardInfo("War Room", 1068, Rarity.RARE, mage.cards.w.WarRoom.class)); cards.add(new SetCardInfo("Wasteland", 361, Rarity.RARE, mage.cards.w.Wasteland.class)); + cards.add(new SetCardInfo("Watchful Radstag", 615, Rarity.RARE, mage.cards.w.WatchfulRadstag.class)); cards.add(new SetCardInfo("Wear // Tear", 222, Rarity.UNCOMMON, mage.cards.w.WearTear.class)); cards.add(new SetCardInfo("Wild Growth", 208, Rarity.COMMON, mage.cards.w.WildGrowth.class)); cards.add(new SetCardInfo("Windbrisk Heights", 315, Rarity.RARE, mage.cards.w.WindbriskHeights.class));