From 41ec219efbf8b807c3771f9890fe626ec43479f7 Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Wed, 19 Jul 2023 20:56:17 +0100 Subject: [PATCH] [LTC] Implement Raise the Palisade --- .../src/mage/cards/r/RaiseThePalisade.java | 42 +++++++++++++++++++ .../sets/TalesOfMiddleEarthCommander.java | 2 + 2 files changed, 44 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RaiseThePalisade.java diff --git a/Mage.Sets/src/mage/cards/r/RaiseThePalisade.java b/Mage.Sets/src/mage/cards/r/RaiseThePalisade.java new file mode 100644 index 00000000000..5c795796131 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RaiseThePalisade.java @@ -0,0 +1,42 @@ +package mage.cards.r; + +import mage.abilities.effects.common.ChooseCreatureTypeEffect; +import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ChosenSubtypePredicate; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class RaiseThePalisade extends CardImpl { + + private static final FilterCreaturePermanent filter + = new FilterCreaturePermanent("creatures that aren't of the chosen type"); + + static { + filter.add(ChosenSubtypePredicate.FALSE); + } + + public RaiseThePalisade(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}"); + + // Choose a creature type. Return all creatures that aren't of the chosen type to their owners' hands. + this.getSpellAbility().addEffect(new ChooseCreatureTypeEffect(Outcome.Neutral)); + this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(filter)); + } + + private RaiseThePalisade(final RaiseThePalisade card) { + super(card); + } + + @Override + public RaiseThePalisade copy() { + return new RaiseThePalisade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TalesOfMiddleEarthCommander.java b/Mage.Sets/src/mage/sets/TalesOfMiddleEarthCommander.java index 7e9c3165de4..17aab6b45af 100644 --- a/Mage.Sets/src/mage/sets/TalesOfMiddleEarthCommander.java +++ b/Mage.Sets/src/mage/sets/TalesOfMiddleEarthCommander.java @@ -190,6 +190,8 @@ public final class TalesOfMiddleEarthCommander extends ExpansionSet { cards.add(new SetCardInfo("Prize Pig", 43, Rarity.RARE, mage.cards.p.PrizePig.class)); cards.add(new SetCardInfo("Prosperous Innkeeper", 256, Rarity.UNCOMMON, mage.cards.p.ProsperousInnkeeper.class)); cards.add(new SetCardInfo("Radagast, Wizard of Wilds", 66, Rarity.RARE, mage.cards.r.RadagastWizardOfWilds.class)); + cards.add(new SetCardInfo("Raise the Palisade", 23, Rarity.RARE, mage.cards.r.RaiseThePalisade.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Raise the Palisade", 106, Rarity.RARE, mage.cards.r.RaiseThePalisade.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Rampant Growth", 257, Rarity.COMMON, mage.cards.r.RampantGrowth.class)); cards.add(new SetCardInfo("Realm Seekers", 258, Rarity.RARE, mage.cards.r.RealmSeekers.class)); cards.add(new SetCardInfo("Reanimate", 206, Rarity.RARE, mage.cards.r.Reanimate.class));