Search in sources :

Example 1 with ReplacementEffect

use of mage.abilities.effects.ReplacementEffect in project mage by magefree.

the class FullMoonsRiseEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) {
        ReplacementEffect effect = new RegenerateTargetEffect();
        effect.setTargetPointer(new FixedTarget(permanent, game));
        game.addEffect(effect, source);
    }
    return true;
}
Also used : FixedTarget(mage.target.targetpointer.FixedTarget) FilterPermanent(mage.filter.FilterPermanent) Permanent(mage.game.permanent.Permanent) FilterCreaturePermanent(mage.filter.common.FilterCreaturePermanent) ReplacementEffect(mage.abilities.effects.ReplacementEffect) RegenerateTargetEffect(mage.abilities.effects.common.RegenerateTargetEffect)

Aggregations

ReplacementEffect (mage.abilities.effects.ReplacementEffect)1 RegenerateTargetEffect (mage.abilities.effects.common.RegenerateTargetEffect)1 FilterPermanent (mage.filter.FilterPermanent)1 FilterCreaturePermanent (mage.filter.common.FilterCreaturePermanent)1 Permanent (mage.game.permanent.Permanent)1 FixedTarget (mage.target.targetpointer.FixedTarget)1