This commit is contained in:
jeffwadsworth 2020-07-10 15:23:29 -05:00
parent bb453de525
commit 4c34210d64

View file

@ -6,7 +6,6 @@ import mage.abilities.Ability;
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.SacrificeTargetEffect;
@ -33,6 +32,10 @@ public class Soulshriek extends CardImpl {
// 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.
CardsInControllerGraveyardCount count = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURES_YOUR_GRAVEYARD);
Effect effect = new BoostTargetEffect(count, StaticValue.get(0), Duration.EndOfTurn, true);
effect.setText("Target creature you control gets +X/+0 until end of turn, where X is the number of creature cards in your graveyard.");
this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addEffect(new SoulshriekEffect());
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
}
@ -51,9 +54,7 @@ class SoulshriekEffect extends OneShotEffect {
public SoulshriekEffect() {
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";
this.staticText = "Sacrifice that creature at the beginning of the next end step";
}
public SoulshriekEffect(final SoulshriekEffect effect) {
@ -69,11 +70,6 @@ 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(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());
sacrifice.setTargetPointer(new FixedTarget(permanent, game));