[DMU] Implemented Shanna, Purifying Blade

This commit is contained in:
Evan Kranzler 2022-09-05 20:24:46 -04:00
parent a24cdb31fc
commit c745bce734
5 changed files with 99 additions and 15 deletions

View file

@ -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;
}