[PIP] Implement Watchful Radstag

This commit is contained in:
theelk801 2024-02-23 10:11:44 -05:00
parent f8534de09f
commit fc6abe8b7b
2 changed files with 73 additions and 0 deletions

View file

@ -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());
}
}

View file

@ -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));