Some minor changes. Added a Kicker test.

This commit is contained in:
LevelX2 2015-05-07 21:54:28 +02:00
parent 9edc277374
commit 0ef2919a08
3 changed files with 73 additions and 36 deletions

View file

@ -47,7 +47,16 @@ public class CantAttackAllAnyPlayerEffect extends RestrictionEffect {
public CantAttackAllAnyPlayerEffect(Duration duration, FilterCreaturePermanent filter) {
super(duration);
this.filter = filter;
staticText = new StringBuilder(filter.getMessage()).append(" can't attack").toString();
StringBuilder sb = new StringBuilder(filter.getMessage()).append(" can't attack");
if (!duration.toString().isEmpty()) {
sb.append(" ");
if (duration.equals(Duration.EndOfTurn)) {
sb.append(" this turn");
} else {
sb.append(" ").append(duration.toString());
}
}
staticText = sb.toString();
}
public CantAttackAllAnyPlayerEffect(final CantAttackAllAnyPlayerEffect effect) {