mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
2 USG
This commit is contained in:
parent
3b024f312e
commit
25b596bff7
5 changed files with 262 additions and 1 deletions
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue