From be356a4ed60519fa7beb985c2d2ff21563b29bbf Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 4 Nov 2021 09:24:21 -0400 Subject: [PATCH] [VOW] Implemented Wretched Throng --- .../src/mage/cards/w/WretchedThrong.java | 49 +++++++++++++++++++ .../src/mage/sets/InnistradCrimsonVow.java | 1 + 2 files changed, 50 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/w/WretchedThrong.java diff --git a/Mage.Sets/src/mage/cards/w/WretchedThrong.java b/Mage.Sets/src/mage/cards/w/WretchedThrong.java new file mode 100644 index 0000000000..544b021466 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WretchedThrong.java @@ -0,0 +1,49 @@ +package mage.cards.w; + +import mage.MageInt; +import mage.abilities.common.DiesSourceTriggeredAbility; +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.filter.FilterCard; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class WretchedThrong extends CardImpl { + + private static final FilterCard filter = new FilterCard("a card name Wretched Throng"); + + static { + filter.add(new NamePredicate("Wretched Throng")); + } + + public WretchedThrong(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.HORROR); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // When Wretched Throng dies, you may search your library for a card named Wretched Throng, reveal it, put it into your hand, then shuffle. + this.addAbility(new DiesSourceTriggeredAbility(new SearchLibraryPutInHandEffect( + new TargetCardInLibrary(filter), true, true + ), true)); + } + + private WretchedThrong(final WretchedThrong card) { + super(card); + } + + @Override + public WretchedThrong copy() { + return new WretchedThrong(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java index bbdae0f2db..5fc884aba0 100644 --- a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java +++ b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java @@ -157,6 +157,7 @@ public final class InnistradCrimsonVow extends ExpansionSet { cards.add(new SetCardInfo("Wedding Security", 138, Rarity.UNCOMMON, mage.cards.w.WeddingSecurity.class)); cards.add(new SetCardInfo("Whispering Wizard", 88, Rarity.UNCOMMON, mage.cards.w.WhisperingWizard.class)); cards.add(new SetCardInfo("Wrathful Jailbreaker", 184, Rarity.COMMON, mage.cards.w.WrathfulJailbreaker.class)); + cards.add(new SetCardInfo("Wretched Throng", 91, Rarity.COMMON, mage.cards.w.WretchedThrong.class)); cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); // remove when mechanic is fully implemented }