format BoostEnchanted and BoostAll like BoostSource

improves Aspect of Wolf, corrects Death's Approach
This commit is contained in:
Neil Gentleman 2015-11-24 23:14:38 -08:00
parent 95f14536eb
commit ec971140ec
5 changed files with 43 additions and 11 deletions

View file

@ -190,8 +190,27 @@ public class BoostAllEffect extends ContinuousEffectImpl {
}
}
sb.append(t);
sb.append((duration == Duration.EndOfTurn ? " until end of turn" : ""));
sb.append(power.getMessage());
if (duration == Duration.EndOfTurn) {
sb.append(" until end of turn");
}
String message = null;
String fixedPart = null;
if (t.contains("X")) {
message = toughness.getMessage();
fixedPart = ", where X is ";
} else if (p.contains("X")) {
message = power.getMessage();
fixedPart = ", where X is ";
} else if (!power.getMessage().isEmpty()) {
message = power.getMessage();
fixedPart = " for each ";
} else if (!toughness.getMessage().isEmpty()) {
message = toughness.getMessage();
fixedPart = " for each ";
}
if (message != null && !message.isEmpty() && fixedPart != null) {
sb.append(fixedPart).append(message);
}
staticText = sb.toString();
}

View file

@ -133,11 +133,24 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl {
if (duration != Duration.WhileOnBattlefield) {
sb.append(" ").append(duration.toString());
}
String message = power.getMessage();
if (message.length() > 0) {
sb.append(" for each ");
String message = null;
String fixedPart = null;
if (t.contains("X")) {
message = toughness.getMessage();
fixedPart = ", where X is ";
} else if (p.contains("X")) {
message = power.getMessage();
fixedPart = ", where X is ";
} else if (!power.getMessage().isEmpty()) {
message = power.getMessage();
fixedPart = " for each ";
} else if (!toughness.getMessage().isEmpty()) {
message = toughness.getMessage();
fixedPart = " for each ";
}
if (message != null && !message.isEmpty() && fixedPart != null) {
sb.append(fixedPart).append(message);
}
sb.append(message);
staticText = sb.toString();
}