From 40fa15cbfff3aa3393b871f0ede07ada2b0b162f Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 2 Apr 2021 07:48:31 -0400 Subject: [PATCH] [STX] Implemented Pilgrim of the Ages --- .../src/mage/cards/p/PilgrimOfTheAges.java | 58 +++++++++++++++++++ .../mage/sets/StrixhavenSchoolOfMages.java | 1 + 2 files changed, 59 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/PilgrimOfTheAges.java diff --git a/Mage.Sets/src/mage/cards/p/PilgrimOfTheAges.java b/Mage.Sets/src/mage/cards/p/PilgrimOfTheAges.java new file mode 100644 index 0000000000..f3eb502311 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PilgrimOfTheAges.java @@ -0,0 +1,58 @@ +package mage.cards.p; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PilgrimOfTheAges extends CardImpl { + + private static final FilterCard filter = new FilterCard("a basic Plains card"); + + static { + filter.add(SuperType.BASIC.getPredicate()); + filter.add(SubType.PLAINS.getPredicate()); + } + + public PilgrimOfTheAges(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.SPIRIT); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // When Pilgrim of the Ages enters the battlefield, you may search your library for a basic Plains card, reveal it, put it into your hand, then shuffle. + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect( + new TargetCardInLibrary(filter), true, true + ), true)); + + // {6}: Return Pilgrim of the Ages from your graveyard to your hand. + this.addAbility(new SimpleActivatedAbility( + Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new GenericManaCost(6) + )); + } + + private PilgrimOfTheAges(final PilgrimOfTheAges card) { + super(card); + } + + @Override + public PilgrimOfTheAges copy() { + return new PilgrimOfTheAges(this); + } +} diff --git a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java index 0a07964e4a..efc9cb30de 100644 --- a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java +++ b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java @@ -107,6 +107,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet { cards.add(new SetCardInfo("Oggyar Battle-Seer", 209, Rarity.COMMON, mage.cards.o.OggyarBattleSeer.class)); cards.add(new SetCardInfo("Owlin Shieldmage", 210, Rarity.COMMON, mage.cards.o.OwlinShieldmage.class)); cards.add(new SetCardInfo("Pest Summoning", 211, Rarity.COMMON, mage.cards.p.PestSummoning.class)); + cards.add(new SetCardInfo("Pilgrim of the Ages", 22, Rarity.COMMON, mage.cards.p.PilgrimOfTheAges.class)); cards.add(new SetCardInfo("Plains", 366, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Pop Quiz", 49, Rarity.COMMON, mage.cards.p.PopQuiz.class)); cards.add(new SetCardInfo("Practical Research", 212, Rarity.UNCOMMON, mage.cards.p.PracticalResearch.class));