From a13be39140b18ff490a4e4bc215efd39a8853bc2 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Fri, 3 Nov 2023 09:00:56 -0400 Subject: [PATCH] [LCI] Implement Wail of the Forgotten --- .../src/mage/cards/w/WailOfTheForgotten.java | 54 +++++++++++++++++++ .../src/mage/sets/TheLostCavernsOfIxalan.java | 1 + 2 files changed, 55 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/w/WailOfTheForgotten.java diff --git a/Mage.Sets/src/mage/cards/w/WailOfTheForgotten.java b/Mage.Sets/src/mage/cards/w/WailOfTheForgotten.java new file mode 100644 index 00000000000..1725675130d --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WailOfTheForgotten.java @@ -0,0 +1,54 @@ +package mage.cards.w; + +import mage.abilities.Mode; +import mage.abilities.condition.common.DescendCondition; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.PutCards; +import mage.target.common.TargetNonlandPermanent; +import mage.target.common.TargetOpponent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class WailOfTheForgotten extends CardImpl { + + public WailOfTheForgotten(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}{B}"); + + // Descend 8 -- Choose one. If there are eight or more permanent cards in your graveyard as you cast this spell, choose one or more instead. + this.getSpellAbility().getModes().setChooseText( + "choose one. If there are eight or more permanent cards in your graveyard as you cast this spell, choose one or more instead." + ); + this.getSpellAbility().getModes().setMoreCondition(DescendCondition.EIGHT); + this.getSpellAbility().setAbilityWord(AbilityWord.DESCEND_8); + + // * Return target nonland permanent to its owner's hand. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetNonlandPermanent()); + + // * Target opponent discards a card. + this.getSpellAbility().addMode(new Mode(new DiscardTargetEffect(1)).addTarget(new TargetOpponent())); + + // * Look at the top three cards of your library. Put one of them into your hand and the rest into your graveyard. + this.getSpellAbility().addMode(new Mode(new LookLibraryAndPickControllerEffect( + 3, 1, PutCards.HAND, PutCards.GRAVEYARD + ))); + } + + private WailOfTheForgotten(final WailOfTheForgotten card) { + super(card); + } + + @Override + public WailOfTheForgotten copy() { + return new WailOfTheForgotten(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheLostCavernsOfIxalan.java b/Mage.Sets/src/mage/sets/TheLostCavernsOfIxalan.java index 35d45b9b004..5cb07777371 100644 --- a/Mage.Sets/src/mage/sets/TheLostCavernsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/TheLostCavernsOfIxalan.java @@ -205,6 +205,7 @@ public final class TheLostCavernsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Uchbenbak, the Great Mistake", 242, Rarity.UNCOMMON, mage.cards.u.UchbenbakTheGreatMistake.class)); cards.add(new SetCardInfo("Vanguard of the Rose", 42, Rarity.UNCOMMON, mage.cards.v.VanguardOfTheRose.class)); cards.add(new SetCardInfo("Vito, Fanatic of Aclazotz", 243, Rarity.MYTHIC, mage.cards.v.VitoFanaticOfAclazotz.class)); + cards.add(new SetCardInfo("Wail of the Forgotten", 244, Rarity.RARE, mage.cards.w.WailOfTheForgotten.class)); cards.add(new SetCardInfo("Waterlogged Hulk", 83, Rarity.UNCOMMON, mage.cards.w.WaterloggedHulk.class)); cards.add(new SetCardInfo("Watertight Gondola", 83, Rarity.UNCOMMON, mage.cards.w.WatertightGondola.class)); cards.add(new SetCardInfo("Waterwind Scout", 84, Rarity.COMMON, mage.cards.w.WaterwindScout.class));