Examples of PutTokenOntoBattlefieldCopyTargetEffect


Examples of mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect

        this.expansionSetCode = "BNG";

        this.color.setBlue(true);

        // Put a token onto the battlefield that's a copy of target creature you control. If it's your turn, scry 2.
        this.getSpellAbility().addEffect(new PutTokenOntoBattlefieldCopyTargetEffect());
        this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
        this.getSpellAbility().addEffect(new ConditionalOneShotEffect(new ScryEffect(2), MyTurnCondition.getInstance(), "If it's your turn, scry 2"));
    }
View Full Code Here

Examples of mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanentOrLKIBattlefield(source.getFirstTarget());
        if (permanent != null) {
            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);
View Full Code Here

Examples of mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect

        this.expansionSetCode = "ISD";

        this.color.setBlue(true);

        // Put a token onto the battlefield that's a copy of target creature you control.
        this.getSpellAbility().addEffect(new PutTokenOntoBattlefieldCopyTargetEffect());
        this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());

        // Flashback {5}{U}{U}
        this.addAbility(new FlashbackAbility(new ManaCostsImpl("{5}{U}{U}"), TimingRule.INSTANT));
    }
View Full Code Here

Examples of mage.abilities.effects.common.PutTokenOntoBattlefieldCopyTargetEffect

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source));
        if (permanent != null) {
            Effect effect = new PutTokenOntoBattlefieldCopyTargetEffect();
            effect.setTargetPointer(getTargetPointer());
            effect.apply(game, source);

            Set<UUID> playersSaidYes = new HashSet<>();
            PlayerList playerList = game.getPlayerList().copy();
            playerList.setCurrent(game.getActivePlayerId());
            Player player = game.getPlayer(game.getActivePlayerId());
            do {
                if (game.getOpponents(source.getControllerId()).contains(player.getId())) {
                    String decision;
                    if (player.chooseUse(outcome, "Put a copy of target creature onto the battlefield for you?", game)) {
                        playersSaidYes.add(player.getId());
                        decision = " chooses to copy ";
                    } else {
                        decision = " won't copy ";
                    }
                    game.informPlayers((new StringBuilder(player.getName()).append(decision).append(permanent.getName()).toString()));
                }
                player = playerList.getNext(game);
            } while (!player.getId().equals(game.getActivePlayerId()));

            for (UUID playerId: playersSaidYes) {
                effect = new PutTokenOntoBattlefieldCopyTargetEffect(playerId);
                effect.setTargetPointer(getTargetPointer());
                effect.apply(game, source);               
            }

            if (playersSaidYes.size() > 0) {
                effect = new PutTokenOntoBattlefieldCopyTargetEffect();
                effect.setTargetPointer(getTargetPointer());
                effect.apply(game, source);               
            }
            return true;
        }
        return false;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.