Package mage.abilities.effects

Examples of mage.abilities.effects.ContinuousEffect


        this.subtype.add("Soldier");

        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

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


    public boolean apply(Game game, Ability source) {
        FilterPermanent filter = new FilterPermanent();
        filter.add(new SubtypePredicate("Dragon"));
        List<Permanent> dragons = game.getBattlefield().getAllActivePermanents(filter, game);
        for (Permanent dragon : dragons) {
            ContinuousEffect effect = new KarrthusControlEffect(source.getControllerId());
            effect.setTargetPointer(new FixedTarget(dragon.getId()));
            game.addEffect(effect, source);
        }
        for (Permanent dragon : dragons) {
            dragon.untap(game);
        }
View Full Code Here

        // Haste
        this.addAbility(HasteAbility.getInstance());
       
        // Chroma - When Heartlash Cinder enters the battlefield, it gets +X/+0 until end of turn, where X is the number of red mana symbols in the mana costs of permanents you control.
        ContinuousEffect effect = new BoostSourceEffect(new ChromaHeartlashCinderCount(), new StaticValue(0), Duration.EndOfTurn);
        effect.setText("<i>Chroma</i> - When Heartlash Cinder enters the battlefield, it gets +X/+0 until end of turn, where X is the number of red mana symbols in the mana costs of permanents you control.");
        this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false, true));
       
    }
View Full Code Here

            }
        }
        if (!attackers.isEmpty()) {
            Phase phase = game.getTurn().getPhase();
            game.getState().getTurnMods().add(new TurnMod(game.getActivePlayerId(), TurnPhase.COMBAT, null, false));
            ContinuousEffect effect = new IllusionistsGambitRequirementEffect(attackers, phase);
            game.addEffect(effect, source);
            effect = new IllusionistsGambitRestrictionEffect(attackers, phase);
            game.addEffect(effect, source);

        }
View Full Code Here

            }
        }
        int amount = 3 + (numberSpirits * 3);
        Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
        if (targetCreature != null) {
            ContinuousEffect effect = new BoostTargetEffect(amount, 0, Duration.EndOfTurn);
            effect.setTargetPointer(new FixedTarget(targetCreature.getId()));
            game.addEffect(effect, source);
            return true;
        }
        return false;
    }
View Full Code Here

            if (opponent.getLibrary().size() > 0) {
                Library library = opponent.getLibrary();
                Card card = library.getFromTop(game);
                if (card != null) {
                    opponent.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getLogName(), source.getSourceId(), game, Zone.LIBRARY);
                    ContinuousEffect effect = new OrnateKanzashiCastFromExileEffect(card.getId());
                    effect.setTargetPointer(new FixedTarget(card.getId()));
                    game.addEffect(effect, source);
                }
            }
            return true;
        }
View Full Code Here

            for (Map.Entry<UUID, UUID> entry : playerCreature.entrySet()) {
                Player player = game.getPlayer(entry.getKey());
                if (player != null) {
                    Permanent creature = game.getPermanent(entry.getValue());
                    if (creature != null) {
                        ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfGame, player.getId());
                        effect.setTargetPointer(new FixedTarget(creature.getId()));
                        game.addEffect(effect, source);
                        game.informPlayers(new StringBuilder(player.getName()).append(" gains control of ").append(creature.getName()).toString());
                    }
                }
            }
View Full Code Here

        PlayerList players = game.getPlayerList();
        int count = players.size();
        if (count > 1) {
            FilterNonlandPermanent nonLand = new FilterNonlandPermanent();
            for (Permanent permanent : game.getBattlefield().getActivePermanents(nonLand, source.getControllerId(), source.getSourceId(), game)) {
                ContinuousEffect effect = new ScrambleverseControlEffect(players.get(random.nextInt(count)));
                effect.setTargetPointer(new FixedTarget(permanent.getId()));
                game.addEffect(effect, source);
            }
        }
        return true;
    }
View Full Code Here

        super(ownerId, 127, "Razorfield Rhino", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}");
        this.expansionSetCode = "MBS";
        this.subtype.add("Rhino");
        this.power = new MageInt(4);
        this.toughness = new MageInt(4);
        ContinuousEffect effect1 = new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(effect1, MetalcraftCondition.getInstance(), "Metalcraft - Razorfield Rhino gets +2/+2 as long as you control three or more artifacts")));
    }
View Full Code Here

        this.subtype.add("Elf");
        this.subtype.add("Warrior");
        this.color.setGreen(true);
        this.power = new MageInt(4);
        this.toughness = new MageInt(4);
        ContinuousEffect boostSource = new BoostSourceEffect(4, 4, Duration.WhileOnBattlefield);
        ConditionalContinousEffect effect = new ConditionalContinousEffect(boostSource, MetalcraftCondition.getInstance(), text);
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
        ability.addEffect(new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), MetalcraftCondition.getInstance(), ""));
        this.addAbility(ability);
    }
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.