From 7e0980a3fab7593b5b182d04d7d39c7898209937 Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Tue, 1 Feb 2022 11:45:38 -0600 Subject: [PATCH] [NEO] Implemented Heiko Yamazaki, the General --- .../mage/cards/h/HeikoYamazakiTheGeneral.java | 60 +++++++++++++++++++ .../src/mage/sets/KamigawaNeonDynasty.java | 1 + 2 files changed, 61 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HeikoYamazakiTheGeneral.java diff --git a/Mage.Sets/src/mage/cards/h/HeikoYamazakiTheGeneral.java b/Mage.Sets/src/mage/cards/h/HeikoYamazakiTheGeneral.java new file mode 100644 index 0000000000..451914f9bf --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HeikoYamazakiTheGeneral.java @@ -0,0 +1,60 @@ +package mage.cards.h; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAloneControlledTriggeredAbility; +import mage.abilities.effects.common.asthought.PlayFromNotOwnHandZoneTargetEffect; +import mage.constants.*; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.filter.common.FilterArtifactCard; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author weirddan455 + */ +public final class HeikoYamazakiTheGeneral extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Samurai or Warrior you control"); + private static final FilterArtifactCard filter2 = new FilterArtifactCard("artifact card from your graveyard"); + + static { + filter.add(Predicates.or(SubType.SAMURAI.getPredicate(), SubType.WARRIOR.getPredicate())); + } + + public HeikoYamazakiTheGeneral(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SAMURAI); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Whenever a Samurai or Warrior you control attacks alone, you may cast target artifact card from your graveyard this turn. + Ability ability = new AttacksAloneControlledTriggeredAbility( + new PlayFromNotOwnHandZoneTargetEffect(Zone.GRAVEYARD, TargetController.YOU, Duration.EndOfTurn, false, true) + .setText("you may cast target artifact card from your graveyard this turn"), + filter, false, false + ); + ability.addTarget(new TargetCardInYourGraveyard(filter2)); + this.addAbility(ability); + } + + private HeikoYamazakiTheGeneral(final HeikoYamazakiTheGeneral card) { + super(card); + } + + @Override + public HeikoYamazakiTheGeneral copy() { + return new HeikoYamazakiTheGeneral(this); + } +} diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java index 6eb2a2cfbe..9e16546d6a 100644 --- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java +++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java @@ -61,6 +61,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { cards.add(new SetCardInfo("Greater Tanuki", 189, Rarity.COMMON, mage.cards.g.GreaterTanuki.class)); cards.add(new SetCardInfo("Guardians of Oboro", 56, Rarity.COMMON, mage.cards.g.GuardiansOfOboro.class)); cards.add(new SetCardInfo("Hand of Enlightenment", 11, Rarity.COMMON, mage.cards.h.HandOfEnlightenment.class)); + cards.add(new SetCardInfo("Heiko Yamazaki, the General", 146, Rarity.UNCOMMON, mage.cards.h.HeikoYamazakiTheGeneral.class)); cards.add(new SetCardInfo("Hidetsugu, Devouring Chaos", 99, Rarity.RARE, mage.cards.h.HidetsuguDevouringChaos.class)); cards.add(new SetCardInfo("High-Speed Hoverbike", 247, Rarity.UNCOMMON, mage.cards.h.HighSpeedHoverbike.class)); cards.add(new SetCardInfo("Hotshot Mechanic", 16, Rarity.UNCOMMON, mage.cards.h.HotshotMechanic.class));