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

@ -51,6 +51,7 @@ public class DamageControllerEffect extends OneShotEffect<DamageControllerEffect
super(Outcome.Damage);
this.amount = amount;
this.preventable = preventable;
setText();
}
public int getAmount() {
@ -78,13 +79,12 @@ public class DamageControllerEffect extends OneShotEffect<DamageControllerEffect
return false;
}
@Override
public String getText(Ability source) {
private void setText() {
StringBuilder sb = new StringBuilder();
sb.append("{source} deals ").append(Integer.toString(amount)).append(" damage to you");
if (!preventable)
sb.append(". The damage can't be prevented");
return sb.toString();
staticText = sb.toString();
}
}