diff --git a/Mage/src/main/java/mage/abilities/costs/VariableCostImpl.java b/Mage/src/main/java/mage/abilities/costs/VariableCostImpl.java index 8d699ac8623..f0f6f2e9463 100644 --- a/Mage/src/main/java/mage/abilities/costs/VariableCostImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/VariableCostImpl.java @@ -30,7 +30,7 @@ package mage.abilities.costs; import java.util.UUID; import mage.abilities.Ability; import mage.game.Game; -import mage.game.stack.Spell; +import mage.game.stack.StackObject; import mage.players.Player; import mage.target.Target; import mage.target.Targets; @@ -132,13 +132,15 @@ public abstract class VariableCostImpl implements Cost, VariableCost { @Override public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { - return true; /* not used */ + return true; + /* not used */ } @Override public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { - return true; /* not used */ + return true; + /* not used */ } @@ -166,9 +168,9 @@ public abstract class VariableCostImpl implements Cost, VariableCost { public int announceXValue(Ability source, Game game) { int xValue = 0; Player controller = game.getPlayer(source.getControllerId()); - Spell spell = game.getStack().getSpell(source.getId()); + StackObject stackObject = game.getStack().getStackObject(source.getId()); if (controller != null - && spell != null) { + && stackObject != null) { xValue = controller.announceXCost(getMinValue(source, game), getMaxValue(source, game), "Announce the number of " + actionText, game, source, this); }