use of mage.abilities.effects.common.RegenerateTargetEffect in project mage by magefree.
the class DarkDabblingEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
if (SpellMasteryCondition.instance.apply(game, source)) {
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game)) {
if (!permanent.getId().equals(getTargetPointer().getFirst(game, source))) {
RegenerateTargetEffect regenEffect = new RegenerateTargetEffect();
regenEffect.setTargetPointer(new FixedTarget(permanent, game));
game.addEffect(regenEffect, source);
}
}
}
return true;
}
use of mage.abilities.effects.common.RegenerateTargetEffect 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;
}
Aggregations