[NEO] Implemented Kaito Shizuki

This commit is contained in:
Evan Kranzler 2021-12-17 18:45:39 -05:00
parent 21bc6926cf
commit 5845630af9
5 changed files with 166 additions and 0 deletions

View file

@ -0,0 +1,90 @@
package mage.cards.k;
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.RaidCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.GetEmblemEffect;
import mage.abilities.effects.common.PhaseOutSourceEffect;
import mage.abilities.effects.common.discard.DiscardControllerEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.abilities.hint.common.RaidHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.game.Game;
import mage.game.command.emblems.KaitoShizukiEmblem;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.NinjaToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class KaitoShizuki extends CardImpl {
private static final Hint hint = new ConditionHint(
KaitoShizukiCondition.instance, "This permanent entered the battlefield this turn"
);
private static final Condition condition = new InvertCondition(RaidCondition.instance);
public KaitoShizuki(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{U}{B}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.KAITO);
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(3));
// At the beginning of your end step, if Kaito Shizuki entered the battlefield this turn, he phases out.
this.addAbility(new BeginningOfEndStepTriggeredAbility(
Zone.BATTLEFIELD, new PhaseOutSourceEffect().setText("he phases out"),
TargetController.YOU, KaitoShizukiCondition.instance, false
).addHint(hint));
// +1: Draw a card. Then discard a card unless you attacked this turn.
Ability ability = new LoyaltyAbility(new DrawCardSourceControllerEffect(1), 1);
ability.addEffect(new ConditionalOneShotEffect(
new DiscardControllerEffect(1), condition,
"Then discard a card unless you attacked this turn"
));
this.addAbility(ability.addHint(RaidHint.instance));
// 2: Create a 1/1 blue Ninja creature token with "This creature can't be blocked."
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new NinjaToken()), -2));
// 7: You get an emblem with "Whenever a creature you control deals combat damage to a player, search your library for a blue or black creature card, put it onto the battlefield, then shuffle."
this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new KaitoShizukiEmblem()), -7));
}
private KaitoShizuki(final KaitoShizuki card) {
super(card);
}
@Override
public KaitoShizuki copy() {
return new KaitoShizuki(this);
}
}
enum KaitoShizukiCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
return permanent != null && permanent.getTurnsOnBattlefield() == 0;
}
@Override
public String toString() {
return "if {this} entered the battlefield this turn";
}
}

View file

@ -24,6 +24,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
cards.add(new SetCardInfo("Atsushi, the Blazing Sky", 134, Rarity.MYTHIC, mage.cards.a.AtsushiTheBlazingSky.class));
cards.add(new SetCardInfo("Forest", 301, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Island", 295, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Kaito Shizuki", 226, Rarity.MYTHIC, mage.cards.k.KaitoShizuki.class));
cards.add(new SetCardInfo("Mountain", 299, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Plains", 293, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Swamp", 297, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));

View file

@ -427,6 +427,7 @@ public enum SubType {
HUATLI("Huatli", SubTypeSet.PlaneswalkerType),
JACE("Jace", SubTypeSet.PlaneswalkerType),
JESKA("Jeska", SubTypeSet.PlaneswalkerType),
KAITO("Kaito", SubTypeSet.PlaneswalkerType),
KARN("Karn", SubTypeSet.PlaneswalkerType),
KASMINA("Kasmina", SubTypeSet.PlaneswalkerType),
KAYA("Kaya", SubTypeSet.PlaneswalkerType),

View file

@ -0,0 +1,39 @@
package mage.game.command.emblems;
import mage.ObjectColor;
import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.constants.SetTargetPointer;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.command.Emblem;
import mage.target.common.TargetCardInLibrary;
/**
* @author TheElk801
*/
public final class KaitoShizukiEmblem extends Emblem {
private static final FilterCard filter = new FilterCreatureCard("a blue or black creature card");
static {
filter.add(Predicates.or(
new ColorPredicate(ObjectColor.BLUE),
new ColorPredicate(ObjectColor.BLACK)
));
}
// 7: You get an emblem with "Whenever a creature you control deals combat damage to a player, search your library for a blue or black creature card, put it onto the battlefield, then shuffle."
public KaitoShizukiEmblem() {
this.setName("Emblem Kaito");
this.setExpansionSetCodeForImage("NEO");
this.getAbilities().add(new DealsDamageToAPlayerAllTriggeredAbility(
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)),
StaticFilters.FILTER_CONTROLLED_A_CREATURE, false,
SetTargetPointer.NONE, true
));
}
}

View file

@ -0,0 +1,35 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
* @author TheElk801
*/
public final class NinjaToken extends TokenImpl {
public NinjaToken() {
super("Ninja Token", "1/1 blue Ninja creature token with \"This creature can't be blocked.\"");
cardType.add(CardType.CREATURE);
color.setBlue(true);
subtype.add(SubType.NINJA);
power = new MageInt(1);
toughness = new MageInt(1);
this.addAbility(new SimpleStaticAbility(new CantBeBlockedSourceEffect().setText("this creature can't be blocked")));
availableImageSetCodes = Arrays.asList("NEO");
}
private NinjaToken(final NinjaToken token) {
super(token);
}
public NinjaToken copy() {
return new NinjaToken(this);
}
}