mirror of
https://github.com/correl/mage.git
synced 2024-11-29 03:00:12 +00:00
Fixed wrong ends symbols in combined effects rules like IfDoCost;
This commit is contained in:
parent
26bdd8c0e8
commit
ce3f6d8e41
1 changed files with 12 additions and 1 deletions
|
@ -71,7 +71,18 @@ public class Effects extends ArrayList<Effect> {
|
||||||
nextRule = Character.toUpperCase(nextRule.charAt(0)) + nextRule.substring(1);
|
nextRule = Character.toUpperCase(nextRule.charAt(0)) + nextRule.substring(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sbText.append(endString).append(nextRule);
|
|
||||||
|
String currentRule = endString + nextRule;
|
||||||
|
// fix dot in the combined effect like IfDoCost
|
||||||
|
if (sbText.length() > 0 && currentRule.length() > 0) {
|
||||||
|
boolean prevTextEndsWithDot = sbText.charAt(sbText.length() - 1) == '.';
|
||||||
|
boolean currentTextStartsWithDot = currentRule.startsWith(",") || currentRule.startsWith(".");
|
||||||
|
if (prevTextEndsWithDot && currentTextStartsWithDot) {
|
||||||
|
sbText.delete(sbText.length() - 1, sbText.length());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sbText.append(currentRule);
|
||||||
}
|
}
|
||||||
lastRule = nextRule;
|
lastRule = nextRule;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue