Package mage.abilities.effects

Examples of mage.abilities.effects.ContinuousEffect


            player.damage(1, source.getSourceId(), game, false, true);
        }
        Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
        if (creature != null) {
            creature.damage(1, source.getSourceId(), game, false, true);
            ContinuousEffect effect = new CantBlockTargetEffect(Duration.EndOfTurn);
            effect.setTargetPointer(new FixedTarget(creature.getId()));
            game.addEffect(effect, source);
        }
        return true;
    }
View Full Code Here


        if (controller != null && controller.getLibrary().size() > 0) {
            Library library = controller.getLibrary();
            Card card = library.removeFromTop(game);
            if (card != null) {
                controller.moveCardToExileWithInfo(card, source.getSourceId(), "Chandra Pyromaster <this card may be played the turn it was exiled>", source.getSourceId(), game, Zone.LIBRARY);
                ContinuousEffect effect = new ChandraPyromasterCastFromExileEffect();
                effect.setTargetPointer(new FixedTarget(card.getId()));
                game.addEffect(effect, source);
            }
            return true;
        }
        return false;
View Full Code Here

            if (card != null) {
                if (controller.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId())) {
                    Permanent permanent = game.getPermanent(card.getId());
                    if (permanent != null) {
                        // Haste
                        ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom);
                        effect.setTargetPointer(new FixedTarget(permanent.getId()));
                        game.addEffect(effect, source);
                        // Exile it at end of turn
                        Effect exileEffect = new ExileTargetEffect(new StringBuilder("Exile ").append(permanent.getName()).append(" at the beginning of the next end step").toString());
                        exileEffect.setTargetPointer(new FixedTarget(card.getId()));
                        DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
View Full Code Here

        FilterPermanent filter = new FilterArtifactPermanent();
        filter.add(new ControllerIdPredicate(player.getId()));

        List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId() , game);
        for (Permanent permanent : permanents) {
            ContinuousEffect effect = new HellkiteTyrantControlEffect(source.getControllerId());
            effect.setTargetPointer(new FixedTarget(permanent.getId()));
            game.addEffect(effect, source);
        }
        return true;
    }
View Full Code Here

        this.subtype.add("Elf");
        this.subtype.add("Artificer");
        this.color.setGreen(true);
        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

            for (UUID cardId: exile) {
                Card card = game.getCard(cardId);
                card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false);
                Permanent returnedCreature = game.getPermanent(cardId);
                if (returnedCreature != null) {
                    ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
                    effect.setTargetPointer(new FixedTarget(returnedCreature.getId()));
                    game.addEffect(effect, source);
                }
            }
            game.getExile().getExileZone(source.getSourceId()).clear();
            return true;
View Full Code Here

        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null && controller.choose(outcome, choice, game)) {
            FilterCard protectionFilter = new FilterCard();
            protectionFilter.add(new ColorPredicate(choice.getColor()));
            protectionFilter.setMessage(choice.getChoice().toLowerCase());
            ContinuousEffect effect = new GainAbilitySourceEffect(new ProtectionAbility(protectionFilter), Duration.EndOfTurn);
            game.addEffect(effect, source);
            return true;
        }
        return false;
    }
View Full Code Here

                if (filter.match(card, game) && player.chooseUse(outcome, new StringBuilder("Put ").append(card.getName()).append("onto battlefield?").toString(), game)) {
                    card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId());
                    Permanent permanent = game.getPermanent(card.getId());
                    if (permanent != null) {
                        permanent.addCounters(new Counter("Manifestation"), game);
                        ContinuousEffect effect = new AddCardTypeTargetEffect(CardType.ENCHANTMENT, Duration.Custom);
                        effect.setTargetPointer(new FixedTarget(permanent.getId()));
                        game.addEffect(effect, source);
                    }
                }
            }
            return true;
View Full Code Here

        this.expansionSetCode = "ROE";

        this.color.setWhite(true);

        // Each creature you control with a level counter on it gets +2/+2.
        ContinuousEffect boost = new BoostAllEffect(2, 2, Duration.WhileOnBattlefield, filter, false);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, boost));
    }
View Full Code Here

        super(ownerId, 203, "Snapsail Glider", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}");
        this.expansionSetCode = "SOM";
        this.subtype.add("Construct");
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);
        ContinuousEffect effect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect, MetalcraftCondition.getInstance(), rule)));
    }
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.