[minor] fix for rule text

This commit is contained in:
North 2012-07-29 16:02:49 +03:00
parent 6dc71063db
commit b2863e74d1
2 changed files with 11 additions and 10 deletions

View file

@ -34,8 +34,6 @@ import mage.Constants.Outcome;
import mage.Constants.SubLayer; import mage.Constants.SubLayer;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DomainValue;
import mage.abilities.dynamicvalue.common.SignInversionDynamicValue;
import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.ContinuousEffectImpl;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
@ -118,22 +116,25 @@ public class BoostAllEffect extends ContinuousEffectImpl<BoostAllEffect> {
private void setText() { private void setText() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
if (excludeSource) if (excludeSource) {
sb.append("Other "); sb.append("Other ");
sb.append(filter.getMessage()).append(" gets "); }
sb.append(filter.getMessage()).append(" get ");
String p = power.toString(); String p = power.toString();
if(!p.startsWith("-")) if (!p.startsWith("-")) {
sb.append("+"); sb.append("+");
}
sb.append(p).append("/"); sb.append(p).append("/");
String t = toughness.toString(); String t = toughness.toString();
if(!t.startsWith("-")){ if (!t.startsWith("-")) {
if(p.startsWith("-")) if (p.startsWith("-")) {
sb.append("-"); sb.append("-");
else } else {
sb.append("+"); sb.append("+");
}
} }
sb.append(t); sb.append(t);
sb.append((duration==Duration.EndOfTurn?" until end of turn":"")); sb.append((duration == Duration.EndOfTurn ? " until end of turn" : ""));
sb.append(power.getMessage()); sb.append(power.getMessage());
staticText = sb.toString(); staticText = sb.toString();
} }

View file

@ -56,7 +56,7 @@ public class GainAbilitySourceEffect extends ContinuousEffectImpl<GainAbilitySou
public GainAbilitySourceEffect(Ability ability, Duration duration) { public GainAbilitySourceEffect(Ability ability, Duration duration) {
super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); super(duration, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
this.ability = ability; this.ability = ability;
staticText = "{this} gains \"" + ability.getRule() + "\"" + duration.toString(); staticText = "{this} gains \"" + ability.getRule() + "\" " + duration.toString();
} }
public GainAbilitySourceEffect(final GainAbilitySourceEffect effect) { public GainAbilitySourceEffect(final GainAbilitySourceEffect effect) {