Package mage.players

Examples of mage.players.Player.moveCardToHandWithInfo()


                        return you.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD);
                    }
                }
            } else {
                for (Card card : cards.getCards(game)) {
                    return you.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD);
                }
            }
        }
        return false;
    }
View Full Code Here


    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            Card cardInGraveyard = game.getCard(getTargetPointer().getFirst(game, source));
            if (cardInGraveyard != null) {
                controller.moveCardToHandWithInfo(cardInGraveyard, source.getSourceId(), game, Zone.GRAVEYARD);
            }
            Permanent permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
            if (permanent != null) {
                controller.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
            }
View Full Code Here

            if (cardInGraveyard != null) {
                controller.moveCardToHandWithInfo(cardInGraveyard, source.getSourceId(), game, Zone.GRAVEYARD);
            }
            Permanent permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget());
            if (permanent != null) {
                controller.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
            }
            return true;
        }
        return false;
    }
View Full Code Here

            TargetCardInYourGraveyard target = new TargetCardInYourGraveyard();
            if (target.canChoose(source.getSourceId(), player.getId(), game)) {
                if (target.choose(Outcome.ReturnToHand, player.getId(), source.getSourceId(), game)) {
                    Card card = game.getCard(target.getFirstTarget());
                    if (card != null) {
                        player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD);
                        cardReturned = true;
                    }
                }
            }
            if (!cardReturned) {
View Full Code Here

                TargetCard target = new TargetCard(0, 1, Zone.LIBRARY, filterPutInHand);
                if (properCardFound && controller.choose(Outcome.DrawCard, cards, target, game)) {
                    Card card = game.getCard(target.getFirstTarget());
                    if (card != null) {
                        cards.remove(card);
                        controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                    }

                }

                for (UUID cardId : cards) {
View Full Code Here

                        player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId(), true);
                        revealed.remove(card);
                    }
                    card = revealed.getCards(game).iterator().next();
                    if (card != null) {
                        player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                    }
                }
                else if (target.getTargets().size() == 1) {
                    Card card = revealed.getCards(game).iterator().next();
                    if (card != null) {
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.