mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
format BoostEnchanted and BoostAll like BoostSource
improves Aspect of Wolf, corrects Death's Approach
This commit is contained in:
parent
95f14536eb
commit
ec971140ec
5 changed files with 43 additions and 11 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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());
|
||||||
|
|
|
||||||
|
|
@ -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());
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue