From 1d93fccbb37e2a2ddd91fe404e81560b0743ecad Mon Sep 17 00:00:00 2001 From: Agetian Date: Sun, 10 Sep 2017 13:42:16 +0000 Subject: [PATCH] - As Foretold: simplified implementation of copyWithDefinedMana --- forge-game/src/main/java/forge/game/cost/Cost.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/forge-game/src/main/java/forge/game/cost/Cost.java b/forge-game/src/main/java/forge/game/cost/Cost.java index f93303218f1..62957685e5c 100644 --- a/forge-game/src/main/java/forge/game/cost/Cost.java +++ b/forge-game/src/main/java/forge/game/cost/Cost.java @@ -515,13 +515,8 @@ public class Cost { } public final Cost copyWithDefinedMana(String manaCost) { - Cost toRet = new Cost(0); - toRet.isAbility = this.isAbility; + Cost toRet = copyWithNoMana(); toRet.costParts.add(new CostPartMana(new ManaCost(new ManaCostParser(manaCost)), null)); - for (CostPart cp : this.costParts) { - if (!(cp instanceof CostPartMana)) - toRet.costParts.add(cp.copy()); - } return toRet; }