Package mage.abilities.effects.common

Examples of mage.abilities.effects.common.AddManaToManaPoolEffect


        this.color.setGreen(true);

        // At the beginning of each player's precombat main phase, add {G}{G} to that player's mana pool.
        this.addAbility(new BeginningOfPreCombatMainTriggeredAbility(
                Zone.BATTLEFIELD, new AddManaToManaPoolEffect(GreenMana(2), "that player's"), TargetController.ANY, false, true));         
    }
View Full Code Here


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

        // At the beginning of your upkeep, add {G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end.
        Effect effect = new AddManaToManaPoolEffect(new Mana(Mana.GreenMana), "your", true);
        effect.setText("add {G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end");       
        this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false));
    }
View Full Code Here

    public boolean checkTrigger(GameEvent event, Game game) {
        if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) {
            if (((DamagedPlayerEvent) event).isCombatDamage()) {
                if (event.getSourceId().equals(getSourceId())) {
                    this.getEffects().clear();
                    Effect effect = new AddManaToManaPoolEffect(new Mana(0,event.getAmount(),0,0,0,0,0), "that player", true);
                    effect.setTargetPointer(new FixedTarget(getControllerId()));
                    effect.setText("add that much {G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end");       
                    this.addEffect(effect);
                    return true;
                }
            }
        }
View Full Code Here

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

        // At the beginning of each player's upkeep, that player adds {G}{G}{G} to his or her mana pool. Until end of turn, this mana doesn't empty from that player's mana pool as steps and phases end.
        Effect effect = new AddManaToManaPoolEffect(new Mana(0,3,0,0,0,0,0), "that player", true);
        effect.setText("that player adds {G}{G}{G} to his or her mana pool. Until end of turn, this mana doesn't empty from that player's mana pool as steps and phases end");       
        this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.ANY, false));
       
    }
View Full Code Here

        Spell spell = game.getStack().getSpell(getTargetPointer().getFirst(game, source));
        if (spell != null) {
            game.getStack().counter(getTargetPointer().getFirst(game, source), source.getSourceId(), game);
            // mana gets added also if counter is not successful
            int cmc = spell.getConvertedManaCost();
            Effect effect = new AddManaToManaPoolEffect(new Mana(0,0,0,0,0,cmc,0), "your");
            effect.setTargetPointer(new FixedTarget(source.getControllerId()));
            AtTheBeginOMainPhaseDelayedTriggeredAbility delayedAbility =
                    new AtTheBeginOMainPhaseDelayedTriggeredAbility(effect, false, TargetController.YOU, PhaseSelection.NEXT_MAIN);
            delayedAbility.setSourceId(source.getSourceId());
            delayedAbility.setControllerId(source.getControllerId());
            game.addDelayedTriggeredAbility(delayedAbility);
View Full Code Here

        if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) {
            if (((DamagedPlayerEvent) event).isCombatDamage()) {
                Permanent creature = game.getPermanent(event.getSourceId());
                if (creature != null && creature.getControllerId().equals(controllerId)) {
                    this.getEffects().clear();
                    Effect effect = new AddManaToManaPoolEffect(new Mana(0,event.getAmount(),0,0,0,0,0), "that player", true);
                    effect.setTargetPointer(new FixedTarget(creature.getControllerId()));
                    effect.setText("add that much {G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end");       
                    this.addEffect(effect);
                    return true;
                }
            }
        }
View Full Code Here

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

        // At the beginning of each player's precombat main phase, add {G}{G} to that player's mana pool.
        this.addAbility(new BeginningOfPreCombatMainTriggeredAbility(
                Zone.BATTLEFIELD, new AddManaToManaPoolEffect(GreenMana(2), "that player's"), TargetController.ANY, false, true));       
    }
View Full Code Here

        Spell spell = (Spell) game.getStack().getStackObject(getTargetPointer().getFirst(game, source));
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null && spell != null) {
            game.getStack().counter(spell.getId(), source.getSourceId(), game);
            if (ClashEffect.getInstance().apply(game, source)) {
                Effect effect = new AddManaToManaPoolEffect(new Mana(0,0,0,0,0,spell.getConvertedManaCost(),0), "your");
                effect.setTargetPointer(new FixedTarget(source.getControllerId()));
                AtTheBeginOMainPhaseDelayedTriggeredAbility delayedAbility =
                        new AtTheBeginOMainPhaseDelayedTriggeredAbility(effect, true, TargetController.YOU, AtTheBeginOMainPhaseDelayedTriggeredAbility.PhaseSelection.NEXT_MAIN);
                delayedAbility.setSourceId(source.getSourceId());
                delayedAbility.setControllerId(source.getControllerId());
                game.addDelayedTriggeredAbility(delayedAbility);
View Full Code Here

TOP

Related Classes of mage.abilities.effects.common.AddManaToManaPoolEffect

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.