From 0461c77d9b0a09cd306b54344fb4cdb8f915ed42 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 30 Mar 2021 08:00:54 -0400 Subject: [PATCH] [STX] Implemented Returned Pastcaller --- .../src/mage/cards/r/ReturnedPastcaller.java | 58 +++++++++++++++++++ .../mage/sets/StrixhavenSchoolOfMages.java | 1 + 2 files changed, 59 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/ReturnedPastcaller.java diff --git a/Mage.Sets/src/mage/cards/r/ReturnedPastcaller.java b/Mage.Sets/src/mage/cards/r/ReturnedPastcaller.java new file mode 100644 index 0000000000..d95a6303fd --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/ReturnedPastcaller.java @@ -0,0 +1,58 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ReturnedPastcaller extends CardImpl { + + private static final FilterCard filter = new FilterCard("Spirit, instant, or sorcery card from your graveyard"); + + static { + filter.add(Predicates.or( + SubType.SPIRIT.getPredicate(), + CardType.INSTANT.getPredicate(), + CardType.SORCERY.getPredicate() + )); + } + + public ReturnedPastcaller(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R/W}{W}"); + + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Returned Pastcaller enters the battlefield, return target Spirit, instant, or sorcery card from your graveyard to your hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect()); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + } + + private ReturnedPastcaller(final ReturnedPastcaller card) { + super(card); + } + + @Override + public ReturnedPastcaller copy() { + return new ReturnedPastcaller(this); + } +} diff --git a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java index bf91ee962c..b667dd926d 100644 --- a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java +++ b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java @@ -74,6 +74,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet { cards.add(new SetCardInfo("Quandrix Apprentice", 216, Rarity.UNCOMMON, mage.cards.q.QuandrixApprentice.class)); cards.add(new SetCardInfo("Quandrix Command", 217, Rarity.RARE, mage.cards.q.QuandrixCommand.class)); cards.add(new SetCardInfo("Relic Sloth", 223, Rarity.COMMON, mage.cards.r.RelicSloth.class)); + cards.add(new SetCardInfo("Returned Pastcaller", 224, Rarity.UNCOMMON, mage.cards.r.ReturnedPastcaller.class)); cards.add(new SetCardInfo("Rip Apart", 381, Rarity.UNCOMMON, mage.cards.r.RipApart.class)); cards.add(new SetCardInfo("Rise of Extus", 226, Rarity.COMMON, mage.cards.r.RiseOfExtus.class)); cards.add(new SetCardInfo("Shineshadow Snarl", 272, Rarity.RARE, mage.cards.s.ShineshadowSnarl.class));