From 987230fe5cadf92a3991cd320e6736f855ae6d32 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 3 May 2023 07:11:26 -0400 Subject: [PATCH] [MAT] Implement Harnessed Snubhorn --- .../src/mage/cards/h/HarnessedSnubhorn.java | 52 +++++++++++++++++++ .../sets/MarchOfTheMachineTheAftermath.java | 1 + 2 files changed, 53 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HarnessedSnubhorn.java diff --git a/Mage.Sets/src/mage/cards/h/HarnessedSnubhorn.java b/Mage.Sets/src/mage/cards/h/HarnessedSnubhorn.java new file mode 100644 index 0000000000..8a3d68f5f9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HarnessedSnubhorn.java @@ -0,0 +1,52 @@ +package mage.cards.h; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.common.FilterArtifactOrEnchantmentCard; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class HarnessedSnubhorn extends CardImpl { + + private static final FilterCard filter + = new FilterArtifactOrEnchantmentCard("artifact or enchantment card from your graveyard"); + + public HarnessedSnubhorn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.DINOSAUR); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Whenever Harnessed Snubhorn deals combat damage to a player, return target artifact or enchantment card from your graveyard to the battlefield. + Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility( + new ReturnFromGraveyardToBattlefieldTargetEffect(), false + ); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + } + + private HarnessedSnubhorn(final HarnessedSnubhorn card) { + super(card); + } + + @Override + public HarnessedSnubhorn copy() { + return new HarnessedSnubhorn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachineTheAftermath.java b/Mage.Sets/src/mage/sets/MarchOfTheMachineTheAftermath.java index f0c8de454a..99cfc9426c 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachineTheAftermath.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachineTheAftermath.java @@ -22,6 +22,7 @@ public final class MarchOfTheMachineTheAftermath extends ExpansionSet { this.hasBoosters = false; // temporary cards.add(new SetCardInfo("Filter Out", 7, Rarity.UNCOMMON, mage.cards.f.FilterOut.class)); + cards.add(new SetCardInfo("Harnessed Snubhorn", 3, Rarity.UNCOMMON, mage.cards.h.HarnessedSnubhorn.class)); cards.add(new SetCardInfo("Jolrael, Voice of Zhalfir", 33, Rarity.RARE, mage.cards.j.JolraelVoiceOfZhalfir.class)); cards.add(new SetCardInfo("Spark Rupture", 5, Rarity.RARE, mage.cards.s.SparkRupture.class)); cards.add(new SetCardInfo("The Kenriths' Royal Funeral", 34, Rarity.RARE, mage.cards.t.TheKenrithsRoyalFuneral.class));