mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Some rule text generation changes to common classes.
This commit is contained in:
parent
b1d54096cf
commit
435ec0d556
2 changed files with 5 additions and 3 deletions
|
@ -36,6 +36,7 @@ import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
import mage.filter.common.FilterCreaturePermanent;
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -54,7 +55,7 @@ public class CantBeBlockedByOneAllEffect extends ContinuousEffectImpl<CantBeBloc
|
||||||
super(duration, Outcome.Benefit);
|
super(duration, Outcome.Benefit);
|
||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
this.filter = filter;
|
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) {
|
public CantBeBlockedByOneAllEffect(final CantBeBlockedByOneAllEffect effect) {
|
||||||
|
@ -89,4 +90,4 @@ public class CantBeBlockedByOneAllEffect extends ContinuousEffectImpl<CantBeBloc
|
||||||
public boolean hasLayer(Layer layer) {
|
public boolean hasLayer(Layer layer) {
|
||||||
return layer == Layer.RulesEffects;
|
return layer == Layer.RulesEffects;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.counters.common.PlusOneCounter;
|
import mage.counters.common.PlusOneCounter;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.util.CardUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -77,7 +78,7 @@ public class AddPlusOneCountersAttachedEffect extends OneShotEffect<AddPlusOneCo
|
||||||
|
|
||||||
private void setText() {
|
private void setText() {
|
||||||
if (amount > 1) {
|
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 {
|
else {
|
||||||
staticText = "put a +1/+1 counter on enchanted creature";
|
staticText = "put a +1/+1 counter on enchanted creature";
|
||||||
|
|
Loading…
Reference in a new issue