diff --git a/src/main/java/forge/card/cost/Cost.java b/src/main/java/forge/card/cost/Cost.java index 3037888133a..4e080a618fc 100644 --- a/src/main/java/forge/card/cost/Cost.java +++ b/src/main/java/forge/card/cost/Cost.java @@ -345,35 +345,6 @@ public class Cost { return splitStr; } - /** - *
- * changeCost. - *
- * - * @param sa - * a {@link forge.card.spellability.SpellAbility} object. - */ - public final void changeCost(final SpellAbility sa) { - boolean costChanged = false; - // TODO: Change where ChangeCost happens - for (final CostPart part : this.costParts) { - if (part instanceof CostPartMana) { - final ManaCost mana = new ManaCost(new ManaCostParser(part.toString())); - final ManaCostBeingPaid changedCost = new ManaCostBeingPaid(mana); - changedCost.applySpellCostChange(sa); - - ((CostPartMana)part).setAdjustedMana(changedCost.toManaCost()); - costChanged = true; - } - } - if (!costChanged) { - // Spells with a cost of 0 should be affected too - final ManaCostBeingPaid changedCost = new ManaCostBeingPaid("0"); - changedCost.applySpellCostChange(sa); - this.costParts.add(new CostPartMana(changedCost.toManaCost(), null, false)); - } - } - public final Cost copyWithNoMana() { Cost toRet = new Cost(0); toRet.isAbility = this.isAbility; diff --git a/src/main/java/forge/card/cost/CostPartMana.java b/src/main/java/forge/card/cost/CostPartMana.java index 82877cca029..8a15611d874 100644 --- a/src/main/java/forge/card/cost/CostPartMana.java +++ b/src/main/java/forge/card/cost/CostPartMana.java @@ -38,7 +38,6 @@ import forge.game.player.AIPlayer; public class CostPartMana extends CostPart { // "Leftover" private final ManaCost cost; - private ManaCost adjustedCost; private boolean xCantBe0 = false; private final String restriction; @@ -78,21 +77,13 @@ public class CostPartMana extends CostPart { return !xCantBe0; } - /** - * Used to set mana cost after applying static effects that change costs. - */ - public void setAdjustedMana(ManaCost manaCost) { - // this is set when static effects of LodeStone Golems or Thalias are applied - adjustedCost = manaCost; - } - /** * Gets the mana to pay. * * @return the mana to pay */ public final ManaCost getManaToPay() { - return adjustedCost == null ? cost : adjustedCost; + return cost; } @Override @@ -134,8 +125,8 @@ public class CostPartMana extends CostPart { for(int i = 0; i < timesMultikicked; i++) toPay.combineManaCost(mkCost); } - - + + toPay.applySpellCostChange(ability); if (!toPay.isPaid()) { InputPayment inpPayment = new InputPayManaOfCostPayment(toPay, ability); FThreads.setInputAndWait(inpPayment); diff --git a/src/main/java/forge/card/cost/CostPayment.java b/src/main/java/forge/card/cost/CostPayment.java index 7a593662451..b979c376aac 100644 --- a/src/main/java/forge/card/cost/CostPayment.java +++ b/src/main/java/forge/card/cost/CostPayment.java @@ -197,13 +197,4 @@ public class CostPayment { } return true; } - - /** - *- * changeCost. - *
- */ - public final void changeCost() { - this.cost.changeCost(this.ability); - } } diff --git a/src/main/java/forge/card/spellability/HumanPlaySpellAbility.java b/src/main/java/forge/card/spellability/HumanPlaySpellAbility.java index 4b6c186643c..a22a1e48295 100644 --- a/src/main/java/forge/card/spellability/HumanPlaySpellAbility.java +++ b/src/main/java/forge/card/spellability/HumanPlaySpellAbility.java @@ -94,7 +94,6 @@ public class HumanPlaySpellAbility { boolean paymentMade = isFree; if (!paymentMade) { - this.payment.changeCost(); paymentMade = this.payment.payCost(game); } diff --git a/src/main/java/forge/game/player/HumanPlayer.java b/src/main/java/forge/game/player/HumanPlayer.java index adc06e4e0d0..f5ac92dd695 100644 --- a/src/main/java/forge/game/player/HumanPlayer.java +++ b/src/main/java/forge/game/player/HumanPlayer.java @@ -179,13 +179,7 @@ public class HumanPlayer extends Player { sa.setActivatingPlayer(this); if (sa.getPayCosts() != null) { - final CostPayment payment = new CostPayment(sa.getPayCosts(), sa); - - if (!sa.isTrigger()) { - payment.changeCost(); - } - - final HumanPlaySpellAbility req = new HumanPlaySpellAbility(sa, payment); + final HumanPlaySpellAbility req = new HumanPlaySpellAbility(sa, new CostPayment(sa.getPayCosts(), sa)); req.fillRequirements(useOldTargets, false, true); } else {