Package mage.players

Examples of mage.players.Player.moveCardToHandWithInfo()


                    }
                    break;
                case EXILED:
                    card = game.getCard(targetId);
                    if (card != null) {
                        controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.EXILED);
                        if (card.isFaceDown()) {
                            card.setFaceDown(false);
                        }
                    } else {
                        result = false;
View Full Code Here


        for (UUID cardId: getTargetPointer().getTargets(game, source)) {
            Card card = game.getCard(cardId);
            if (card != null && game.getState().getZone(cardId).equals(Zone.GRAVEYARD)) {
                Player player = game.getPlayer(card.getOwnerId());
                if (player != null) {                   
                    player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD);
                }
            }
        }
        return true;
    }
View Full Code Here

        for (int i = 0; i < count; i++) {
            Card card = controller.getLibrary().removeFromTop(game);
            if (card != null) {
                cards.add(card);
                if (card.getCardType().contains(CardType.CREATURE)) {
                    controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                } else {
                    controller.moveCardToGraveyardWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                }
            } else {
                return false;
View Full Code Here

            TargetControlledPermanent target = new TargetControlledPermanent(number, number, filter, true);
            if (player.choose(this.outcome, target, source.getSourceId(), game)) {
                for (UUID targetCreatureId : target.getTargets()) {
                    Permanent permanent = game.getPermanent(targetCreatureId);
                    if (permanent != null) {
                        player.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
                    }
                }
            }
            return true;
        }
View Full Code Here

                if (player.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
                    Card auraInHand = game.getCard(target.getFirstTarget());
                    if (auraInHand != null) {
                        player.putOntoBattlefieldWithInfo(auraInHand, game, Zone.HAND, source.getSourceId());
                        enchantedPermanent.addAttachment(auraInHand.getId(), game);
                        player.moveCardToHandWithInfo(auraPermanent, source.getSourceId(), game, Zone.BATTLEFIELD);
                        return true;
                    }
                }
            }
        }
View Full Code Here

                if (target.getTargets().size() > 0) {
                    Cards revealed = new CardsImpl();
                    for (UUID cardId : target.getTargets()) {
                        Card card = player.getLibrary().remove(cardId, game);
                        if (card != null) {
                            player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                            revealed.add(card);
                        }
                    }
                    player.revealCards("Search", revealed, game);
                }
View Full Code Here

        player.revealCards(new StringBuilder("Put ").append(filter.getMessage()).append(" into hand").toString(), cards, game);

        Set<Card> cardsList = cards.getCards(game);
        for (Card card : cardsList) {
            if (filter.match(card, game)) {
                player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                cards.remove(card);
            }
        }

        player.putCardsOnBottomOfLibrary(cards, game, source, anyOrder);
View Full Code Here

    @Override
    public void postResolve(Card card, Ability source, UUID controllerId, Game game) {
        Player controller = game.getPlayer(controllerId);
        if (controller != null) {
            controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.STACK);
        }
    }
}
View Full Code Here

            if (player == null) {
                return false;
            }
            Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
            if (permanent != null) {
                player.moveCardToHandWithInfo((Card) permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
                return true;
            }
            return false;
        }
    }
View Full Code Here

            }
            Cards cards = new CardsImpl();
            while (player.getLibrary().size() > 0) {
                Card card = player.getLibrary().removeFromTop(game);
                if (filter.match(card, source.getSourceId(), source.getControllerId(), game)) {
                    player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                    break;
                }
                cards.add(card);
            }
            player.revealCards("Abundance", cards, game);
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.