Package mage.abilities.effects

Examples of mage.abilities.effects.ContinuousEffect


        }
        FilterCreaturePermanent filter = new FilterCreaturePermanent();
        filter.add(new ControllerIdPredicate(target.getControllerId()));
        filter.add(Predicates.not(new CardIdPredicate(target.getId())));
       
        ContinuousEffect effect = new BlocksIfAbleTargetEffect(Duration.EndOfTurn);
        effect.setTargetPointer(new FixedTarget(target.getId()));
        game.addEffect(effect, source);
       
        target.untap(game);
       
        ContinuousEffect effect2 = new CantBlockAllEffect(filter, Duration.EndOfTurn);
        game.addEffect(effect2, source);
        return true;
    }
View Full Code Here


        this.color.setWhite(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        ContinuousEffect effect = new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect, MetalcraftCondition.getInstance(), effectText)));
    }
View Full Code Here

            if (target instanceof TargetPermanent) {
                targetCreature = game.getPermanent(target.getFirstTarget());
            }
        }
        if (targetCreature != null) {
            ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfTurn);
            effect.setTargetPointer(new FixedTarget(targetCreature.getId()));
            game.addEffect(effect, source);
            return true;
        }
        return false;
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent targetPermanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
        if (targetPermanent != null && new ExileTargetEffect().apply(game, source)) {
            ContinuousEffect effect = new ActOfAuthorityGainControlEffect(Duration.Custom, targetPermanent.getControllerId());
            effect.setTargetPointer(new FixedTarget(source.getSourceId()));
            game.addEffect(effect, source);
            return true;
        }
        return false;
    }
View Full Code Here

                if (player.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
                    Card card = game.getCard(target.getFirstTarget());
                    if (card != null) {
                        if (player.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId())) {
                            Permanent permanent = game.getPermanent(card.getId());
                            ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom);
                            effect.setTargetPointer(new FixedTarget(permanent.getId()));
                            game.addEffect(effect, source);
                           
                            SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice " + card.getName());
                            sacrificeEffect.setTargetPointer(new FixedTarget(card.getId()));
                            DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(sacrificeEffect);
View Full Code Here

        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            if (targetPointer.getFirst(game, source) != null) {
                targetPermanent = game.getPermanent(targetPointer.getFirst(game, source));
                if (targetPermanent != null) {
                    ContinuousEffect effect = new ExchangeControlTargetEffect(Duration.EndOfGame, "", true);                   
                    effect.setTargetPointer(targetPointer);
                    game.addEffect(effect, source);
                } else {
                    sourceObject.sacrifice(source.getSourceId(), game);
                }
            }
View Full Code Here

                } else if (choiceColor.getColor().isWhite()) {
                    chosenColors.add(ObjectColor.WHITE);
                }
            }
            for (ObjectColor color : chosenColors) {
                ContinuousEffect effect = new SetCardColorTargetEffect(color, Duration.EndOfTurn, "is " + color);
                effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
                game.addEffect(effect, source);
            }
            return true;
        }
        return false;
View Full Code Here

        Permanent wildMongrel = game.getPermanent(source.getSourceId());
        if (player != null && wildMongrel != null) {
            ChoiceColor colorChoice = new ChoiceColor();
            if (player.choose(Outcome.Neutral, colorChoice, game)) {
                game.informPlayers(wildMongrel.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
                ContinuousEffect effect = new SetCardColorTargetEffect(colorChoice.getColor(), Duration.EndOfTurn, "is " + colorChoice.getChoice());
                effect.setTargetPointer(new FixedTarget(source.getSourceId()));
                game.addEffect(effect, source);
                return true;
            }
        }
        return false;
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getFirstTarget());
        if (player != null) {
            for (Permanent creature: game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game)) {
                creature.tap(game);
                ContinuousEffect effect = new SkipNextUntapTargetEffect();
                effect.setTargetPointer(new FixedTarget(creature.getId()));
                game.addEffect(effect, source);               
            }
            return true;
        }
        return false;
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
        if (player != null) {
            for (Permanent creature: game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game)) {
                creature.tap(game);
                ContinuousEffect effect = new SkipNextUntapTargetEffect("This creature");
                effect.setTargetPointer(new FixedTarget(creature.getId()));
                game.addEffect(effect, source);
            }
            return true;
        }
        return false;
View Full Code Here

TOP

Related Classes of mage.abilities.effects.ContinuousEffect

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.