Examples of shuffleLibrary()


Examples of mage.players.Player.shuffleLibrary()

    public void mulligan(UUID playerId) {
        Player player = getPlayer(playerId);
        int numCards = player.getHand().size();
        player.getLibrary().addAll(player.getHand().getCards(this), this);
        player.getHand().clear();
        player.shuffleLibrary(this);
        int deduction = 1;
        if (freeMulligans > 0) {
            if (usedFreeMulligans != null && usedFreeMulligans.containsKey(player.getId())) {
                int used = usedFreeMulligans.get(player.getId());
                if (used < freeMulligans ) {
View Full Code Here

Examples of mage.players.Player.shuffleLibrary()

                }
            }
            for (UUID player : players) {
                Player owner = game.getPlayer(player);
                if (owner != null) {
                    owner.shuffleLibrary(game);
                }
            }
            return true;
        }
        return false;
View Full Code Here

Examples of mage.players.Player.shuffleLibrary()

            TargetCardInLibrary target = new TargetCardInLibrary();
            if (player.searchLibrary(target, game)) {
                Card card = game.getCard(target.getFirstTarget());
                if (card != null) {
                    card.moveToZone(Zone.HAND, id, game, false);
                    player.shuffleLibrary(game);
                }
            }
        }
        return true;
    }
View Full Code Here

Examples of mage.players.Player.shuffleLibrary()

    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getFirstTarget());
        if (player != null) {
            player.getLibrary().addAll(player.getGraveyard().getCards(game), game);
            player.getGraveyard().clear();
            player.shuffleLibrary(game);
            return true;
        }
        return false;
    }
}
View Full Code Here

Examples of mage.players.Player.shuffleLibrary()

                    Permanent permanent = game.getPermanent(targetCreature.getFirstTarget());
                    permanent.addAttachment(equipment.getId(), game);
                }
            }
        }
        player.shuffleLibrary(game);
        return true;
    }
}
View Full Code Here

Examples of mage.players.Player.shuffleLibrary()

            foundCards.addAll(cards);
            if (reveal) {
                controller.revealCards(sourceObject.getLogName(), foundCards, game);
            }
            if (forceShuffle) {
                controller.shuffleLibrary(game);
            }
            if (cards.size() > 0) {
                game.informPlayers(controller.getName() + " moves " + cards.size() + " card" + (cards.size() == 1 ? " ":"s ") + "on top of his or her library");
            }
            for (Card card: cards) {               
View Full Code Here

Examples of mage.players.Player.shuffleLibrary()

            }
            return true;
        }
        // shuffle
        if (forceShuffle) {
            controller.shuffleLibrary(game);
        }
        return false;
    }

    private void setText() {
View Full Code Here

Examples of mage.players.Player.shuffleLibrary()

                    }
                } else {
                    controller.lookAtCards(targetPlayer.getName() + " library", cardsInLibrary, game);
                }

                targetPlayer.shuffleLibrary(game);
            }

            return true;
        }
View Full Code Here

Examples of mage.players.Player.shuffleLibrary()

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(targetPointer.getFirst(game, source));
        if (player != null) {
      player.shuffleLibrary(game);
            return true;
        }
        return false;
    }
}
View Full Code Here

Examples of mage.players.Player.shuffleLibrary()

    public void postResolve(Card card, Ability source, UUID controllerId, Game game) {
        Player controller = game.getPlayer(source.getControllerId());
        Player owner = game.getPlayer(card.getOwnerId());
        if (controller != null && owner != null) {
            controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.STACK, true, true);
            owner.shuffleLibrary(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.