Examples of removeFromTop()


Examples of mage.players.Library.removeFromTop()

            }
            CardsImpl cards = new CardsImpl();
            Card card;
            Filter filter = new FilterBasicLandCard();
            do {
                card = library.removeFromTop(game);
                if (card != null) {
                   
                    if (filter.match(card, game)) {
                        player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                    } else {
View Full Code Here

Examples of mage.players.Library.removeFromTop()

        if (player != null && player.getLibrary().size() > 0) {
            CardsImpl cards = new CardsImpl();
            Library library = player.getLibrary();
            Card card = null;
            do {
                card = library.removeFromTop(game);
                if (card != null) {
                    cards.add(card);
                }
            } while (library.size() > 0 && card != null && card.getCardType().contains(CardType.LAND));
            // reveal cards
View Full Code Here

Examples of mage.players.Library.removeFromTop()

            Player player = game.getPlayer(permanent.getControllerId());
            if (player != null) {
                Library library = player.getLibrary();
                if (library.size() > 0) {
                    Cards cards = new CardsImpl();
                    Card card = library.removeFromTop(game);
                    cards.add(card);
                    while (!card.getCardType().contains(CardType.CREATURE) && library.size() > 0) {
                        card = library.removeFromTop(game);
                        cards.add(card);
                    }
View Full Code Here

Examples of mage.players.Library.removeFromTop()

                if (library.size() > 0) {
                    Cards cards = new CardsImpl();
                    Card card = library.removeFromTop(game);
                    cards.add(card);
                    while (!card.getCardType().contains(CardType.CREATURE) && library.size() > 0) {
                        card = library.removeFromTop(game);
                        cards.add(card);
                    }

                    if (card.getCardType().contains(CardType.CREATURE)) {
                        card.putOntoBattlefield(game, Zone.PICK, source.getSourceId(), player.getId());
View Full Code Here

Examples of mage.players.Library.removeFromTop()

        if (player != null) {
            Library library = player.getLibrary();

            int amount = Math.min(player.getGraveyard().size(), library.size());
            for (int i = 0; i < amount; i++) {
                Card card = library.removeFromTop(game);
                if (card != null) {
                    card.moveToZone(Zone.GRAVEYARD, source.getSourceId(), game, true);
                }
            }
View Full Code Here

Examples of mage.players.Library.removeFromTop()

            Player owner = game.getPlayer(card.getOwnerId());
            if (card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true)) {
                // Move Sphinx to third position
                Library lib = game.getPlayer(source.getControllerId()).getLibrary();
                if (lib != null) {
                    Card card1 = lib.removeFromTop(game);
                    if (card1.getId().equals(source.getSourceId())) {
                        Card card2 = lib.removeFromTop(game);
                        Card card3 = lib.removeFromTop(game);
                        if (card1 != null) {
                            lib.putOnTop(card1, game);
View Full Code Here

Examples of mage.players.Library.removeFromTop()

                // Move Sphinx to third position
                Library lib = game.getPlayer(source.getControllerId()).getLibrary();
                if (lib != null) {
                    Card card1 = lib.removeFromTop(game);
                    if (card1.getId().equals(source.getSourceId())) {
                        Card card2 = lib.removeFromTop(game);
                        Card card3 = lib.removeFromTop(game);
                        if (card1 != null) {
                            lib.putOnTop(card1, game);
                        }
                        if (card3 != null) {
View Full Code Here

Examples of mage.players.Library.removeFromTop()

                Library lib = game.getPlayer(source.getControllerId()).getLibrary();
                if (lib != null) {
                    Card card1 = lib.removeFromTop(game);
                    if (card1.getId().equals(source.getSourceId())) {
                        Card card2 = lib.removeFromTop(game);
                        Card card3 = lib.removeFromTop(game);
                        if (card1 != null) {
                            lib.putOnTop(card1, game);
                        }
                        if (card3 != null) {
                            lib.putOnTop(card3, 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.