fixed an error

This commit is contained in:
Evan Kranzler 2019-01-12 21:37:54 -05:00
parent fd7b8f29ca
commit aa29b7fffb

View file

@ -1,9 +1,8 @@
package mage.cards.v;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.CardImpl;
@ -11,8 +10,9 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.game.Game;
import java.util.UUID;
/**
*
* @author LoneFox
*/
public final class VitalizingCascade extends CardImpl {
@ -21,7 +21,7 @@ public final class VitalizingCascade extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{G}{W}");
// You gain X plus 3 life.
this.getSpellAbility().addEffect(new GainLifeEffect(new VitalizingCascadeValue()));
this.getSpellAbility().addEffect(new GainLifeEffect(VitalizingCascadeValue.instance));
}
public VitalizingCascade(final VitalizingCascade card) {
@ -34,16 +34,22 @@ public final class VitalizingCascade extends CardImpl {
}
}
class VitalizingCascadeValue extends ManacostVariableValue {
enum VitalizingCascadeValue implements DynamicValue {
instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
return super.calculate(game, sourceAbility, effect) + 3;
return sourceAbility.getManaCosts().getX() + 3;
}
@Override
public VitalizingCascadeValue copy() {
return new VitalizingCascadeValue();
return instance;
}
@Override
public String getMessage() {
return "";
}
@Override