- As Foretold: simplified implementation of copyWithDefinedMana

This commit is contained in:
Agetian
2017-09-10 13:42:16 +00:00
parent f8786bcd47
commit 1d93fccbb3

View File

@@ -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;
}