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