Package mage.abilities.effects

Examples of mage.abilities.effects.ContinuousEffect


            for (Set<String> attackerSet :attackerMap.values()) {
                for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game)) {
                    if (attackerSet.contains(CardUtil.getCardZoneString(null, creature.getId(), game))) {
                        // tap creature and add the not untap effect
                        creature.tap(game);
                        ContinuousEffect effect  = new SkipNextUntapTargetEffect();
                        effect.setTargetPointer(new FixedTarget(creature.getId()));
                        game.addEffect(effect, source);
                        game.informPlayers(new StringBuilder("Triton Tactics: ").append(creature.getName()).append(" doesn't untap during its controller's next untap step").toString());
                    }
                }
            }
View Full Code Here


                player.revealCards("Erratic Mutation", cards, game);
            }
            // the nonland card
            int boostValue = card.getManaCost().convertedManaCost();
            // unboost target
            ContinuousEffect effect = new BoostTargetEffect(boostValue, boostValue * -1, Duration.EndOfTurn);
            effect.setTargetPointer(new FixedTarget(this.getTargetPointer().getFirst(game, source)));
            game.addEffect(effect, source);
            // put the cards on the bottom of the library in any order
            return player.putCardsOnBottomOfLibrary(cards, game, source, true);
        }
        return false;
View Full Code Here

        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null && card != null) {
            card.addAbility(HasteAbility.getInstance());
            if (controller.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId())) {
                // gains haste
                ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom);
                effect.setTargetPointer(new FixedTarget(card.getId()));
                game.addEffect(effect, source);
                // Exile at begin of next end step
                ExileTargetEffect exileEffect = new ExileTargetEffect(null, null, Zone.BATTLEFIELD);
                exileEffect.setTargetPointer(new FixedTarget(card.getId()));
                DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            for (Card card : player.getGraveyard().getCards(new FilterCreatureCard(), game)) {
                ContinuousEffect effect = new KaradorGhostChieftainCastFromGraveyardEffect();
                effect.setTargetPointer(new FixedTarget(card.getId()));
                game.addEffect(effect, source);
            }
            return true;
        }
        return false;
View Full Code Here

            }
            if (lastCreatureCard != null) {
                if (controller.putOntoBattlefieldWithInfo(lastCreatureCard, game, Zone.GRAVEYARD, source.getSourceId())) {
                    FixedTarget fixedTarget = new FixedTarget(lastCreatureCard.getId());
                    // Gains Haste
                    ContinuousEffect hasteEffect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
                    hasteEffect.setTargetPointer(fixedTarget);
                    game.addEffect(hasteEffect, source);
                    // Exile it at end of turn
                    ExileTargetEffect exileEffect = new ExileTargetEffect(null,"",Zone.BATTLEFIELD);
                    exileEffect.setTargetPointer(fixedTarget);
                    DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
View Full Code Here

        if (controller != null) {
            Target target = new TargetSource();
            target.setRequired(true);
            target.setNotTarget(true);
            if (controller.chooseTarget(outcome, target, source, game)) {
                ContinuousEffect continuousEffect = new InterventionPactPreventDamageEffect();
                continuousEffect.setTargetPointer(new FixedTarget(target.getFirstTarget()));
                game.addEffect(continuousEffect, source);
            }
            return true;
        }
        return false;
View Full Code Here

        boolean result = false;
        for (Target target: source.getTargets()) {
            if (target instanceof TargetCreaturePermanent) {
                Permanent targetCreature = game.getPermanent(target.getFirstTarget());
                if (targetCreature != null) {
                    ContinuousEffect effect1 = new GainControlTargetEffect(Duration.EndOfTurn);
                    effect1.setTargetPointer(new FixedTarget(targetCreature.getId()));
                    game.addEffect(effect1, source);

                    ContinuousEffect effect2 = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
                    effect2.setTargetPointer(new FixedTarget(targetCreature.getId()));
                    game.addEffect(effect2, source);

                    targetCreature.untap(game);
                    result = true;
                }
View Full Code Here

    }
   
    @Override
    public boolean apply(Game game, Ability source) {
        int xValue = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this);
        ContinuousEffect effect = new BecomesCreatureTargetEffect(new ElvishBranchbenderToken(xValue), "", Duration.EndOfTurn);
        effect.setTargetPointer(targetPointer);
        game.addEffect(effect, source);
        return false;
    }
View Full Code Here

        super(ownerId, 142, "Chrome Steed", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
        this.expansionSetCode = "SOM";
        this.subtype.add("Horse");
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);
        ContinuousEffect boostSource = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
        ConditionalContinousEffect effect = new ConditionalContinousEffect(boostSource, MetalcraftCondition.getInstance(), text);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

            } else if (HasteAbility.getInstance().getRule().equals(chosen)) {
                ability = HasteAbility.getInstance();
            }

            if (ability != null) {
                ContinuousEffect effect = new GainAbilityTargetEffect(ability, Duration.EndOfTurn);
                game.addEffect(effect, source);
                return true;
            }
        }
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.