[STX] fixed Mortality Spear not getting cost reduction

This commit is contained in:
Evan Kranzler 2021-05-06 21:08:51 -04:00
parent 4499ac853d
commit 4fe09f6f23

View file

@ -3,6 +3,7 @@ package mage.cards.m;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.YouGainedLifeCondition;
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
import mage.cards.CardImpl;
@ -11,6 +12,7 @@ import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Zone;
import mage.target.common.TargetNonlandPermanent;
import mage.watchers.common.PlayerGainedLifeWatcher;
import java.util.UUID;
@ -27,7 +29,7 @@ public final class MortalitySpear extends CardImpl {
// This spell costs {2} less to cast if you gained life this turn.
this.addAbility(new SimpleStaticAbility(
Zone.ALL, new SpellCostReductionSourceEffect(2, condition).setCanWorksOnStackOnly(true)
).setRuleAtTheTop(true));
).setRuleAtTheTop(true).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
// Destroy target nonland permanent.
this.getSpellAbility().addEffect(new DestroyTargetEffect());