This commit is contained in:
Loki 2012-07-05 10:53:36 +12:00
parent 3b024f312e
commit 25b596bff7
5 changed files with 262 additions and 1 deletions

View file

@ -0,0 +1,27 @@
package mage.abilities.dynamicvalue.common;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.game.Game;
import mage.players.Player;
public class ControllerLifeCount implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility) {
Player p = game.getPlayer(sourceAbility.getControllerId());
if (p != null) {
return p.getLife();
}
return 0;
}
@Override
public DynamicValue clone() {
return new ControllerLifeCount();
}
@Override
public String getMessage() {
return "your life total";
}
}