Search in sources :

Example 1 with BoostEquippedEffect

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

the class ArterialAlchemyEffect method apply.

@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
    for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
        switch(layer) {
            case TypeChangingEffects_4:
                permanent.addSubType(game, SubType.EQUIPMENT);
                break;
            case AbilityAddingRemovingEffects_6:
                permanent.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(2, 0)), source.getSourceId(), game);
                permanent.addAbility(new EquipAbility(2), source.getSourceId(), game);
                break;
        }
    }
    return true;
}
Also used : FilterPermanent(mage.filter.FilterPermanent) FilterControlledPermanent(mage.filter.common.FilterControlledPermanent) Permanent(mage.game.permanent.Permanent) BoostEquippedEffect(mage.abilities.effects.common.continuous.BoostEquippedEffect) SimpleStaticAbility(mage.abilities.common.SimpleStaticAbility) EquipAbility(mage.abilities.keyword.EquipAbility)

Aggregations

SimpleStaticAbility (mage.abilities.common.SimpleStaticAbility)1 BoostEquippedEffect (mage.abilities.effects.common.continuous.BoostEquippedEffect)1 EquipAbility (mage.abilities.keyword.EquipAbility)1 FilterPermanent (mage.filter.FilterPermanent)1 FilterControlledPermanent (mage.filter.common.FilterControlledPermanent)1 Permanent (mage.game.permanent.Permanent)1