mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 11:02:00 -08:00
game: fixed wrong logs formatting on multiple targets
This commit is contained in:
parent
c89f78dbc5
commit
e507627dae
1 changed files with 7 additions and 0 deletions
|
|
@ -1288,6 +1288,7 @@ public abstract class AbilityImpl implements Ability {
|
||||||
StringBuilder sb = new StringBuilder(); // threadLocal StringBuilder can't be used because calling method already uses it
|
StringBuilder sb = new StringBuilder(); // threadLocal StringBuilder can't be used because calling method already uses it
|
||||||
if (!targets.isEmpty()) {
|
if (!targets.isEmpty()) {
|
||||||
String usedVerb = null;
|
String usedVerb = null;
|
||||||
|
boolean isFirstTarget = true;
|
||||||
for (Target target : targets) {
|
for (Target target : targets) {
|
||||||
if (!target.getTargets().isEmpty()) {
|
if (!target.getTargets().isEmpty()) {
|
||||||
String targetHintInfo = target.getChooseHint() == null ? "" : " (" + target.getChooseHint() + ")";
|
String targetHintInfo = target.getChooseHint() == null ? "" : " (" + target.getChooseHint() + ")";
|
||||||
|
|
@ -1300,6 +1301,12 @@ public abstract class AbilityImpl implements Ability {
|
||||||
usedVerb = " choosing ";
|
usedVerb = " choosing ";
|
||||||
sb.append(usedVerb);
|
sb.append(usedVerb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isFirstTarget) {
|
||||||
|
sb.append(", ");
|
||||||
|
}
|
||||||
|
isFirstTarget = false;
|
||||||
|
|
||||||
sb.append(target.getTargetedName(game));
|
sb.append(target.getTargetedName(game));
|
||||||
sb.append(targetHintInfo);
|
sb.append(targetHintInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue