Package mage.abilities

Examples of mage.abilities.DelayedTriggeredAbility


            for (int i = 0; i < power; i++) {
                ElementalToken token = new ElementalToken();
                token.putOntoBattlefield(1, game, creatureAttached.getId(), creatureAttached.getControllerId());
                ExileTargetEffect exileEffect = new ExileTargetEffect("exile the token");
                exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken()));
                DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
                delayedAbility.setSourceId(creatureAttached.getId());
                delayedAbility.setControllerId(creatureAttached.getControllerId());
                game.addDelayedTriggeredAbility(delayedAbility);
            }
            return true;
        }
        return false;
View Full Code Here


        return new ConstrictingSliverAddDelayedReturnEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        DelayedTriggeredAbility delayedAbility = new ConstrictingSliverReturnExiledCreatureAbility();
        delayedAbility.setSourceId(source.getSourceId());
        delayedAbility.setControllerId(source.getControllerId());
        game.addDelayedTriggeredAbility(delayedAbility);
        return true;
    }
View Full Code Here

        this.color.setRed(true);
        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

                    token.addAbility(HasteAbility.getInstance());
                    token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());

                    ExileTargetEffect exileEffect = new ExileTargetEffect();
                    exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken()));
                    DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
                    delayedAbility.setSourceId(source.getSourceId());
                    delayedAbility.setControllerId(source.getControllerId());
                    game.addDelayedTriggeredAbility(delayedAbility);
                }               
            }
            return true;           
        }
View Full Code Here

            token.addAbility(HasteAbility.getInstance());
            token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());

            ExileTargetEffect exileEffect = new ExileTargetEffect();
            exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken()));
            DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
            delayedAbility.setSourceId(source.getSourceId());
            delayedAbility.setControllerId(source.getControllerId());
            game.addDelayedTriggeredAbility(delayedAbility);
            return true;
        }

        return false;
View Full Code Here

            token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());

            SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect();
            sacrificeEffect.setText("Sacrifice the token at the beginning of the next end step");
            sacrificeEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken()));
            DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(sacrificeEffect);
            delayedAbility.setSourceId(source.getSourceId());
            delayedAbility.setControllerId(source.getControllerId());
            game.addDelayedTriggeredAbility(delayedAbility);
            return true;
        }

        return false;
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Card card = game.getCard(this.getTargetPointer().getFirst(game, source));
        if (card != null) {
            Effect effect = new ShireiShizosCaretakerReturnEffect(shireiId);
            effect.setText("return that card to the battlefield if Shirei, Shizo's Caretaker is still on the battlefield");
            DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(effect);
            delayedAbility.setSourceId(source.getSourceId());
            delayedAbility.setControllerId(source.getControllerId());
            delayedAbility.getEffects().get(0).setTargetPointer(new FixedTarget(card.getId()));
            game.addDelayedTriggeredAbility(delayedAbility);
            return true;
        }
        return false;
    }
View Full Code Here

                    effect.setTargetPointer(new FixedTarget(permanent.getId()));
                    game.addEffect(effect, source);

                    ExileTargetEffect exileEffect = new ExileTargetEffect();
                    exileEffect.setTargetPointer(new FixedTarget(permanent.getId()));
                    DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
                    delayedAbility.setSourceId(source.getSourceId());
                    delayedAbility.setControllerId(source.getControllerId());
                    game.addDelayedTriggeredAbility(delayedAbility);

                    KheruLichLordReplacementEffect replacementEffect = new  KheruLichLordReplacementEffect();
                    replacementEffect.setTargetPointer(new FixedTarget(permanent.getId()));
                    game.addEffect(replacementEffect, source);
View Full Code Here

    public boolean apply(Game game, Ability source) {
        StoneTrapIdolToken token = new StoneTrapIdolToken();
        token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
        ExileTargetEffect exileEffect = new ExileTargetEffect("exile the token");
        exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken()));
        DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect, TargetController.YOU);
        delayedAbility.setSourceId(source.getSourceId());
        delayedAbility.setControllerId(source.getControllerId());
        game.addDelayedTriggeredAbility(delayedAbility);
       
        return true;
    }
View Full Code Here

                token.addAbility(HasteAbility.getInstance());
                token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());

                ExileTargetEffect exileEffect = new ExileTargetEffect();
                exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken()));
                DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
                delayedAbility.setSourceId(source.getSourceId());
                delayedAbility.setControllerId(source.getControllerId());
                game.addDelayedTriggeredAbility(delayedAbility);

                return true;
            }
        }
View Full Code Here

TOP

Related Classes of mage.abilities.DelayedTriggeredAbility

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.