Package mage.players

Examples of mage.players.Player.moveCardToExileWithInfo()


            // Exile the top six cards of your library,
            int num = Math.min(6, player.getLibrary().size());
            for (int i = 0; i < num; i++) {
                Card card = player.getLibrary().removeFromTop(game);
                if (card != null) {
                    player.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY);
                }
            }
           
            // then reveal cards from the top of your library until you reveal the named card.
            Cards cards = new CardsImpl(Zone.LIBRARY);
View Full Code Here


                        player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                        break;
                    }
                    // and exile all other cards revealed this way.
                    else {
                        player.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY);
                    }
                }
            }
            player.revealCards("Demonic Consultation", cards, game);
            return true;
View Full Code Here

        if (controller != null) {
            // move cards from library to exile
            for (int i = 0; i < source.getManaCostsToPay().getX(); i++) {
                if (controller.getLibrary().size() > 0) {
                    Card topCard = controller.getLibrary().getFromTop(game);
                    controller.moveCardToExileWithInfo(topCard, source.getSourceId(), "Cards exiled by Epic Experiment",  source.getSourceId(), game, Zone.LIBRARY);
                }
            }
            // cast the possible cards without paying the mana
            ExileZone epicExperimentExileZone = game.getExile().getExileZone(source.getSourceId());
            FilterCard filter = filterStatic.copy();
View Full Code Here

        Card sourceCard = game.getCard(source.getSourceId());
        while (you != null && sourceCard != null
                && you.getLibrary().size() > 0 && you.isInGame()) {
            Card card = you.getLibrary().removeFromTop(game);
            if (card != null) {
                you.moveCardToExileWithInfo(card, null, null, source.getSourceId(), game, Zone.LIBRARY);
                if (!card.getCardType().contains(CardType.LAND)) {
                    int damage = card.getManaCost().convertedManaCost();
                    if (damage > 0) {
                        Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
                        if (creature != null) {
View Full Code Here

                for (int i = 0; i < 4; i++)
                {
                    if (cards.size() > 0)
                    {
                        Card card = cards.getRandom(game);
                        player.moveCardToExileWithInfo(card, null, null, source.getId(), game, Zone.LIBRARY);
                        cards.remove(card);
                    }
                }
                player.lookAtCards("OrcishLibrarian", cards, game);
                TargetCard target = new TargetCard (Zone.PICK, new FilterCard("card to put on the top of target player's library"));
View Full Code Here

    public boolean replaceEvent(GameEvent event, Ability source, Game game) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            Card card = game.getCard(event.getTargetId());
            if (card != null) {
                return controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, null);
            }
        }
        return false;
    }
View Full Code Here

            if (getTargetPointer().getFirst(game, source) != null) {
                Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
                Card card = game.getCard(getTargetPointer().getFirst(game, source));
                if (permanent != null) {
                    UUID exileId = UUID.randomUUID();
                    if (controller.moveCardToExileWithInfo(permanent, exileId, sourceObject.getName(), source.getSourceId(), game, Zone.BATTLEFIELD)) {
                        if (card != null) {
                            AtEndOfTurnDelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(new ReturnFromExileEffect(exileId, Zone.BATTLEFIELD));
                            delayedAbility.setSourceId(source.getSourceId());
                            delayedAbility.setControllerId(card.getOwnerId());
                            game.addDelayedTriggeredAbility(delayedAbility);
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Card card = game.getCard(source.getFirstTarget());
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null && card != null) {
            if (controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD)) {
                EmptyToken token = new EmptyToken();
                CardUtil.copyTo(token).from(card);

                if (!token.hasSubtype("Spirit")) {
                    token.getSubtype().add("Spirit");
View Full Code Here

            target.setNotTarget(true);
            controller.choose(Outcome.Benefit, targetPlayer.getHand(), target, game);
            for (UUID cardId : target.getTargets()) {
                Card chosenCard = game.getCard(cardId);
                if (chosenCard != null) {
                    controller.moveCardToExileWithInfo(chosenCard, null, "", source.getSourceId(), game, Zone.HAND);
                    exiledCards.add(chosenCard);
                }                       
            }
            // Exile other cards with the same name
            // 4/15/2013  If you don't exile any cards from the player's hand, you don't search that player's library
View Full Code Here

                TargetCardInGraveyard targetCardsGraveyard = new TargetCardInGraveyard(0, Integer.MAX_VALUE, filterNamedCards);
                controller.chooseTarget(outcome, targetPlayer.getGraveyard(), targetCardsGraveyard, source, game);
                for(UUID cardId:  targetCardsGraveyard.getTargets()) {
                    Card card = game.getCard(cardId);
                    if (card != null) {
                        controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD);
                    }
                }
               
                // search cards in hand
                TargetCardInHand targetCardsHand = new TargetCardInHand(0, Integer.MAX_VALUE, filterNamedCards);
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.