forked from External/mage
[DMU] Implemented Shanna, Purifying Blade
This commit is contained in:
parent
a24cdb31fc
commit
c745bce734
5 changed files with 99 additions and 15 deletions
|
|
@ -8,8 +8,6 @@ import mage.abilities.hint.ValueHint;
|
|||
import mage.game.Game;
|
||||
import mage.watchers.common.PlayerGainedLifeWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Amount of life the controller got this turn.
|
||||
*
|
||||
|
|
@ -22,13 +20,9 @@ public enum ControllerGotLifeCount implements DynamicValue {
|
|||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return this.calculate(game, sourceAbility.getControllerId());
|
||||
}
|
||||
|
||||
public int calculate(Game game, UUID controllerId) {
|
||||
PlayerGainedLifeWatcher watcher = game.getState().getWatcher(PlayerGainedLifeWatcher.class);
|
||||
if (watcher != null) {
|
||||
return watcher.getLifeGained(controllerId);
|
||||
return watcher.getLifeGained(sourceAbility.getControllerId());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue