mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Format mana costs for Echo, Cumulative Upkeep, and Unearth
This commit is contained in:
@@ -280,5 +280,4 @@ public final class ManaCost implements Comparable<ManaCost> {
|
||||
res.sealClass(sh);
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,6 +10,17 @@ public class ManaCostParser implements IParserManaCost {
|
||||
private final String[] cost;
|
||||
private int nextToken;
|
||||
private int colorlessCost;
|
||||
|
||||
/**
|
||||
* Parse the given cost and output formatted cost string
|
||||
*
|
||||
* @param cost
|
||||
*/
|
||||
public static String parse(final String cost) {
|
||||
final ManaCostParser parser = new ManaCostParser(cost);
|
||||
final ManaCost manaCost = new ManaCost(parser);
|
||||
return manaCost.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiates a new parser cardname txt mana cost.
|
||||
@@ -54,7 +65,6 @@ public class ManaCostParser implements IParserManaCost {
|
||||
*/
|
||||
@Override
|
||||
public final ManaCostShard next() {
|
||||
|
||||
final String unparsed = this.cost[this.nextToken++];
|
||||
// System.out.println(unparsed);
|
||||
if (StringUtils.isNumeric(unparsed)) {
|
||||
|
||||
Reference in New Issue
Block a user