Some rule text generation changes to common classes.

This commit is contained in:
LevelX2 2013-05-03 14:53:56 +02:00
parent b1d54096cf
commit 435ec0d556
2 changed files with 5 additions and 3 deletions

View file

@ -36,6 +36,7 @@ import mage.abilities.effects.ContinuousEffectImpl;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.util.CardUtil;
/**
*
@ -54,7 +55,7 @@ public class CantBeBlockedByOneAllEffect extends ContinuousEffectImpl<CantBeBloc
super(duration, Outcome.Benefit);
this.amount = amount;
this.filter = filter;
staticText = "Each " + filter.getMessage() + " can't be blocked except by " + amount + " or more creatures";
staticText = new StringBuilder("Each ").append(filter.getMessage()).append(" can't be blocked except by ").append(CardUtil.numberToText(amount)).append(" or more creatures").toString();
}
public CantBeBlockedByOneAllEffect(final CantBeBlockedByOneAllEffect effect) {
@ -89,4 +90,4 @@ public class CantBeBlockedByOneAllEffect extends ContinuousEffectImpl<CantBeBloc
public boolean hasLayer(Layer layer) {
return layer == Layer.RulesEffects;
}
}
}

View file

@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect;
import mage.counters.common.PlusOneCounter;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.util.CardUtil;
/**
*
@ -77,7 +78,7 @@ public class AddPlusOneCountersAttachedEffect extends OneShotEffect<AddPlusOneCo
private void setText() {
if (amount > 1) {
staticText = "put " + Integer.toString(amount) + " +1/+1 counters on enchanted creature";
staticText = new StringBuilder("put ").append(CardUtil.numberToText(amount)).append(" +1/+1 counters on enchanted creature").toString();
}
else {
staticText = "put a +1/+1 counter on enchanted creature";