forked from External/mage
too many usages to fix all at once, plus condition text needs updating, but this will give a cleaner option for new implementations
24 lines
555 B
Java
24 lines
555 B
Java
package mage.abilities.condition.common;
|
|
|
|
import mage.abilities.Ability;
|
|
import mage.abilities.condition.Condition;
|
|
import mage.game.Game;
|
|
import mage.players.Player;
|
|
|
|
/**
|
|
* @author Loki
|
|
*/
|
|
public enum FatefulHourCondition implements Condition {
|
|
instance;
|
|
|
|
@Override
|
|
public boolean apply(Game game, Ability source) {
|
|
Player player = game.getPlayer(source.getControllerId());
|
|
return player != null && player.getLife() <= 5;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "you have 5 or less life";
|
|
}
|
|
}
|