mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* Log messages -Some more changes to handle message of targets without names (Morph) and targetlists that contain 0 targets.
This commit is contained in:
parent
c077a17d86
commit
42a7da9132
7 changed files with 16 additions and 14 deletions
|
|
@ -902,16 +902,18 @@ public abstract class AbilityImpl implements Ability {
|
|||
if (targets.size() > 0) {
|
||||
String usedVerb = null;
|
||||
for (Target target : targets) {
|
||||
if (!target.isNotTarget()) {
|
||||
if (usedVerb == null || usedVerb.equals(" choosing ")) {
|
||||
usedVerb = " targeting ";
|
||||
if (!target.getTargets().isEmpty()) {
|
||||
if (!target.isNotTarget()) {
|
||||
if (usedVerb == null || usedVerb.equals(" choosing ")) {
|
||||
usedVerb = " targeting ";
|
||||
sb.append(usedVerb);
|
||||
}
|
||||
} else if (target.isNotTarget() && (usedVerb == null || usedVerb.equals(" targeting "))) {
|
||||
usedVerb = " choosing ";
|
||||
sb.append(usedVerb);
|
||||
}
|
||||
} else if (target.isNotTarget() && (usedVerb == null || usedVerb.equals(" targeting "))) {
|
||||
usedVerb = " choosing ";
|
||||
sb.append(usedVerb);
|
||||
sb.append(target.getTargetedName(game));
|
||||
}
|
||||
sb.append(target.getTargetedName(game));
|
||||
}
|
||||
}
|
||||
for (Choice choice :this.getChoices()) {
|
||||
|
|
@ -922,7 +924,7 @@ public abstract class AbilityImpl implements Ability {
|
|||
|
||||
private String getOptionalTextSuffix(Game game, Spell spell) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Ability ability : (Abilities<Ability>) spell.getAbilities()) {
|
||||
for (Ability ability : spell.getAbilities()) {
|
||||
if (ability instanceof OptionalAdditionalSourceCosts) {
|
||||
sb.append(((OptionalAdditionalSourceCosts) ability).getCastMessageSuffix());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue