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

@ -66,9 +66,9 @@ public class DeathsApproach extends CardImpl {
Ability ability = new EnchantAbility(auraTarget.getTargetName()); Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability); this.addAbility(ability);
// Enchanted Creature gets -X/-X, where X is the number of creature cards in it's controller's graveyard. // Enchanted Creature gets -X/-X, where X is the number of creature cards in its controller's graveyard.
DynamicValue unboost = new SignInversionDynamicValue( DynamicValue unboost = new SignInversionDynamicValue(
new CardsInEnchantedCreaturesControllerGraveyardCount(new FilterCreatureCard("creature cards in it's controller's graveyard"))); new CardsInEnchantedCreaturesControllerGraveyardCount(new FilterCreatureCard("the number of creature cards in its controller's graveyard")));
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(unboost,unboost, Duration.WhileOnBattlefield)); ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(unboost,unboost, Duration.WhileOnBattlefield));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -47,8 +47,8 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
*/ */
public class MartonStromgald extends CardImpl { public class MartonStromgald extends CardImpl {
private static final FilterAttackingCreature attackingFilter = new FilterAttackingCreature(" for each attacking creature other than {this}"); private static final FilterAttackingCreature attackingFilter = new FilterAttackingCreature("attacking creature other than {this}");
private static final FilterBlockingCreature blockingFilter = new FilterBlockingCreature(" for each blocking creature other than {this}"); private static final FilterBlockingCreature blockingFilter = new FilterBlockingCreature("blocking creature other than {this}");
static { static {
attackingFilter.add(new AnotherPredicate()); attackingFilter.add(new AnotherPredicate());

View file

@ -49,7 +49,7 @@ import mage.filter.predicate.permanent.AnotherPredicate;
public class SliverLegion extends CardImpl { public class SliverLegion extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver", "All Sliver creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Sliver", "All Sliver creatures");
private static final FilterPermanent countfilter = new FilterPermanent("Sliver", " for each other Sliver on the battlefield"); private static final FilterPermanent countfilter = new FilterPermanent("Sliver", "other Sliver on the battlefield");
static { static {
countfilter.add(new AnotherPredicate()); countfilter.add(new AnotherPredicate());

View file

@ -190,8 +190,27 @@ public class BoostAllEffect extends ContinuousEffectImpl {
} }
} }
sb.append(t); sb.append(t);
sb.append((duration == Duration.EndOfTurn ? " until end of turn" : "")); if (duration == Duration.EndOfTurn) {
sb.append(power.getMessage()); 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(); staticText = sb.toString();
} }

View file

@ -133,11 +133,24 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl {
if (duration != Duration.WhileOnBattlefield) { if (duration != Duration.WhileOnBattlefield) {
sb.append(" ").append(duration.toString()); sb.append(" ").append(duration.toString());
} }
String message = power.getMessage(); String message = null;
if (message.length() > 0) { String fixedPart = null;
sb.append(" for each "); 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(); staticText = sb.toString();
} }