Search in sources :

Example 46 with BoostTargetEffect

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

the class PufferExtractEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    int xValue = source.getManaCostsToPay().getX();
    game.addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn), source);
    game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new DestroyTargetEffect().setTargetPointer(new FixedTarget(source.getFirstTarget(), game))), source);
    return true;
}
Also used : FixedTarget(mage.target.targetpointer.FixedTarget) AtTheBeginOfNextEndStepDelayedTriggeredAbility(mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility) DestroyTargetEffect(mage.abilities.effects.common.DestroyTargetEffect) BoostTargetEffect(mage.abilities.effects.common.continuous.BoostTargetEffect)

Example 47 with BoostTargetEffect

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

the class RayOfEnfeeblementEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Permanent permanent = game.getPermanent(source.getFirstTarget());
    if (permanent == null) {
        return false;
    }
    game.addEffect(new BoostTargetEffect(-4, permanent.getColor(game).isWhite() ? -4 : -1, Duration.EndOfTurn), source);
    return true;
}
Also used : Permanent(mage.game.permanent.Permanent) TargetCreaturePermanent(mage.target.common.TargetCreaturePermanent) BoostTargetEffect(mage.abilities.effects.common.continuous.BoostTargetEffect)

Example 48 with BoostTargetEffect

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

the class TowerAboveTriggeredAbility method apply.

@Override
public boolean apply(Game game, Ability source) {
    Permanent target = game.getPermanent(source.getFirstTarget());
    if (target == null) {
        return false;
    }
    ContinuousEffect effect = new BoostTargetEffect(4, 4, Duration.EndOfTurn);
    ContinuousEffect effect2 = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn);
    ContinuousEffect effect3 = new GainAbilityTargetEffect(WitherAbility.getInstance(), Duration.EndOfTurn);
    ContinuousEffect effect4 = new GainAbilityTargetEffect(new TowerAboveTriggeredAbility(), Duration.EndOfTurn);
    effect.setTargetPointer(new FixedTarget(target.getId(), game));
    effect2.setTargetPointer(new FixedTarget(target.getId(), game));
    effect3.setTargetPointer(new FixedTarget(target.getId(), game));
    effect4.setTargetPointer(new FixedTarget(target.getId(), game));
    effect4.setText("");
    game.addEffect(effect, source);
    game.addEffect(effect2, source);
    game.addEffect(effect3, source);
    game.addEffect(effect4, source);
    return true;
}
Also used : FixedTarget(mage.target.targetpointer.FixedTarget) Permanent(mage.game.permanent.Permanent) TargetCreaturePermanent(mage.target.common.TargetCreaturePermanent) BoostTargetEffect(mage.abilities.effects.common.continuous.BoostTargetEffect) GainAbilityTargetEffect(mage.abilities.effects.common.continuous.GainAbilityTargetEffect) ContinuousEffect(mage.abilities.effects.ContinuousEffect)

Example 49 with BoostTargetEffect

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

the class GoatnapEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Permanent permanent = game.getPermanent(source.getFirstTarget());
    if (permanent == null || !permanent.hasSubtype(SubType.GOAT, game)) {
        return false;
    }
    game.addEffect(new BoostTargetEffect(3, 0, Duration.EndOfTurn), source);
    return true;
}
Also used : Permanent(mage.game.permanent.Permanent) TargetCreaturePermanent(mage.target.common.TargetCreaturePermanent) BoostTargetEffect(mage.abilities.effects.common.continuous.BoostTargetEffect)

Example 50 with BoostTargetEffect

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

the class GrowthSpurtEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
        int result = controller.rollDice(outcome, source, game, 6);
        Permanent permanent = game.getPermanent(source.getFirstTarget());
        if (permanent != null) {
            ContinuousEffect effect = new BoostTargetEffect(result, result, Duration.EndOfTurn);
            effect.setTargetPointer(new FixedTarget(permanent, game));
            game.addEffect(effect, source);
        }
    }
    return false;
}
Also used : FixedTarget(mage.target.targetpointer.FixedTarget) Player(mage.players.Player) Permanent(mage.game.permanent.Permanent) TargetCreaturePermanent(mage.target.common.TargetCreaturePermanent) BoostTargetEffect(mage.abilities.effects.common.continuous.BoostTargetEffect) ContinuousEffect(mage.abilities.effects.ContinuousEffect)

Aggregations

BoostTargetEffect (mage.abilities.effects.common.continuous.BoostTargetEffect)81 Permanent (mage.game.permanent.Permanent)58 FixedTarget (mage.target.targetpointer.FixedTarget)46 ContinuousEffect (mage.abilities.effects.ContinuousEffect)36 TargetCreaturePermanent (mage.target.common.TargetCreaturePermanent)34 Player (mage.players.Player)31 GainAbilityTargetEffect (mage.abilities.effects.common.continuous.GainAbilityTargetEffect)16 FilterCreaturePermanent (mage.filter.common.FilterCreaturePermanent)10 TargetPermanent (mage.target.TargetPermanent)10 TargetControlledCreaturePermanent (mage.target.common.TargetControlledCreaturePermanent)10 Card (mage.cards.Card)9 FilterControlledCreaturePermanent (mage.filter.common.FilterControlledCreaturePermanent)8 CardsImpl (mage.cards.CardsImpl)7 FilterPermanent (mage.filter.FilterPermanent)7 UUID (java.util.UUID)5 RevealTargetFromHandCost (mage.abilities.costs.common.RevealTargetFromHandCost)5 OneShotEffect (mage.abilities.effects.OneShotEffect)5 TargetCardInHand (mage.target.common.TargetCardInHand)5 Ability (mage.abilities.Ability)4 MageObject (mage.MageObject)3