mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Card.keywordsToText() improve Ward parsing
This commit is contained in:
@@ -2256,15 +2256,13 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
|||||||
} else if (keyword.startsWith("Ward")) {
|
} else if (keyword.startsWith("Ward")) {
|
||||||
final String[] k = keyword.split(":");
|
final String[] k = keyword.split(":");
|
||||||
final Cost cost = new Cost(k[1], false);
|
final Cost cost = new Cost(k[1], false);
|
||||||
|
final boolean onlyMana = cost.isOnlyManaCost();
|
||||||
|
final boolean complex = k[1].contains("X") || k[1].contains("Sac<");
|
||||||
|
final String extra = k.length > 2 ? ", " + k[2] + "." : "";
|
||||||
|
|
||||||
StringBuilder sbCost = new StringBuilder(k[0]);
|
sbLong.append(k[0]).append(onlyMana ? " " : "—").append(cost.toSimpleString());
|
||||||
if (!cost.isOnlyManaCost()) {
|
sbLong.append(onlyMana? "" : ".").append(extra);
|
||||||
sbCost.append("—");
|
sbLong.append(!complex ? " (" + (inst.getReminderText()) + ")" : "");
|
||||||
} else {
|
|
||||||
sbCost.append(" ");
|
|
||||||
}
|
|
||||||
sbCost.append(cost.toSimpleString());
|
|
||||||
sbLong.append(sbCost).append(" (").append(inst.getReminderText()).append(")");
|
|
||||||
sbLong.append("\r\n");
|
sbLong.append("\r\n");
|
||||||
} else if (keyword.endsWith(" offering")) {
|
} else if (keyword.endsWith(" offering")) {
|
||||||
String offeringType = keyword.split(" ")[0];
|
String offeringType = keyword.split(" ")[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user