From bffe1b2ce66da138ab05f79dc168d89c0d4ba6b0 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 5 Apr 2021 20:43:52 -0400 Subject: [PATCH] [STX] Implemented Pillardrop Warden --- .../src/mage/cards/p/PillardropWarden.java | 58 +++++++++++++++++++ .../mage/sets/StrixhavenSchoolOfMages.java | 1 + .../ActivateAsSorceryActivatedAbility.java | 2 +- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/cards/p/PillardropWarden.java diff --git a/Mage.Sets/src/mage/cards/p/PillardropWarden.java b/Mage.Sets/src/mage/cards/p/PillardropWarden.java new file mode 100644 index 0000000000..a18517c681 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PillardropWarden.java @@ -0,0 +1,58 @@ +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.costs.mana.GenericManaCost; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.common.FilterInstantOrSorceryCard; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PillardropWarden extends CardImpl { + + private static final FilterCard filter + = new FilterInstantOrSorceryCard("instant or sorcery card from your graveyard"); + + public PillardropWarden(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.DWARF); + this.power = new MageInt(1); + this.toughness = new MageInt(5); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // {2}, {T}, Sacrifice Pillardrop Warden: Return target instant or sorcery card from your graveyard to your hand. Activate only as a sorcery. + Ability ability = new ActivateAsSorceryActivatedAbility( + new ReturnFromGraveyardToHandTargetEffect(), new GenericManaCost(2) + ); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + } + + private PillardropWarden(final PillardropWarden card) { + super(card); + } + + @Override + public PillardropWarden copy() { + return new PillardropWarden(this); + } +} diff --git a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java index 74211cd4c9..02afd7c412 100644 --- a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java +++ b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java @@ -156,6 +156,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet { cards.add(new SetCardInfo("Pigment Storm", 111, Rarity.COMMON, mage.cards.p.PigmentStorm.class)); cards.add(new SetCardInfo("Pilgrim of the Ages", 22, Rarity.COMMON, mage.cards.p.PilgrimOfTheAges.class)); cards.add(new SetCardInfo("Pillardrop Rescuer", 23, Rarity.COMMON, mage.cards.p.PillardropRescuer.class)); + cards.add(new SetCardInfo("Pillardrop Warden", 112, Rarity.COMMON, mage.cards.p.PillardropWarden.class)); cards.add(new SetCardInfo("Plains", 366, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plargg, Dean of Chaos", 155, Rarity.RARE, mage.cards.p.PlarggDeanOfChaos.class)); cards.add(new SetCardInfo("Poet's Quill", 82, Rarity.RARE, mage.cards.p.PoetsQuill.class)); diff --git a/Mage/src/main/java/mage/abilities/common/ActivateAsSorceryActivatedAbility.java b/Mage/src/main/java/mage/abilities/common/ActivateAsSorceryActivatedAbility.java index 52e7ec2859..59db9750ca 100644 --- a/Mage/src/main/java/mage/abilities/common/ActivateAsSorceryActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/common/ActivateAsSorceryActivatedAbility.java @@ -28,6 +28,6 @@ public class ActivateAsSorceryActivatedAbility extends ActivatedAbilityImpl { @Override public String getRule() { - return super.getRule() + " Activate this ability only any time you could cast a sorcery."; + return super.getRule() + " Activate only as a sorcery."; } }