[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.abilities.Ability;
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.effects.ContinuousEffectImpl;
import mage.filter.common.FilterCreaturePermanent;
@ -118,22 +116,25 @@ public class BoostAllEffect extends ContinuousEffectImpl<BoostAllEffect> {
private void setText() {
StringBuilder sb = new StringBuilder();
if (excludeSource)
if (excludeSource) {
sb.append("Other ");
sb.append(filter.getMessage()).append(" gets ");
}
sb.append(filter.getMessage()).append(" get ");
String p = power.toString();
if(!p.startsWith("-"))
if (!p.startsWith("-")) {
sb.append("+");
}
sb.append(p).append("/");
String t = toughness.toString();
if(!t.startsWith("-")){
if(p.startsWith("-"))
if (!t.startsWith("-")) {
if (p.startsWith("-")) {
sb.append("-");
else
} else {
sb.append("+");
}
}
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());
staticText = sb.toString();
}

View file

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