mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Small improvement to tooltip text generation.
This commit is contained in:
parent
d5efeb3e95
commit
76b98535ca
1 changed files with 10 additions and 1 deletions
|
@ -485,7 +485,16 @@ public abstract class AbilityImpl<T extends AbilityImpl<T>> implements Ability {
|
|||
}
|
||||
String text = modes.getText();
|
||||
if (!text.isEmpty()) {
|
||||
sbRule.append(Character.toUpperCase(text.charAt(0))).append(text.substring(1));
|
||||
if (sbRule.length() > 1) {
|
||||
String end = sbRule.substring(sbRule.length()-2).trim();
|
||||
if (end.isEmpty() || end.equals(":") || end.equals(".")) {
|
||||
sbRule.append(Character.toUpperCase(text.charAt(0))).append(text.substring(1));
|
||||
} else {
|
||||
sbRule.append(text);
|
||||
}
|
||||
} else {
|
||||
sbRule.append(text);
|
||||
}
|
||||
}
|
||||
|
||||
return sbRule.toString();
|
||||
|
|
Loading…
Reference in a new issue