Package mage.abilities.effects

Examples of mage.abilities.effects.ContinuousEffect


            player.shuffleLibrary(game);
            if (player.getLibrary().size() > 0) {
                Card card = player.getLibrary().removeFromTop(game);
                if (card != null) {
                    player.moveCardToExileWithInfo(card, source.getSourceId(), "Mind's Desire", source.getSourceId(), game, Zone.LIBRARY);
                    ContinuousEffect effect = new MindsDesireCastFromExileEffect();
                    effect.setTargetPointer(new FixedTarget(card.getId()));
                    game.addEffect(effect, source);
                }
            }
            return true;
        }
View Full Code Here


                    Permanent damagedCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
                    if (damagedCreature == null) {
                        damagedCreature = (Permanent) game.getLastKnownInformation(this.getTargetPointer().getFirst(game, source), Zone.BATTLEFIELD);
                    }
                    if (damagedCreature != null) {
                        ContinuousEffect effect = new ShurikenGainControlEffect(Duration.EndOfGame, damagedCreature.getControllerId());
                        effect.setTargetPointer(new FixedTarget(equipment.getId()));
                        game.addEffect(effect, source);
                        return true;
                    } else {
                        return false;
                    }
View Full Code Here

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

        ContinuousEffect effect1 = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect1, MetalcraftCondition.getInstance(), effect1Text)));
        ContinuousEffect effect2 = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect2, MetalcraftCondition.getInstance(), effect2Text)));
    }
View Full Code Here

                if (permanent != null) {
                    permanent.tap(game);
                }
            }
            for(UUID playerId : watcher.damagedPlayers) {
                ContinuousEffect effect = new AureliasFuryCantCastEffect();
                effect.setTargetPointer(new FixedTarget(playerId));
                game.addEffect(effect, source);
            }
            watcher.reset();
        }
               
View Full Code Here

            if (target.canChoose(source.getSourceId(), source.getControllerId(), game) &&
                    player.chooseTarget(outcome, target, source, game)) {
                Card card = game.getCard(target.getFirstTarget());
                if (card != null) {
                    if (card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId())) {
                        ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
                        effect.setTargetPointer(new FixedTarget(card.getId()));
                        game.addEffect(effect, source);
                        return true;
                    }
                }
            }
View Full Code Here

        // Enchanted creature gets +2/+1.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 1, Duration.WhileOnBattlefield)));

        // Enchanted creature has intimidate as long as its controller controls no other creatures.
        ContinuousEffect effect = new GainAbilityAttachedEffect(IntimidateAbility.getInstance(), AttachmentType.AURA);
        ConditionalContinousEffect intimidate = new ConditionalContinousEffect(effect, new OneControlledCreatureCondition(), rule);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, intimidate));

    }
View Full Code Here

        if (controller != null) {
            for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), source.getSourceId(), game)) {
                // only creatures of controller & target opponent
                if (permanent.getControllerId().equals(source.getControllerId()) || permanent.getControllerId().equals(targetOpponent.getId())) {
                    UUID newController = permanent.getControllerId().equals(source.getControllerId()) ? targetOpponent.getId() : source.getControllerId();
                    ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfTurn, true, newController);
                    effect.setTargetPointer(new FixedTarget(permanent.getId()));
                    game.addEffect(effect, source);
                    permanent.untap(game);
                    effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
                    effect.setTargetPointer(new FixedTarget(permanent.getId()));
                    game.addEffect(effect, source);
                }
            }
            return true;
        }
View Full Code Here

                throne = true;
            }
            if (scepter && throne) break;
        }
        if (scepter && throne) {
            ContinuousEffect effect = new CrownOfEmpiresControlEffect();
            effect.setTargetPointer(new FixedTarget(target.getId()));
            game.getState().setValue(source.getSourceId().toString(), source.getControllerId());
            game.addEffect(effect, source);
        } else {
            target.tap(game);
        }
View Full Code Here

        this.subtype.add("Angel");
        this.color.setWhite(true);
        this.power = new MageInt(4);
        this.toughness = new MageInt(4);
        this.addAbility(FlyingAbility.getInstance());
        ContinuousEffect gainAbilityEffect = new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield, filter);
        ConditionalContinousEffect effect = new ConditionalContinousEffect(gainAbilityEffect, MetalcraftCondition.getInstance(), rule);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

        Permanent target = game.getPermanent(source.getFirstTarget());
        if (target == null) {
            return false;
        }
       
        ContinuousEffect effect = new BoostTargetEffect(3, 0, Duration.EndOfTurn);
        ContinuousEffect effect2 = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
        effect.setTargetPointer(new FixedTarget(target.getId()));
        effect2.setTargetPointer(new FixedTarget(target.getId()));
        game.addEffect(effect, source);
        game.addEffect(effect2, 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.