From 1d0160f6f4622130ef727d53a568c695793a7d9c Mon Sep 17 00:00:00 2001 From: ciaccona007 Date: Mon, 4 Nov 2024 16:37:27 -0500 Subject: [PATCH] [FDN] Implement Spinner of Souls --- .../src/mage/cards/s/SpinnerOfSouls.java | 61 +++++++++++++++++++ Mage.Sets/src/mage/sets/Foundations.java | 1 + 2 files changed, 62 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SpinnerOfSouls.java diff --git a/Mage.Sets/src/mage/cards/s/SpinnerOfSouls.java b/Mage.Sets/src/mage/cards/s/SpinnerOfSouls.java new file mode 100644 index 00000000000..32b92d051e0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpinnerOfSouls.java @@ -0,0 +1,61 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.effects.common.RevealCardsFromLibraryUntilEffect; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.PutCards; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.filter.predicate.permanent.TokenPredicate; + +import java.util.UUID; + +/** + * + * @author ciaccona007 + */ +public final class SpinnerOfSouls extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another nontoken creature you control"); + + static { + filter.add(AnotherPredicate.instance); + filter.add(TokenPredicate.FALSE); + } + + public SpinnerOfSouls(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); + + this.subtype.add(SubType.SPIDER); + this.subtype.add(SubType.SPIRIT); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // Whenever another nontoken creature you control dies, you may reveal cards from the top of your library until you reveal a creature card. Put that card into your hand and the rest on the bottom of your library in a random order. + this.addAbility(new DiesCreatureTriggeredAbility(Zone.BATTLEFIELD, + new RevealCardsFromLibraryUntilEffect( + StaticFilters.FILTER_CARD_CREATURE, PutCards.HAND, PutCards.BOTTOM_RANDOM + ), true, filter, false + )); + } + + private SpinnerOfSouls(final SpinnerOfSouls card) { + super(card); + } + + @Override + public SpinnerOfSouls copy() { + return new SpinnerOfSouls(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Foundations.java b/Mage.Sets/src/mage/sets/Foundations.java index 04cfc0eca33..88f75ae8cc7 100644 --- a/Mage.Sets/src/mage/sets/Foundations.java +++ b/Mage.Sets/src/mage/sets/Foundations.java @@ -438,6 +438,7 @@ public final class Foundations extends ExpansionSet { cards.add(new SetCardInfo("Spectral Sailor", 164, Rarity.UNCOMMON, mage.cards.s.SpectralSailor.class)); cards.add(new SetCardInfo("Sphinx of Forgotten Lore", 51, Rarity.MYTHIC, mage.cards.s.SphinxOfForgottenLore.class)); cards.add(new SetCardInfo("Sphinx of the Final Word", 597, Rarity.MYTHIC, mage.cards.s.SphinxOfTheFinalWord.class)); + cards.add(new SetCardInfo("Spinner of Souls", 112, Rarity.RARE, mage.cards.s.SpinnerOfSouls.class)); cards.add(new SetCardInfo("Spitfire Lagac", 208, Rarity.COMMON, mage.cards.s.SpitfireLagac.class)); cards.add(new SetCardInfo("Springbloom Druid", 646, Rarity.COMMON, mage.cards.s.SpringbloomDruid.class)); cards.add(new SetCardInfo("Stab", 71, Rarity.COMMON, mage.cards.s.Stab.class));