mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +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) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user