Package mage.abilities.common.delayed

Examples of mage.abilities.common.delayed.AtTheBeginOMainPhaseDelayedTriggeredAbility


            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);
            return true;
        }
        return 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 mana = spell.getConvertedManaCost();
            AtTheBeginOMainPhaseDelayedTriggeredAbility delayedAbility =
                    new AtTheBeginOMainPhaseDelayedTriggeredAbility(new PlasmCaptureManaEffect(mana), false, TargetController.YOU, PhaseSelection.NEXT_PRECOMBAT_MAIN);
            delayedAbility.setSourceId(source.getSourceId());
            delayedAbility.setControllerId(source.getControllerId());
            game.addDelayedTriggeredAbility(delayedAbility);
            return true;
        }
        return false;
    }
View Full Code Here

        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);
            }
            return true;
        }
        return false;
View Full Code Here

TOP

Related Classes of mage.abilities.common.delayed.AtTheBeginOMainPhaseDelayedTriggeredAbility

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.