Search in sources :

Example 1 with DontUntapInPlayersNextUntapStepAllEffect

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

the class ExhaustionEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getFirstTarget());
    if (player != null) {
        ContinuousEffect effect = new DontUntapInPlayersNextUntapStepAllEffect(filter);
        effect.setTargetPointer(new FixedTarget(player.getId()));
        game.addEffect(effect, source);
        return true;
    }
    return false;
}
Also used : FixedTarget(mage.target.targetpointer.FixedTarget) Player(mage.players.Player) DontUntapInPlayersNextUntapStepAllEffect(mage.abilities.effects.common.DontUntapInPlayersNextUntapStepAllEffect) ContinuousEffect(mage.abilities.effects.ContinuousEffect)

Example 2 with DontUntapInPlayersNextUntapStepAllEffect

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

the class ManaVaporsEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
    if (targetPlayer != null) {
        FilterLandPermanent filter = new FilterLandPermanent();
        filter.add(new ControllerIdPredicate(targetPlayer.getId()));
        ContinuousEffect effect = new DontUntapInPlayersNextUntapStepAllEffect(filter);
        effect.setTargetPointer(new FixedTarget(targetPlayer.getId()));
        game.addEffect(effect, source);
        return true;
    }
    return false;
}
Also used : FixedTarget(mage.target.targetpointer.FixedTarget) TargetPlayer(mage.target.TargetPlayer) Player(mage.players.Player) FilterLandPermanent(mage.filter.common.FilterLandPermanent) DontUntapInPlayersNextUntapStepAllEffect(mage.abilities.effects.common.DontUntapInPlayersNextUntapStepAllEffect) ControllerIdPredicate(mage.filter.predicate.permanent.ControllerIdPredicate) ContinuousEffect(mage.abilities.effects.ContinuousEffect)

Example 3 with DontUntapInPlayersNextUntapStepAllEffect

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

the class DelayTacticEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
    if (targetPlayer != null) {
        FilterCreaturePermanent filter = new FilterCreaturePermanent();
        filter.add(new ControllerIdPredicate(targetPlayer.getId()));
        ContinuousEffect effect = new DontUntapInPlayersNextUntapStepAllEffect(filter);
        effect.setTargetPointer(new FixedTarget(targetPlayer.getId()));
        game.addEffect(effect, source);
        return true;
    }
    return false;
}
Also used : FixedTarget(mage.target.targetpointer.FixedTarget) Player(mage.players.Player) FilterCreaturePermanent(mage.filter.common.FilterCreaturePermanent) DontUntapInPlayersNextUntapStepAllEffect(mage.abilities.effects.common.DontUntapInPlayersNextUntapStepAllEffect) ControllerIdPredicate(mage.filter.predicate.permanent.ControllerIdPredicate) ContinuousEffect(mage.abilities.effects.ContinuousEffect)

Aggregations

ContinuousEffect (mage.abilities.effects.ContinuousEffect)3 DontUntapInPlayersNextUntapStepAllEffect (mage.abilities.effects.common.DontUntapInPlayersNextUntapStepAllEffect)3 Player (mage.players.Player)3 FixedTarget (mage.target.targetpointer.FixedTarget)3 ControllerIdPredicate (mage.filter.predicate.permanent.ControllerIdPredicate)2 FilterCreaturePermanent (mage.filter.common.FilterCreaturePermanent)1 FilterLandPermanent (mage.filter.common.FilterLandPermanent)1 TargetPlayer (mage.target.TargetPlayer)1