From 90987372b7d07a533052dfbf76a75dfa871c08c1 Mon Sep 17 00:00:00 2001 From: jeffwadsworth Date: Fri, 10 Jul 2020 10:31:21 -0500 Subject: [PATCH] - Fixed #6817 --- Mage.Sets/src/mage/cards/s/Soulshriek.java | 35 ++++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/Mage.Sets/src/mage/cards/s/Soulshriek.java b/Mage.Sets/src/mage/cards/s/Soulshriek.java index 9b4af6fe815..746000c6bc6 100644 --- a/Mage.Sets/src/mage/cards/s/Soulshriek.java +++ b/Mage.Sets/src/mage/cards/s/Soulshriek.java @@ -11,13 +11,12 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.SacrificeTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; -import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; -import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetControlledCreaturePermanent; @@ -29,31 +28,32 @@ import mage.target.targetpointer.FixedTarget; */ public class Soulshriek extends CardImpl { - protected static final FilterCard filterCard = new FilterCard("creature cards"); - - static { - filterCard.add(CardType.CREATURE.getPredicate()); - } - public Soulshriek(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}"); - // Target creature you control gets +X/+0 until end of turn, where X is the number of creature cards in your graveyard. Sacrifice that creature at the beginning of the next end step. + // Target creature you control gets +X/+0 until end of turn, where X is the number + // of creature cards in your graveyard. Sacrifice that creature at the beginning of the next end step. this.getSpellAbility().addEffect(new SoulshriekEffect()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); } + public Soulshriek(final Soulshriek card) { + super(card); + } + @Override - public Card copy() { - return null; + public Soulshriek copy() { + return new Soulshriek(this); } } class SoulshriekEffect extends OneShotEffect { public SoulshriekEffect() { - super(Outcome.DestroyPermanent); - this.staticText = "Target creature you control gets +X/+0 until end of turn, where X is the number of creature cards in your graveyard. Sacrifice that creature at the beginning of the next end step"; + super(Outcome.Detriment); + this.staticText = "Target creature you control gets +X/+0 until end of turn, " + + "where X is the number of creature cards in your graveyard. " + + "Sacrifice that creature at the beginning of the next end step"; } public SoulshriekEffect(final SoulshriekEffect effect) { @@ -69,10 +69,13 @@ class SoulshriekEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - ContinuousEffect boost = new BoostTargetEffect(new CardsInControllerGraveyardCount(Soulshriek.filterCard), StaticValue.get(0), Duration.EndOfTurn); + ContinuousEffect boost = new BoostTargetEffect( + new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE), + StaticValue.get(0), Duration.EndOfTurn); boost.setTargetPointer(new FixedTarget(permanent, game)); game.addEffect(boost, source); - Effect sacrifice = new SacrificeTargetEffect("Sacrifice that creature at the beginning of the next end step", source.getControllerId()); + Effect sacrifice = new SacrificeTargetEffect("Sacrifice that creature " + + "at the beginning of the next end step", source.getControllerId()); sacrifice.setTargetPointer(new FixedTarget(permanent, game)); game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrifice), source); return true;