Search in sources :

Example 6 with DamageAllEffect

use of mage.abilities.effects.common.DamageAllEffect in project mage by magefree.

the class SwathcutterGiantEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    FilterCreaturePermanent filter = new FilterCreaturePermanent();
    filter.add(new ControllerIdPredicate(game.getCombat().getDefenderId(source.getSourceId())));
    return new DamageAllEffect(1, filter).apply(game, source);
}
Also used : FilterCreaturePermanent(mage.filter.common.FilterCreaturePermanent) ControllerIdPredicate(mage.filter.predicate.permanent.ControllerIdPredicate) DamageAllEffect(mage.abilities.effects.common.DamageAllEffect)

Aggregations

DamageAllEffect (mage.abilities.effects.common.DamageAllEffect)6 FilterCreaturePermanent (mage.filter.common.FilterCreaturePermanent)4 ControllerIdPredicate (mage.filter.predicate.permanent.ControllerIdPredicate)3 Permanent (mage.game.permanent.Permanent)3 Player (mage.players.Player)2 HashSet (java.util.HashSet)1 ReflexiveTriggeredAbility (mage.abilities.common.delayed.ReflexiveTriggeredAbility)1 PermanentsOnBattlefieldCount (mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount)1 Choice (mage.choices.Choice)1 ChoiceImpl (mage.choices.ChoiceImpl)1 FilterPermanent (mage.filter.FilterPermanent)1 FilterControlledPermanent (mage.filter.common.FilterControlledPermanent)1 PermanentIdPredicate (mage.filter.predicate.permanent.PermanentIdPredicate)1 Target (mage.target.Target)1 TargetControlledPermanent (mage.target.common.TargetControlledPermanent)1 TargetOpponentsCreaturePermanent (mage.target.common.TargetOpponentsCreaturePermanent)1