Some changes to rule text generation, minor format changes.

This commit is contained in:
LevelX2 2013-01-06 11:19:01 +01:00
parent 11e2df7a86
commit 2e31aacfaf
8 changed files with 54 additions and 23 deletions

View file

@ -34,7 +34,11 @@ public class PermanentsOnBattlefieldCount implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility) {
return amount * game.getBattlefield().count(filter, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game);
int value = game.getBattlefield().count(filter, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game);
if (amount != null) {
value *= amount;
}
return value;
}
@Override
@ -47,7 +51,7 @@ public class PermanentsOnBattlefieldCount implements DynamicValue {
if (amount != null) {
return amount.toString();
}
return "";
return "X";
}
@Override