Package mage.abilities.effects.common

Examples of mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect


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

        // When Bearer of the Heavens dies, destroy all permanents at the beginning of the next end step.
        DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(new DestroyAllEffect(new FilterPermanent("permanents")));
        Effect effect = new CreateDelayedTriggeredAbilityEffect(delayedAbility);
        effect.setText("destroy all permanents at the beginning of the next end step");
        this.addAbility(new DiesTriggeredAbility(effect, false));
    }
View Full Code Here


        AngelToken token = new AngelToken();
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null && token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), true, true)) {
            Effect effect = new ExileTargetEffect();
            effect.setTargetPointer(new FixedTarget(token.getLastAddedToken()));
            CreateDelayedTriggeredAbilityEffect createEffect = new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(effect));
            createEffect.apply(game, source);
            return true;
        }
        return false;
    }
View Full Code Here

        // Beck
        // Whenever a creature enters the battlefield this turn, you may draw a card.
        getLeftHalfCard().getColor().setGreen(true);
        getLeftHalfCard().getColor().setBlue(true);
        getLeftHalfCard().getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new BeckTriggeredAbility()));

        // Call
        // Put four 1/1 white Bird creature tokens with flying onto the battlefield.
        getRightHalfCard().getColor().setWhite(true);
        getRightHalfCard().getColor().setBlue(true);
View Full Code Here

        this.expansionSetCode = "ONS";

        this.color.setBlack(true);

        // Until end of turn, whenever a player gains life, that player loses 2 life for each 1 life he or she gained.
        this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new FalseCureTriggeredAbility()));
    }
View Full Code Here

            if (caster.chooseUse(Outcome.DrawCard, "Pay {1} to draw a card at the beginning of the next end step?", game)) {
                Cost cost = new ManaCostsImpl("{1}");
                if (cost.pay(source, game, source.getSourceId(), caster.getId(), false)) {
                    Effect effect = new DrawCardTargetEffect(1);
                    effect.setTargetPointer(new FixedTarget(caster.getId()));
                    return new CreateDelayedTriggeredAbilityEffect(new AtEndOfTurnDelayedTriggeredAbility(effect, TargetController.ANY)).apply(game, source);
                }
            }
            return true;
        }
        return false;
View Full Code Here

        this.expansionSetCode = "KTK";

        this.color.setRed(true);

        // When you cast your next instant or sorcery spell this turn, copy that spell. You may choose new targets for the copy.
        Effect effect = new CreateDelayedTriggeredAbilityEffect(new HowlOfTheHordeDelayedTriggeredAbility());
        effect.setText("When you cast your next instant or sorcery spell this turn, copy that spell. You may choose new targets for the copy.");
        this.getSpellAbility().addEffect(effect);
       
        // <i>Raid</i> - If you attacked with a creature this turn, when you cast your next instant or sorcery spell this turn, copy that spell an additional time. You may choose new targets for the copy.
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new CreateDelayedTriggeredAbilityEffect(new HowlOfTheHordeDelayedTriggeredAbility()), RaidCondition.getInstance(), "<br><br><i>Raid</i> - If you attacked with a creature this turn, when you cast your next instant or sorcery spell this turn, copy that spell an additional time. You may choose new targets for the copy."));
        this.addWatcher(new PlayerAttackedWatcher());
    }
View Full Code Here

        this.expansionSetCode = "FEM";

        this.color.setBlue(true);

        // Until end of turn, whenever a player taps an Island for mana, that player adds {U} to his or her mana pool.
        this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new HighTideTriggeredAbility()));
       
    }
View Full Code Here

        this.expansionSetCode = "ODY";

        this.color.setWhite(true);

        // Until end of turn, whenever target creature deals damage, you gain that much life.
        this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new SpiritualizeTriggeredAbility()));
        this.getSpellAbility().addTarget(new TargetCreaturePermanent());
        // Draw a card.
        this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
    }
View Full Code Here

}

class CastAtInstantTimeTriggeredAbility extends TriggeredAbilityImpl {
    public CastAtInstantTimeTriggeredAbility() {
        super(Zone.STACK, new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextCleanupDelayedTriggeredAbility(new SacrificeSourceEffect())));
    }
View Full Code Here

        // {3}, {tap}: Target creature you control gets +2/+2 until end of turn. Return it to its owner's hand at the beginning of the next end step.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new GenericManaCost(3));
        ability.addCost(new TapSourceCost());
        ability.addTarget(new TargetControlledCreaturePermanent());
        Effect returnEffect = new CreateDelayedTriggeredAbilityEffect(new AtEndOfTurnDelayedTriggeredAbility(new ReturnToHandTargetEffect()));
        returnEffect.setText("Return it to its owner's hand at the beginning of the next end step");
        ability.addEffect(returnEffect);
        this.addAbility(ability);
    }
View Full Code Here

TOP

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

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.