mirror of
https://github.com/correl/mage.git
synced 2024-11-21 19:18:40 +00:00
BoostSourceEffect: format X like BoostTargetEffect
primarily to fix Chameleon Colossus and friends, but also updated Terra Ravager's ability to match the corrected format, and now both Source and Target support -X, for Death's Shadow.
This commit is contained in:
parent
7830dc1098
commit
eda5d1a1ef
4 changed files with 20 additions and 9 deletions
|
@ -106,6 +106,6 @@ class TerraRavagerLandCount implements DynamicValue {
|
|||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "land defending player controls";
|
||||
return "the number of lands defending player controls";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,8 @@ public class DeathsShadow extends CardImpl {
|
|||
this.toughness = new MageInt(13);
|
||||
|
||||
// Death's Shadow gets -X/-X, where X is your life total.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new SignInversionDynamicValue(new ControllerLifeCount()), new SignInversionDynamicValue(new ControllerLifeCount()), Duration.WhileOnBattlefield)));
|
||||
SignInversionDynamicValue x = new SignInversionDynamicValue(new ControllerLifeCount());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(x, x, Duration.WhileOnBattlefield)));
|
||||
}
|
||||
|
||||
public DeathsShadow(final DeathsShadow card) {
|
||||
|
|
|
@ -137,14 +137,24 @@ public class BoostSourceEffect extends ContinuousEffectImpl implements SourceEff
|
|||
if (duration != Duration.WhileOnBattlefield) {
|
||||
sb.append(" ").append(duration.toString());
|
||||
}
|
||||
String message = power.getMessage();
|
||||
if (message.length() == 0) {
|
||||
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.length() > 0) {
|
||||
sb.append(" for each ");
|
||||
if (message != null && !message.isEmpty() && fixedPart != null) {
|
||||
sb.append(fixedPart).append(message);
|
||||
}
|
||||
sb.append(message);
|
||||
staticText = sb.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -150,10 +150,10 @@ public class BoostTargetEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
String message = null;
|
||||
String fixedPart = null;
|
||||
if (t.equals("X")) {
|
||||
if (t.contains("X")) {
|
||||
message = toughness.getMessage();
|
||||
fixedPart = ", where X is ";
|
||||
} else if (p.equals("X")) {
|
||||
} else if (p.contains("X")) {
|
||||
message = power.getMessage();
|
||||
fixedPart = ", where X is ";
|
||||
} else if (!power.getMessage().isEmpty()) {
|
||||
|
|
Loading…
Reference in a new issue