Search in sources :

Example 1 with AddCardSubTypeSourceEffect

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

the class FigureOfDestinyWarriorEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Permanent permanent = source.getSourcePermanentIfItStillExists(game);
    if (permanent == null || !permanent.hasSubtype(SubType.WARRIOR, game)) {
        return false;
    }
    game.addEffect(new AddCardSubTypeSourceEffect(Duration.Custom, SubType.KITHKIN, SubType.SPIRIT, SubType.WARRIOR, SubType.AVATAR), source);
    game.addEffect(new SetPowerToughnessSourceEffect(8, 8, Duration.Custom, SubLayer.SetPT_7b), source);
    game.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.Custom), source);
    game.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.Custom), source);
    return true;
}
Also used : SetPowerToughnessSourceEffect(mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect) Permanent(mage.game.permanent.Permanent) GainAbilitySourceEffect(mage.abilities.effects.common.continuous.GainAbilitySourceEffect) AddCardSubTypeSourceEffect(mage.abilities.effects.common.continuous.AddCardSubTypeSourceEffect)

Example 2 with AddCardSubTypeSourceEffect

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

the class WardenOfTheFirstTreeEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Permanent permanent = source.getSourcePermanentIfItStillExists(game);
    if (permanent == null || !permanent.hasSubtype(SubType.WARRIOR, game)) {
        return false;
    }
    game.addEffect(new AddCardSubTypeSourceEffect(Duration.Custom, SubType.HUMAN, SubType.SPIRIT, SubType.WARRIOR), source);
    game.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.Custom), source);
    game.addEffect(new GainAbilitySourceEffect(LifelinkAbility.getInstance(), Duration.Custom), source);
    return true;
}
Also used : FilterPermanent(mage.filter.FilterPermanent) Permanent(mage.game.permanent.Permanent) GainAbilitySourceEffect(mage.abilities.effects.common.continuous.GainAbilitySourceEffect) AddCardSubTypeSourceEffect(mage.abilities.effects.common.continuous.AddCardSubTypeSourceEffect)

Aggregations

AddCardSubTypeSourceEffect (mage.abilities.effects.common.continuous.AddCardSubTypeSourceEffect)2 GainAbilitySourceEffect (mage.abilities.effects.common.continuous.GainAbilitySourceEffect)2 Permanent (mage.game.permanent.Permanent)2 SetPowerToughnessSourceEffect (mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect)1 FilterPermanent (mage.filter.FilterPermanent)1