mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- As Foretold: simplified implementation of copyWithDefinedMana
This commit is contained in:
@@ -515,13 +515,8 @@ public class Cost {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final Cost copyWithDefinedMana(String manaCost) {
|
public final Cost copyWithDefinedMana(String manaCost) {
|
||||||
Cost toRet = new Cost(0);
|
Cost toRet = copyWithNoMana();
|
||||||
toRet.isAbility = this.isAbility;
|
|
||||||
toRet.costParts.add(new CostPartMana(new ManaCost(new ManaCostParser(manaCost)), null));
|
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;
|
return toRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user