mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
[STX] Implemented Brackish Trudge
This commit is contained in:
parent
f2f04be08b
commit
3914aa656a
3 changed files with 59 additions and 6 deletions
|
|
@ -17,16 +17,12 @@ public class YouGainedLifeCondition extends IntCompareCondition {
|
|||
|
||||
@Override
|
||||
protected int getInputValue(Game game, Ability source) {
|
||||
int gainedLife = 0;
|
||||
PlayerGainedLifeWatcher watcher = game.getState().getWatcher(PlayerGainedLifeWatcher.class);
|
||||
if (watcher != null) {
|
||||
gainedLife = watcher.getLifeGained(source.getControllerId());
|
||||
}
|
||||
return gainedLife;
|
||||
return watcher == null ? 0 : watcher.getLifeGained(source.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("if you gained %s or more life this turn", value + 1);
|
||||
return "if you gained " + (value == 0 ? "" : (value + 1) + " or more ") + "life this turn";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue