Search in sources :

Example 1 with LoseAbilitySourceEffect

use of mage.abilities.effects.common.continuous.LoseAbilitySourceEffect in project mage by magefree.

the class SentryOakEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    if (game.getPermanent(source.getSourceId()) != null) {
        ContinuousEffect continuousEffect = new BoostSourceEffect(2, 0, Duration.EndOfTurn);
        game.addEffect(continuousEffect, source);
        continuousEffect = new LoseAbilitySourceEffect(DefenderAbility.getInstance(), Duration.EndOfTurn);
        game.addEffect(continuousEffect, source);
        return true;
    }
    return false;
}
Also used : BoostSourceEffect(mage.abilities.effects.common.continuous.BoostSourceEffect) LoseAbilitySourceEffect(mage.abilities.effects.common.continuous.LoseAbilitySourceEffect) ContinuousEffect(mage.abilities.effects.ContinuousEffect)

Aggregations

ContinuousEffect (mage.abilities.effects.ContinuousEffect)1 BoostSourceEffect (mage.abilities.effects.common.continuous.BoostSourceEffect)1 LoseAbilitySourceEffect (mage.abilities.effects.common.continuous.LoseAbilitySourceEffect)1