Fix CanBlockAdditionalCreatureEffect text when the effect lasts until end of turn

This commit is contained in:
LoneFox 2015-12-31 17:37:13 +02:00
parent f7c411712b
commit ce2c6bc0c8

View file

@ -96,15 +96,18 @@ public class CanBlockAdditionalCreatureEffect extends ContinuousEffectImpl {
} }
private String setText() { private String setText() {
StringBuilder sb = new StringBuilder("{this} can block "); String text = "{this} can block ";
switch(amount) { switch(amount) {
case 0: case 0:
sb.append("any number of creatures"); text += "any number of creatures";
break; break;
default: default:
sb.append(CardUtil.numberToText(amount, "an")).append(" additional creature").append(amount > 1 ? "s":""); text += CardUtil.numberToText(amount, "an") + " additional creature" + (amount > 1 ? "s" : "");
} }
return sb.toString(); if(duration == Duration.EndOfTurn) {
text += " this turn";
}
return text;
} }
@Override @Override