Package mage.abilities

Examples of mage.abilities.DelayedTriggeredAbility


        for (Card card: cards) {
            if ( CardUtil.isPermanentCard(card) && !card.getSubtype().contains("Aura") ) {
                game.getExile().add(exileId, "Karn Liberated", card);
            }
        }
        DelayedTriggeredAbility delayedAbility = new KarnLiberatedDelayedTriggeredAbility(exileId);
        delayedAbility.setSourceId(source.getSourceId());
        delayedAbility.setControllerId(source.getControllerId());
        game.addDelayedTriggeredAbility(delayedAbility);
        game.start(null);
        return true;
    }
View Full Code Here


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

            SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice this token");
            sacrificeEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken()));
            DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(sacrificeEffect);
            delayedAbility.setSourceId(source.getSourceId());
            delayedAbility.setControllerId(source.getControllerId());
            game.addDelayedTriggeredAbility(delayedAbility);
        }
        return true;
    }
View Full Code Here

            PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(null, CardType.ENCHANTMENT, true);
            effect.setTargetPointer(getTargetPointer());
            if (effect.apply(game, source) && effect.getAddedPermanent() != null) {
                ExileTargetEffect exileEffect = new ExileTargetEffect();
                exileEffect.setTargetPointer(new FixedTarget(effect.getAddedPermanent().getId()));
                DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
                delayedAbility.setSourceId(source.getSourceId());
                delayedAbility.setControllerId(source.getControllerId());
                game.addDelayedTriggeredAbility(delayedAbility);

                return true;
            }
        }
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        for (UUID opponentId : game.getOpponents(source.getControllerId())) {
            DelayedTriggeredAbility ability = new ChancellorOfTheAnnexDelayedTriggeredAbility(opponentId);
            ability.setSourceId(source.getSourceId());
            ability.setControllerId(source.getControllerId());
            game.addDelayedTriggeredAbility(ability);
        }
        return true;
    }
View Full Code Here

        return new SearingBloodEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        DelayedTriggeredAbility delayedAbility = new SearingBloodDelayedTriggeredAbility(source.getFirstTarget());
        delayedAbility.setSourceId(source.getSourceId());
        delayedAbility.setControllerId(source.getControllerId());
        game.addDelayedTriggeredAbility(delayedAbility);

        return new DamageTargetEffect(2).apply(game, source);
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        //create delayed triggered ability
        Effect effect = new ReturnSourceFromGraveyardToBattlefieldEffect(true, true);
        effect.setText(staticText);
        DelayedTriggeredAbility delayedAbility = new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(effect);
        delayedAbility.setSourceId(source.getSourceId());
        delayedAbility.setControllerId(source.getControllerId());
        game.addDelayedTriggeredAbility(delayedAbility);
        return true;
    }
View Full Code Here

                    hasteEffect.setTargetPointer(fixedTarget);
                    game.addEffect(hasteEffect, source);
                    // Exile it at end of turn
                    ExileTargetEffect exileEffect = new ExileTargetEffect(null,"",Zone.BATTLEFIELD);
                    exileEffect.setTargetPointer(fixedTarget);
                    DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
                    delayedAbility.setSourceId(source.getSourceId());
                    delayedAbility.setControllerId(source.getControllerId());
                    game.addDelayedTriggeredAbility(delayedAbility);
                }
            }
            return true;
        }
View Full Code Here

                        ContinuousEffect hasteEffect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom);
                        hasteEffect.setTargetPointer(new FixedTarget(permanent.getId()));
                        game.addEffect(hasteEffect, source);
                        ExileTargetEffect exileEffect = new ExileTargetEffect(new StringBuilder("exile ").append(permanent.getName()).toString());
                        exileEffect.setTargetPointer(new FixedTarget(card.getId()));
                        DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect, TargetController.YOU);
                        delayedAbility.setSourceId(source.getSourceId());
                        delayedAbility.setControllerId(source.getControllerId());
                        game.addDelayedTriggeredAbility(delayedAbility);
                        result = true;
                    }
                }
            }
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        Permanent sourcePermanent = game.getPermanent(source.getSourceId());
        if (controller != null && sourcePermanent != null) {
            controller.moveCardToExileWithInfo(sourcePermanent, null, "", source.getSourceId(), game, Zone.BATTLEFIELD);
            DelayedTriggeredAbility delayedAbility = new AtBeginningNextDeclareAttackersStepNextTurnDelayedTriggeredAbility();
            delayedAbility.setSourceId(source.getSourceId());
            delayedAbility.setControllerId(source.getControllerId());
            game.addDelayedTriggeredAbility(delayedAbility);
            return true;
        }
        return false;
    }
View Full Code Here

        return new AdarkarValkyrieEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        DelayedTriggeredAbility delayedAbility = new AdarkarValkyrieDelayedTriggeredAbility(new FixedTarget(this.getTargetPointer().getFirst(game, source)));
        delayedAbility.setSourceId(source.getSourceId());
        delayedAbility.setControllerId(source.getControllerId());
        game.addDelayedTriggeredAbility(delayedAbility);
        return false;
    }
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.