fixed missing mana costs

This commit is contained in:
BetaSteward 2010-04-16 03:36:31 +00:00
parent f11ab3b326
commit 9ca981955c

View file

@ -68,7 +68,19 @@ public class KickerAbility extends StaticAbility {
@Override
public String getRule() {
return "Kicker " + costs.getText() + ":" + effects.getText() + (replaces?" instead":"");
StringBuilder sb = new StringBuilder();
sb.append("Kicker");
if (manaCosts.size() > 0) {
sb.append(manaCosts.getText());
if (costs.size() > 0)
sb.append(",");
}
if (costs.size() > 0)
sb.append(costs.getText());
sb.append(":").append(effects.getText());
if (replaces)
sb.append(" instead");
return sb.toString();
}
}