mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[NEO] Implemented Thousand-Faced Shadow
This commit is contained in:
parent
531bdd4c82
commit
7e5d99648f
2 changed files with 101 additions and 0 deletions
100
Mage.Sets/src/mage/cards/t/ThousandFacedShadow.java
Normal file
100
Mage.Sets/src/mage/cards/t/ThousandFacedShadow.java
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.NinjutsuAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ThousandFacedShadow extends CardImpl {
|
||||
|
||||
public ThousandFacedShadow(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.NINJA);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Ninjutsu {2}{U}{U}
|
||||
this.addAbility(new NinjutsuAbility("{2}{U}{U}"));
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When Thousand-Faced Shadow enters the battlefield from your hand, if it's attacking, create a token that's a copy of another target attacking creature. The token enters the battlefield tapped and attacking.
|
||||
this.addAbility(new ThousandFacedShadowTriggeredAbility());
|
||||
}
|
||||
|
||||
private ThousandFacedShadow(final ThousandFacedShadow card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThousandFacedShadow copy() {
|
||||
return new ThousandFacedShadow(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ThousandFacedShadowTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterAttackingCreature("another attacking creature");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
ThousandFacedShadowTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenCopyTargetEffect(
|
||||
null, null, false, 1, true, true
|
||||
));
|
||||
this.addTarget(new TargetPermanent(filter));
|
||||
}
|
||||
|
||||
private ThousandFacedShadowTriggeredAbility(final ThousandFacedShadowTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThousandFacedShadowTriggeredAbility copy() {
|
||||
return new ThousandFacedShadowTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
return permanent != null
|
||||
&& ((EntersTheBattlefieldEvent) event).getFromZone() == Zone.GRAVEYARD
|
||||
&& permanent.getId().equals(getSourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "When {this} enters the battlefield from your hand, if it's attacking, " +
|
||||
"create a token that's a copy of another target attacking creature. " +
|
||||
"The token enters the battlefield tapped and attacking.";
|
||||
}
|
||||
}
|
||||
|
|
@ -76,6 +76,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("The Modern Age", 66, Rarity.COMMON, mage.cards.t.TheModernAge.class));
|
||||
cards.add(new SetCardInfo("The Shattered States Era", 162, Rarity.COMMON, mage.cards.t.TheShatteredStatesEra.class));
|
||||
cards.add(new SetCardInfo("The Wandering Emperor", 42, Rarity.MYTHIC, mage.cards.t.TheWanderingEmperor.class));
|
||||
cards.add(new SetCardInfo("Thousand-Faced Shadow", 86, Rarity.RARE, mage.cards.t.ThousandFacedShadow.class));
|
||||
cards.add(new SetCardInfo("Twinshot Sniper", 168, Rarity.UNCOMMON, mage.cards.t.TwinshotSniper.class));
|
||||
cards.add(new SetCardInfo("Unstoppable Ogre", 169, Rarity.COMMON, mage.cards.u.UnstoppableOgre.class));
|
||||
cards.add(new SetCardInfo("Vector Glider", 66, Rarity.COMMON, mage.cards.v.VectorGlider.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue