fix text generation in new damage effect classes

This commit is contained in:
xenohedron 2025-11-18 20:50:21 -05:00
parent 2893fb43fc
commit 4dcf37e007
5 changed files with 9 additions and 9 deletions

View file

@ -74,7 +74,7 @@ public class DamageTargetAndAllControlledEffect extends OneShotEffect {
return staticText;
}
String description = getTargetPointer().describeTargets(mode.getTargets(), "that player");
return "{this} deals " + firstAmount + "damage to " + description +
return "{this} deals " + firstAmount + " damage to " + description +
" and " + secondAmount + " damage to each " + filter.getMessage() +
" that player" +
(description.contains("planeswalker") ? " or that planeswalker's controller" : "") +

View file

@ -70,8 +70,8 @@ public class DamageTargetAndSelfEffect extends OneShotEffect {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
return "{this} deals " + firstAmount + "damage to " +
return "{this} deals " + firstAmount + " damage to " +
getTargetPointer().describeTargets(mode.getTargets(), "that creature") +
" and " + secondAmount + "damage to itself";
" and " + secondAmount + " damage to itself";
}
}

View file

@ -62,8 +62,8 @@ public class DamageTargetAndTargetControllerEffect extends OneShotEffect {
return staticText;
}
String description = getTargetPointer().describeTargets(mode.getTargets(), "that creature");
return "{this} deals " + firstAmount + "damage to " + description +
" and " + secondAmount + "damage to that " +
return "{this} deals " + firstAmount + " damage to " + description +
" and " + secondAmount + " damage to that " +
(description.contains(" or ") ? "permanent's" : "creature's") + " controller";
}
}

View file

@ -66,7 +66,7 @@ public class DamageTargetAndTargetEffect extends OneShotEffect {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
return "{this} deals " + firstAmount + "damage to " + mode.getTargets().getByTag(1).getDescription() +
" and " + secondAmount + "damage to " + mode.getTargets().getByTag(2).getDescription();
return "{this} deals " + firstAmount + " damage to " + mode.getTargets().getByTag(1).getDescription() +
" and " + secondAmount + " damage to " + mode.getTargets().getByTag(2).getDescription();
}
}

View file

@ -70,8 +70,8 @@ public class DamageTargetAndYouEffect extends OneShotEffect {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
return "{this} deals " + firstAmount + "damage to " +
return "{this} deals " + firstAmount + " damage to " +
getTargetPointer().describeTargets(mode.getTargets(), "that creature") +
" and " + secondAmount + "damage to you";
" and " + secondAmount + " damage to you";
}
}