From 99798397208c5aac4be9581bc36fdc310a1bed0f Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 19 Jan 2021 20:41:39 -0500 Subject: [PATCH] [KHM] Implemented Priest of the Haunted Edge --- .../mage/cards/p/PriestOfTheHauntedEdge.java | 60 +++++++++++++++++++ Mage.Sets/src/mage/sets/Kaldheim.java | 1 + 2 files changed, 61 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/PriestOfTheHauntedEdge.java diff --git a/Mage.Sets/src/mage/cards/p/PriestOfTheHauntedEdge.java b/Mage.Sets/src/mage/cards/p/PriestOfTheHauntedEdge.java new file mode 100644 index 00000000000..25bb97b27f0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PriestOfTheHauntedEdge.java @@ -0,0 +1,60 @@ +package mage.cards.p; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledLandPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PriestOfTheHauntedEdge extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledLandPermanent("snow lands you control"); + + static { + filter.add(SuperType.SNOW.getPredicate()); + } + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter); + + public PriestOfTheHauntedEdge(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.addSuperType(SuperType.SNOW); + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // {T}, Sacrifice Priest of the Haunted Edge: Target creature gets -X/-X until end of turn, where X is the number of snow lands you control. Activate this ability only any time you could cast a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility( + Zone.BATTLEFIELD, new BoostTargetEffect( + xValue, xValue, Duration.EndOfTurn, true + ), new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + private PriestOfTheHauntedEdge(final PriestOfTheHauntedEdge card) { + super(card); + } + + @Override + public PriestOfTheHauntedEdge copy() { + return new PriestOfTheHauntedEdge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Kaldheim.java b/Mage.Sets/src/mage/sets/Kaldheim.java index 5c316b72ea8..a3c965def63 100644 --- a/Mage.Sets/src/mage/sets/Kaldheim.java +++ b/Mage.Sets/src/mage/sets/Kaldheim.java @@ -229,6 +229,7 @@ public final class Kaldheim extends ExpansionSet { cards.add(new SetCardInfo("Pilfering Hawk", 71, Rarity.COMMON, mage.cards.p.PilferingHawk.class)); cards.add(new SetCardInfo("Plains", 394, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Port of Karfell", 265, Rarity.UNCOMMON, mage.cards.p.PortOfKarfell.class)); + cards.add(new SetCardInfo("Priest of the Haunted Edge", 104, Rarity.COMMON, mage.cards.p.PriestOfTheHauntedEdge.class)); cards.add(new SetCardInfo("Provoke the Trolls", 144, Rarity.UNCOMMON, mage.cards.p.ProvokeTheTrolls.class)); cards.add(new SetCardInfo("Pyre of Heroes", 241, Rarity.RARE, mage.cards.p.PyreOfHeroes.class)); cards.add(new SetCardInfo("Raiders' Karve", 242, Rarity.COMMON, mage.cards.r.RaidersKarve.class));