Search in sources :

Example 1 with FightTargetsEffect

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

the class SavageSwipeEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Permanent permanent = game.getPermanent(source.getFirstTarget());
    if (permanent == null) {
        return false;
    }
    if (permanent.getPower().getValue() == 2) {
        ContinuousEffect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn);
        effect.setTargetPointer(new FixedTarget(permanent, game));
        game.addEffect(effect, source);
        game.getState().processAction(game);
    }
    return new FightTargetsEffect().apply(game, source);
}
Also used : FixedTarget(mage.target.targetpointer.FixedTarget) Permanent(mage.game.permanent.Permanent) TargetControlledCreaturePermanent(mage.target.common.TargetControlledCreaturePermanent) TargetPermanent(mage.target.TargetPermanent) BoostTargetEffect(mage.abilities.effects.common.continuous.BoostTargetEffect) FightTargetsEffect(mage.abilities.effects.common.FightTargetsEffect) ContinuousEffect(mage.abilities.effects.ContinuousEffect)

Example 2 with FightTargetsEffect

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

the class MagusOfTheArenaEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Permanent creature = game.getPermanent(source.getFirstTarget());
    if (creature != null) {
        creature.tap(source, game);
    }
    creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
    if (creature != null) {
        creature.tap(source, game);
    }
    return new FightTargetsEffect().apply(game, source);
}
Also used : TargetOpponentsChoicePermanent(mage.target.common.TargetOpponentsChoicePermanent) Permanent(mage.game.permanent.Permanent) FilterControlledCreaturePermanent(mage.filter.common.FilterControlledCreaturePermanent) TargetControlledCreaturePermanent(mage.target.common.TargetControlledCreaturePermanent) FightTargetsEffect(mage.abilities.effects.common.FightTargetsEffect)

Example 3 with FightTargetsEffect

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

the class ArenaEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Permanent creature = game.getPermanent(source.getFirstTarget());
    if (creature != null) {
        creature.tap(source, game);
    }
    creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
    if (creature != null) {
        creature.tap(source, game);
    }
    return new FightTargetsEffect().apply(game, source);
}
Also used : TargetOpponentsChoicePermanent(mage.target.common.TargetOpponentsChoicePermanent) Permanent(mage.game.permanent.Permanent) FilterControlledCreaturePermanent(mage.filter.common.FilterControlledCreaturePermanent) TargetControlledCreaturePermanent(mage.target.common.TargetControlledCreaturePermanent) FightTargetsEffect(mage.abilities.effects.common.FightTargetsEffect)

Aggregations

FightTargetsEffect (mage.abilities.effects.common.FightTargetsEffect)3 Permanent (mage.game.permanent.Permanent)3 TargetControlledCreaturePermanent (mage.target.common.TargetControlledCreaturePermanent)3 FilterControlledCreaturePermanent (mage.filter.common.FilterControlledCreaturePermanent)2 TargetOpponentsChoicePermanent (mage.target.common.TargetOpponentsChoicePermanent)2 ContinuousEffect (mage.abilities.effects.ContinuousEffect)1 BoostTargetEffect (mage.abilities.effects.common.continuous.BoostTargetEffect)1 TargetPermanent (mage.target.TargetPermanent)1 FixedTarget (mage.target.targetpointer.FixedTarget)1