From fe919aa5e47adc0c618c4c45f8ddbf2022e96a0d Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Sat, 25 May 2024 14:58:23 +0200 Subject: [PATCH] implement [MH3] Sink into Stupor // Soporific Springs --- .../src/mage/cards/s/SinkIntoStupor.java | 69 +++++++++++++++++++ Mage.Sets/src/mage/sets/ModernHorizons3.java | 1 + 2 files changed, 70 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SinkIntoStupor.java diff --git a/Mage.Sets/src/mage/cards/s/SinkIntoStupor.java b/Mage.Sets/src/mage/cards/s/SinkIntoStupor.java new file mode 100644 index 00000000000..4149a35d1f9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SinkIntoStupor.java @@ -0,0 +1,69 @@ +package mage.cards.s; + +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.TapSourceUnlessPaysEffect; +import mage.abilities.mana.BlueManaAbility; +import mage.cards.CardSetInfo; +import mage.cards.ModalDoubleFacedCard; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.common.FilterSpellOrPermanent; +import mage.filter.predicate.Predicates; +import mage.target.common.TargetSpellOrPermanent; + +import java.util.UUID; + +/** + * @author Susucr + */ +public final class SinkIntoStupor extends ModalDoubleFacedCard { + + private static final FilterSpellOrPermanent filter + = new FilterSpellOrPermanent("spell or nonland permanent an opponent controls"); + + static { + filter.getSpellFilter().add(TargetController.OPPONENT.getControllerPredicate()); + filter.getPermanentFilter().add(TargetController.OPPONENT.getControllerPredicate()); + filter.getPermanentFilter().add(Predicates.not(CardType.LAND.getPredicate())); + } + + public SinkIntoStupor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, + new CardType[]{CardType.INSTANT}, new SubType[]{}, "{1}{U}{U}", + "Soporific Springs", new CardType[]{CardType.LAND}, new SubType[]{}, "" + ); + + // 1. + // Sink into Stupor + // Instant + + // Return target spell or nonland permanent an opponent controls to its owner's hand. + this.getLeftHalfCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getLeftHalfCard().getSpellAbility().addTarget(new TargetSpellOrPermanent(filter)); + + // 2. + // Soporific Springs + // Land + + // As Soporific Springs enters the battlefield, you may pay 3 life. If you don't, it enters the battlefield tapped. + this.getRightHalfCard().addAbility(new AsEntersBattlefieldAbility( + new TapSourceUnlessPaysEffect(new PayLifeCost(3)), + "you may pay 3 life. If you don't, it enters the battlefield tapped" + )); + + // {T}: Add {U}. + this.getRightHalfCard().addAbility(new BlueManaAbility()); + } + + private SinkIntoStupor(final SinkIntoStupor card) { + super(card); + } + + @Override + public SinkIntoStupor copy() { + return new SinkIntoStupor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons3.java b/Mage.Sets/src/mage/sets/ModernHorizons3.java index 2067442889b..78c72d11ee7 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons3.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons3.java @@ -120,6 +120,7 @@ public final class ModernHorizons3 extends ExpansionSet { cards.add(new SetCardInfo("Scurrilous Sentry", 108, Rarity.COMMON, mage.cards.s.ScurrilousSentry.class)); cards.add(new SetCardInfo("Scurry of Gremlins", 203, Rarity.UNCOMMON, mage.cards.s.ScurryOfGremlins.class)); cards.add(new SetCardInfo("Serum Visionary", 69, Rarity.COMMON, mage.cards.s.SerumVisionary.class)); + cards.add(new SetCardInfo("Sink into Stupor", 241, Rarity.UNCOMMON, mage.cards.s.SinkIntoStupor.class)); cards.add(new SetCardInfo("Six", 169, Rarity.RARE, mage.cards.s.Six.class)); cards.add(new SetCardInfo("Skoa, Embermage", 138, Rarity.COMMON, mage.cards.s.SkoaEmbermage.class)); cards.add(new SetCardInfo("Snow-Covered Wastes", 229, Rarity.UNCOMMON, mage.cards.s.SnowCoveredWastes.class, NON_FULL_USE_VARIOUS));