Search in sources :

Example 6 with BoostControlledEffect

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

the class BoldDefenseEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    if (KickedCondition.instance.apply(game, source)) {
        game.addEffect(new BoostControlledEffect(2, 2, Duration.EndOfTurn), source);
        game.addEffect(new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE), source);
    } else {
        game.addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn), source);
    }
    return true;
}
Also used : GainAbilityControlledEffect(mage.abilities.effects.common.continuous.GainAbilityControlledEffect) BoostControlledEffect(mage.abilities.effects.common.continuous.BoostControlledEffect)

Example 7 with BoostControlledEffect

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

the class RitesOfInitiationEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player != null) {
        int numToDiscard = player.getAmount(0, player.getHand().size(), "Discard how many cards at random?", game);
        player.discard(numToDiscard, true, false, source, game);
        game.addEffect(new BoostControlledEffect(numToDiscard, 0, Duration.EndOfTurn), source);
        return true;
    }
    return false;
}
Also used : Player(mage.players.Player) BoostControlledEffect(mage.abilities.effects.common.continuous.BoostControlledEffect)

Example 8 with BoostControlledEffect

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

the class GuulDrazOverseerEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    Permanent land = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
    if (controller != null && land != null) {
        int boost = 1;
        if (land.hasSubtype(SubType.SWAMP, game)) {
            boost = 2;
        }
        game.addEffect(new BoostControlledEffect(boost, 0, Duration.EndOfTurn, true), source);
        return true;
    }
    return false;
}
Also used : Player(mage.players.Player) Permanent(mage.game.permanent.Permanent) BoostControlledEffect(mage.abilities.effects.common.continuous.BoostControlledEffect)

Example 9 with BoostControlledEffect

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

the class CamaraderieEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player == null) {
        return false;
    }
    int xValue = game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_CREATURE, source.getSourceId(), source.getControllerId(), game);
    player.gainLife(xValue, game, source);
    player.drawCards(xValue, source, game);
    game.addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn), source);
    return true;
}
Also used : Player(mage.players.Player) BoostControlledEffect(mage.abilities.effects.common.continuous.BoostControlledEffect) CreaturesYouControlHint(mage.abilities.hint.common.CreaturesYouControlHint)

Aggregations

BoostControlledEffect (mage.abilities.effects.common.continuous.BoostControlledEffect)9 GainAbilityControlledEffect (mage.abilities.effects.common.continuous.GainAbilityControlledEffect)4 Permanent (mage.game.permanent.Permanent)4 Player (mage.players.Player)4 ContinuousEffect (mage.abilities.effects.ContinuousEffect)3 FilterCreaturePermanent (mage.filter.common.FilterCreaturePermanent)3 MageObjectReference (mage.MageObjectReference)1 CreaturesYouControlHint (mage.abilities.hint.common.CreaturesYouControlHint)1 MageObjectReferencePredicate (mage.filter.predicate.mageobject.MageObjectReferencePredicate)1 TargetControlledCreaturePermanent (mage.target.common.TargetControlledCreaturePermanent)1