[TMT] Implement Prehistoric Pet (#14280)

This commit is contained in:
Muz 2026-01-19 12:48:10 -06:00 committed by GitHub
parent e4177734b1
commit 9247c6d964
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 82 additions and 0 deletions

View file

@ -0,0 +1,80 @@
package mage.cards.p;
import java.util.Optional;
import java.util.UUID;
import mage.MageInt;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MyTurnCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.ObjectSourcePlayer;
import mage.filter.predicate.ObjectSourcePlayerPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.TargetPermanent;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
/**
*
* @author muz
*/
public final class PrehistoricPet extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with greater power");
static {
filter.add(PrehistoricPetPredicate.instance);
}
public PrehistoricPet(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
this.subtype.add(SubType.DINOSAUR);
this.subtype.add(SubType.NINJA);
this.power = new MageInt(1);
this.toughness = new MageInt(2);
// This creature can't be blocked by creatures with greater power.
this.addAbility(new SimpleStaticAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield)));
// {1}{W}, {T}: Return another target creature you control to its owner's hand. Activate only during your turn.
Ability ability = new ActivateIfConditionActivatedAbility(
new ReturnToHandTargetEffect(), new ManaCostsImpl<>("{1}{W}"), MyTurnCondition.instance
);
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
this.addAbility(ability);
}
private PrehistoricPet(final PrehistoricPet card) {
super(card);
}
@Override
public PrehistoricPet copy() {
return new PrehistoricPet(this);
}
}
enum PrehistoricPetPredicate implements ObjectSourcePlayerPredicate<Permanent> {
instance;
@Override
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {
return Optional
.ofNullable(input.getSource().getSourcePermanentIfItStillExists(game))
.map(MageObject::getPower)
.map(MageInt::getValue)
.map(x -> x < input.getObject().getPower().getValue())
.orElse(false);
}
}

View file

@ -42,6 +42,7 @@ public final class TeenageMutantNinjaTurtles extends ExpansionSet {
cards.add(new SetCardInfo("North Wind Avatar", 162, Rarity.MYTHIC, mage.cards.n.NorthWindAvatar.class));
cards.add(new SetCardInfo("Plains", 253, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Plains", 310, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Prehistoric Pet", 22, Rarity.RARE, mage.cards.p.PrehistoricPet.class));
cards.add(new SetCardInfo("Raphael's Technique", 105, Rarity.RARE, mage.cards.r.RaphaelsTechnique.class));
cards.add(new SetCardInfo("Raphael, the Nightwatcher", 103, Rarity.RARE, mage.cards.r.RaphaelTheNightwatcher.class));
cards.add(new SetCardInfo("Sally Pride, Lioness Leader", 24, Rarity.RARE, mage.cards.s.SallyPrideLionessLeader.class));

View file

@ -61315,6 +61315,7 @@ Aloy, Savior of Meridian|Secret Lair Drop|2221|M|{3}{G}{U}|Legendary Creature -
Jin Sakai, Ghost of Tsushima|Secret Lair Drop|2226|M|{1}{W}{U}{B}|Legendary Creature - Human Samurai|2|4|Whenever Jin Sakai deals combat damage to a player, draw a card.$Whenever a creature you control attacks a player, if no other creatures are attacking that player, choose one --$* Standoff -- It gains double strike until end of turn.$* Ghost -- It can't be blocked this turn.|
Leonardo, Cutting Edge|Teenage Mutant Ninja Turtles|15|R|{1}{W}|Legendary Creature - Mutant Ninja Turtle|1|1|Sneak {W}$Lifelink$Whenever you gain life, put a +1/+1 counter on Leonardo.|
Leonardo, Sewer Samurai|Teenage Mutant Ninja Turtles|17|M|{3}{W}|Legendary Creature - Mutant Ninja Turtle Samurai|3|3|Sneak {2}{W}{W}$Double strike$During your turn, you may cast creature spells with power or toughness 1 or less from your graveyard. If you cast a spell this way, that creature enters with a finality counter on it.|
Prehistoric Pet|Teenage Mutant Ninja Turtles|22|R|{W}|Creature - Dinosaur Ninja|1|2|This creature can't be blocked by creatures with greater power.${1}{W}, {T}: Return another target creature you control to its owner's hand. Activate only during your turn.|
Sally Pride, Lioness Leader|Teenage Mutant Ninja Turtles|24|R|{3}{W}{W}|Legendary Creature - Cat Mutant Rebel|2|4|When Sally Pride enters, create X 2/2 red Mutant creature tokens, where X is the number of nontoken creatures you control.$Whenever Sally Pride attacks, put a +1/+1 counter on each creature you control.|
Triceraton Commander|Teenage Mutant Ninja Turtles|25|M|{X}{X}{W}{W}|Creature - Dinosaur Soldier|2|2|Flying$Whenever this creature attacks, Dinosaurs you control other than this creature get +1/+1 and gain flying until end of turn.$When this creature enters, create X 2/2 white Dinosaur Soldier creature tokens.|
Turtles Forever|Teenage Mutant Ninja Turtles|27|R|{3}{W}|Instant|||Search your library and/or outside the game for exactly four legendary creature cards you own with different names, then reveal those cards. An opponent chooses two of them. Put the chosen cards into your hand and shuffle the rest into your library.|