From 2890087c331f438f5a969cf70a36e8d41b4a8574 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 18 Jan 2021 20:31:19 -0500 Subject: [PATCH] [KHM] Implemented Master Skald --- Mage.Sets/src/mage/cards/m/MasterSkald.java | 55 +++++++++++++++++++++ Mage.Sets/src/mage/sets/Kaldheim.java | 1 + 2 files changed, 56 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MasterSkald.java diff --git a/Mage.Sets/src/mage/cards/m/MasterSkald.java b/Mage.Sets/src/mage/cards/m/MasterSkald.java new file mode 100644 index 0000000000..6719168212 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MasterSkald.java @@ -0,0 +1,55 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.common.ExileFromGraveCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.StaticFilters; +import mage.filter.common.FilterArtifactOrEnchantmentCard; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MasterSkald extends CardImpl { + + private static final FilterCard filter + = new FilterArtifactOrEnchantmentCard("artifact or enchantment card from your graveyard"); + + public MasterSkald(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); + + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Master Skald enters the battlefield, you may exile a creature card from your graveyard. If you do, return target artifact or enchantment card from your graveyard to your hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new DoIfCostPaid( + new ReturnFromGraveyardToHandTargetEffect(), + new ExileFromGraveCost(new TargetCardInYourGraveyard( + StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD + )) + )); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + } + + private MasterSkald(final MasterSkald card) { + super(card); + } + + @Override + public MasterSkald copy() { + return new MasterSkald(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Kaldheim.java b/Mage.Sets/src/mage/sets/Kaldheim.java index 77d08b41e6..e614eb5965 100644 --- a/Mage.Sets/src/mage/sets/Kaldheim.java +++ b/Mage.Sets/src/mage/sets/Kaldheim.java @@ -213,6 +213,7 @@ public final class Kaldheim extends ExpansionSet { cards.add(new SetCardInfo("Mammoth Growth", 183, Rarity.COMMON, mage.cards.m.MammothGrowth.class)); cards.add(new SetCardInfo("Masked Vandal", 184, Rarity.COMMON, mage.cards.m.MaskedVandal.class)); cards.add(new SetCardInfo("Maskwood Nexus", 240, Rarity.RARE, mage.cards.m.MaskwoodNexus.class)); + cards.add(new SetCardInfo("Master Skald", 19, Rarity.COMMON, mage.cards.m.MasterSkald.class)); cards.add(new SetCardInfo("Mountain", 397, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Narfi, Betrayer King", 224, Rarity.UNCOMMON, mage.cards.n.NarfiBetrayerKing.class)); cards.add(new SetCardInfo("Niko Aris", 225, Rarity.MYTHIC, mage.cards.n.NikoAris.class));