mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -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
|
||||
if (!targets.isEmpty()) {
|
||||
String usedVerb = null;
|
||||
boolean isFirstTarget = true;
|
||||
for (Target target : targets) {
|
||||
if (!target.getTargets().isEmpty()) {
|
||||
String targetHintInfo = target.getChooseHint() == null ? "" : " (" + target.getChooseHint() + ")";
|
||||
|
|
@ -1300,6 +1301,12 @@ public abstract class AbilityImpl implements Ability {
|
|||
usedVerb = " choosing ";
|
||||
sb.append(usedVerb);
|
||||
}
|
||||
|
||||
if (!isFirstTarget) {
|
||||
sb.append(", ");
|
||||
}
|
||||
isFirstTarget = false;
|
||||
|
||||
sb.append(target.getTargetedName(game));
|
||||
sb.append(targetHintInfo);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue