Search in sources :

Example 1 with DealsCombatDamageToAPlayerTriggeredAbility

use of mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility in project mage by magefree.

the class AscendantSpiritAngelEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Permanent permanent = source.getSourcePermanentIfItStillExists(game);
    if (permanent == null || !permanent.hasSubtype(SubType.ANGEL, game)) {
        return false;
    }
    permanent.addCounters(CounterType.P1P1.createInstance(2), source.getControllerId(), source, game);
    game.addEffect(new GainAbilitySourceEffect(new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1), false), Duration.Custom), source);
    return true;
}
Also used : DealsCombatDamageToAPlayerTriggeredAbility(mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility) Permanent(mage.game.permanent.Permanent) GainAbilitySourceEffect(mage.abilities.effects.common.continuous.GainAbilitySourceEffect) DrawCardSourceControllerEffect(mage.abilities.effects.common.DrawCardSourceControllerEffect)

Aggregations

DealsCombatDamageToAPlayerTriggeredAbility (mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility)1 DrawCardSourceControllerEffect (mage.abilities.effects.common.DrawCardSourceControllerEffect)1 GainAbilitySourceEffect (mage.abilities.effects.common.continuous.GainAbilitySourceEffect)1 Permanent (mage.game.permanent.Permanent)1