Package mage.target.common

Examples of mage.target.common.TargetCardInExile


        this.color.setWhite(true);

        // Put target face-up exiled card into its owner's graveyard.
        this.getSpellAbility().addEffect(new PullFromEternityEffect());
        this.getSpellAbility().addTarget(new TargetCardInExile(1,1,filter, null, true));

    }
View Full Code Here


        ExileZone jaceExileZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source));
        if (jaceExileZone == null) {
            return true;
        }
        FilterCard filter = new FilterCard("card to cast without mana costs");
        TargetCardInExile target = new TargetCardInExile(filter, source.getSourceId());
        while (jaceExileZone.count(filter, game) > 0 && controller.choose(Outcome.PlayForFree, jaceExileZone, target, game)) {
                Card card = game.getCard(target.getFirstTarget());
                if (card != null) {

                    if (controller.cast(card.getSpellAbility(), game, true))
                    {
                        game.getExile().removeCard(card, game);
                    }
                }
                target.clearChosen();
        }

        return true;
    }
View Full Code Here

            FilterCard filter = filterStatic.copy();
            filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, source.getManaCostsToPay().getX() + 1));
            filter.setMessage("instant and sorcery cards with converted mana cost "+ source.getManaCostsToPay().getX() +" or less");
            while (epicExperimentExileZone != null && epicExperimentExileZone.count(filter, game) > 0
                    && controller.chooseUse(Outcome.PlayForFree, "Cast cards exiled with Epic Experiment without paying its mana cost?", game)) {
                TargetCardInExile target = new TargetCardInExile(filter, source.getSourceId());
                while (epicExperimentExileZone.count(filter, game) > 0 && controller.choose(Outcome.PlayForFree, epicExperimentExileZone, target, game)) {
                        Card card = game.getCard(target.getFirstTarget());
                        if (card != null) {                           
                            if (controller.cast(card.getSpellAbility(), game, true))
                            {
                                game.getExile().removeCard(card, game);
                            }
                        }
                        target.clearChosen();
                }
            }
            // move cards not cast to graveyard
            ExileZone exile = game.getExile().getExileZone(source.getSourceId());
            if (exile != null) {
View Full Code Here

        Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
        if (spell != null) {
            if (spell.moveToExile(source.getSourceId(), "Knowledge Pool Exile", source.getSourceId(), game)) {
                Player player = game.getPlayer(spell.getControllerId());
                if (player != null && player.chooseUse(Outcome.PlayForFree, "Cast another nonland card exiled with Knowledge Pool without paying that card's mana cost?", game)) {
                    TargetCardInExile target = new TargetCardInExile(filter, source.getSourceId());
                    while (player.choose(Outcome.PlayForFree, game.getExile().getExileZone(source.getSourceId()), target, game)) {
                        Card card = game.getCard(target.getFirstTarget());
                        if (card != null && !card.getId().equals(spell.getSourceId())) {
                            game.getExile().removeCard(card, game);
                            return player.cast(card.getSpellAbility(), game, true);
                        }
                        target.clearChosen();
                    }
                }
                return true;
            }
        }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            TargetCardInExile target = new TargetCardInExile(new FilterCard(), CardUtil.getCardExileZoneId(game, source));
            if (controller.choose(Outcome.PlayForFree, game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)), target, game)) {
                Card card = game.getCard(target.getFirstTarget());
                if (card != null) {
                    game.getExile().removeCard(card, game);
                    return controller.cast(card.getSpellAbility(), game, true);
                }
            }
View Full Code Here

TOP

Related Classes of mage.target.common.TargetCardInExile

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.