this is a big one - fixed modal targetting and refactored getText()

This commit is contained in:
BetaSteward 2011-07-21 22:04:08 -04:00
parent 1b6e78c489
commit 84b9cbb16b
373 changed files with 912 additions and 1814 deletions

View file

@ -13,6 +13,7 @@ public class RemoveCounterSourceEffect extends OneShotEffect<RemoveCounterSource
public RemoveCounterSourceEffect(Counter counter) {
super(Constants.Outcome.UnboostCreature);
this.counter = counter;
setText();
}
public RemoveCounterSourceEffect(RemoveCounterSourceEffect effect) {
@ -35,13 +36,12 @@ public class RemoveCounterSourceEffect extends OneShotEffect<RemoveCounterSource
return new RemoveCounterSourceEffect(this);
}
@Override
public String getText(Ability source) {
private void setText() {
if (counter.getCount() > 1) {
StringBuilder sb = new StringBuilder();
sb.append("remove ").append(Integer.toString(counter.getCount())).append(" ").append(counter.getName()).append(" counters from {this}");
return sb.toString();
staticText = sb.toString();
} else
return "remove a " + counter.getName() + " counter from {this}";
staticText = "remove a " + counter.getName() + " counter from {this}";
}
}