Examples of OpponentsLostLifeCount


Examples of mage.abilities.dynamicvalue.common.OpponentsLostLifeCount

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null) {
            OpponentsLostLifeCount dynamicValue = new OpponentsLostLifeCount();
            if (dynamicValue != null) {
                int oll = dynamicValue.calculate(game, source, this);
                if (oll > 0) {
                    permanent.addCounters(CounterType.P1P1.createInstance(oll), game);
                }
                return true;
            }
View Full Code Here

Examples of mage.abilities.dynamicvalue.common.OpponentsLostLifeCount

    }

    @Override
    public boolean applies(GameEvent event, Ability source, Game game) {
        if (event.getType() == EventType.CAST_SPELL && event.getSourceId().equals(source.getSourceId())) {
            if (new OpponentsLostLifeCount().calculate(game, source, this) == 0) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.abilities.dynamicvalue.common.OpponentsLostLifeCount

    @Override
    public boolean apply(Game game, Ability source, Ability abilityToModify) {
        Ability spellAbility = (SpellAbility) abilityToModify;
        if (spellAbility != null) {
            OpponentsLostLifeCount dynamicValue = new OpponentsLostLifeCount();
            int amount = dynamicValue.calculate(game, source, this);
            if (amount > 0) {
                CardUtil.reduceCost(spellAbility, amount);
                return true;
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.