mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[TMT] Implement Turncoat Kunoichi
This commit is contained in:
parent
5041256d43
commit
33a27b3525
3 changed files with 82 additions and 0 deletions
55
Mage.Sets/src/mage/cards/t/TurncoatKunoichi.java
Normal file
55
Mage.Sets/src/mage/cards/t/TurncoatKunoichi.java
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.SneakCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.effects.common.ExileUntilSourceLeavesEffect;
|
||||
import mage.abilities.keyword.SneakAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.target.common.TargetOpponentsCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TurncoatKunoichi extends CardImpl {
|
||||
|
||||
public TurncoatKunoichi(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
|
||||
this.subtype.add(SubType.MUTANT);
|
||||
this.subtype.add(SubType.NINJA);
|
||||
this.subtype.add(SubType.FOX);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Sneak {2}{W}{B}
|
||||
this.addAbility(new SneakAbility(this, "{2}{W}{B}"));
|
||||
|
||||
// When this creature enters, choose target creature an opponent controls. Exile that creature until this creature leaves the battlefield. If this creature's sneak cost was paid, instead exile the chosen creature.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ConditionalOneShotEffect(
|
||||
new ExileTargetEffect(), new ExileUntilSourceLeavesEffect(),
|
||||
SneakCondition.instance, "choose target creature an opponent controls. " +
|
||||
"Exile that creature until this creature leaves the battlefield. " +
|
||||
"If this creature's sneak cost was paid, instead exile the chosen creature"
|
||||
));
|
||||
ability.addTarget(new TargetOpponentsCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private TurncoatKunoichi(final TurncoatKunoichi card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TurncoatKunoichi copy() {
|
||||
return new TurncoatKunoichi(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -84,6 +84,7 @@ public final class TeenageMutantNinjaTurtles extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tokka & Rahzar, Terrible Twos", 171, Rarity.RARE, mage.cards.t.TokkaAndRahzarTerribleTwos.class));
|
||||
cards.add(new SetCardInfo("Transdimensional Bovine", 134, Rarity.RARE, mage.cards.t.TransdimensionalBovine.class));
|
||||
cards.add(new SetCardInfo("Triceraton Commander", 25, Rarity.MYTHIC, mage.cards.t.TriceratonCommander.class));
|
||||
cards.add(new SetCardInfo("Turncoat Kunoichi", 26, Rarity.RARE, mage.cards.t.TurncoatKunoichi.class));
|
||||
cards.add(new SetCardInfo("Turtle Power!", 135, Rarity.RARE, mage.cards.t.TurtlePower.class));
|
||||
cards.add(new SetCardInfo("Turtle Van", 181, Rarity.RARE, mage.cards.t.TurtleVan.class));
|
||||
cards.add(new SetCardInfo("Weather Maker", 182, Rarity.RARE, mage.cards.w.WeatherMaker.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.keyword.SneakAbility;
|
||||
import mage.game.Game;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* Checks if the spell was cast with the sneak cost
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum SneakCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return CardUtil.checkSourceCostsTagExists(game, source, SneakAbility.SNEAK_ACTIVATION_VALUE_KEY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "sneak cost was paid";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue