[minor] rule text formatting.

This commit is contained in:
LevelX2 2013-06-16 09:22:44 +02:00
parent df2fd3f68e
commit 3def3230ee

View file

@ -34,6 +34,7 @@ import mage.abilities.costs.CostImpl;
import mage.counters.Counter; import mage.counters.Counter;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.util.CardUtil;
/** /**
* *
@ -47,8 +48,10 @@ public class RemoveCountersSourceCost extends CostImpl<RemoveCountersSourceCost>
public RemoveCountersSourceCost(Counter counter) { public RemoveCountersSourceCost(Counter counter) {
this.amount = counter.getCount(); this.amount = counter.getCount();
this.name = counter.getName(); this.name = counter.getName();
this.text = "Remove " + (amount == 1 ? "a" : amount) + " " + name + " counter" this.text = new StringBuilder("Remove ").append((amount == 1 ? "a" : CardUtil.numberToText(amount)))
+ (amount != 1 ? "s" : "") + " from {this}"; .append(" ").append(name).append(" counter").append((amount != 1 ? "s" : ""))
.append(" from {this}").toString();
} }
public RemoveCountersSourceCost(RemoveCountersSourceCost cost) { public RemoveCountersSourceCost(RemoveCountersSourceCost cost) {