Examples of moveCardToLibraryWithInfo()


Examples of mage.players.Player.moveCardToLibraryWithInfo()

                        toLibrary.add(permanent);
                    }
                }
                // move all permanents to lib at the same time
                for(Permanent permanent: toLibrary) {
                    player.moveCardToLibraryWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD, false, false);
                }
                player = playerList.getNext(game);           
            } while (player != null && !player.getId().equals(game.getActivePlayerId()));
            return true;
        }
View Full Code Here

Examples of mage.players.Player.moveCardToLibraryWithInfo()

    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));
        if (permanent != null) {
            Player player = game.getPlayer(permanent.getOwnerId());
            if (player != null) {
                player.moveCardToLibraryWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD, true, true);
                player.shuffleLibrary(game);
                player.drawCards(2, game);
                return true;
            }
        }
View Full Code Here

Examples of mage.players.Player.moveCardToLibraryWithInfo()

                TargetCardInHand target = new TargetCardInHand();
                target.setTargetName("a card from your hand to put on top of your library");
                shuffler.choose(Outcome.Detriment, target, source.getSourceId(), game);
                Card card = shuffler.getHand().get(target.getFirstTarget(), game);
                if (card != null) {
                    shuffler.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, true, false);

                }
            }
            return true;
        }
View Full Code Here

Examples of mage.players.Player.moveCardToLibraryWithInfo()

                topOfLibrary = controller.chooseUse(outcome, "Put " + creature.getLogName() + " to top of libraray instead?" , game);
            }
            if (topOfLibrary) {
                controller.moveCardToHandWithInfo(creature, source.getSourceId(), game, Zone.BATTLEFIELD);
            } else {
                controller.moveCardToLibraryWithInfo(creature, source.getSourceId(), game, Zone.BATTLEFIELD, true, true);
            }
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.moveCardToLibraryWithInfo()

        }

        while (exile.size() > 0) {
            card = exile.getRandom(game);
            exile.remove(card.getId());
            player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.EXILED, false, false);
        }

        return true;
    }
View Full Code Here

Examples of mage.players.Player.moveCardToLibraryWithInfo()

                    while (revealed.size() > 1 && controller.isInGame()) {
                        controller.choose(Outcome.Neutral, revealed, targetToLib, game);
                        Card card = revealed.get(targetToLib.getFirstTarget(), game);
                        if (card != null) {
                            revealed.remove(card);
                            controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, true, false);

                        }
                        targetToLib.clearChosen();
                    }
View Full Code Here

Examples of mage.players.Player.moveCardToLibraryWithInfo()

                        targetToLib.clearChosen();
                    }

                    if (revealed.size() == 1) {
                        Card card = revealed.get(revealed.iterator().next(), game);
                        controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, true, false);
                    }

                }

                return true;
View Full Code Here

Examples of mage.players.Player.moveCardToLibraryWithInfo()

                        TargetCardInHand target = new TargetCardInHand();
                        target.setTargetName("a card from your hand to put on top of your library");
                        player.choose(Outcome.Detriment, target, source.getSourceId(), game);
                        Card card = player.getHand().get(target.getFirstTarget(), game);
                        if (card != null) {
                            player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, true, false);
                        }
                    }
                }               
            }
            return true;
View Full Code Here

Examples of mage.players.Player.moveCardToLibraryWithInfo()

        if (controller != null) {
            int cardsHand = controller.getHand().size();
            if (cardsHand > 0) {
                for (Card card: controller.getHand().getCards(game)) {
                    if (card != null) {
                        controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, true, false);
                    }
                }
                controller.shuffleLibrary(game);
                controller.drawCards(cardsHand, game);
            }
View Full Code Here

Examples of mage.players.Player.moveCardToLibraryWithInfo()

        Player player = game.getPlayer(source.getControllerId());
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (player != null) {
            player.gainLife(5, game);
            if (permanent != null) {
                player.moveCardToLibraryWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD, true, true);
            }
            player.getLibrary().addAll(player.getGraveyard().getCards(game), game);
            player.getGraveyard().clear();
            player.shuffleLibrary(game);
            return true;
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.