fixed Nightmare's Thirst giving +X/+X instead of -X/-X (fixes #5050)

This commit is contained in:
Evan Kranzler 2018-06-21 19:25:09 -04:00
parent e04c132dfe
commit 547257bc60

View file

@ -1,6 +1,8 @@
package mage.cards.n; package mage.cards.n;
import java.util.UUID; import java.util.UUID;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.MultipliedValue;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount; import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
@ -22,11 +24,10 @@ public final class NightmaresThirst extends CardImpl {
// You gain 1 life. Target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn. // You gain 1 life. Target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn.
this.getSpellAbility().addEffect(new GainLifeEffect(1)); this.getSpellAbility().addEffect(new GainLifeEffect(1));
DynamicValue xValue = new MultipliedValue(ControllerGotLifeCount.getInstance(), -1);
this.getSpellAbility().addEffect(new BoostTargetEffect( this.getSpellAbility().addEffect(new BoostTargetEffect(
ControllerGotLifeCount.getInstance(), xValue, xValue, Duration.EndOfTurn, true
ControllerGotLifeCount.getInstance(), ).setText("Target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn."));
Duration.EndOfTurn, true
));
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addWatcher(new PlayerGainedLifeWatcher()); this.getSpellAbility().addWatcher(new PlayerGainedLifeWatcher());
} }