Examples of moveCardToHandWithInfo()


Examples of mage.players.Player.moveCardToHandWithInfo()

            Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
            if (exile != null && sourcePermanent != null) {
                LinkedList<UUID> cards = new LinkedList<>(exile);
                for (UUID cardId : cards) {
                    Card card = game.getCard(cardId);
                    controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.EXILED);
                }
                exile.clear();
                return true;
            }           
        }
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

            int islands = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game);
            FilterPermanent creatureFilter = new FilterCreaturePermanent();
            creatureFilter.add(new ControllerPredicate(TargetController.OPPONENT));
            creatureFilter.add(new ToughnessPredicate(Filter.ComparisonType.LessThan, islands +1));
            for (Permanent permanent: game.getBattlefield().getActivePermanents(creatureFilter, source.getControllerId(), source.getSourceId(), game)) {
                controller.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
            }
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            for (UUID targetId: targetPointer.getTargets(game, source)) {
                Permanent creature = game.getPermanent(targetId);
                if (creature != null) {
                    controller.moveCardToHandWithInfo(creature, source.getSourceId(), game, Zone.BATTLEFIELD);
                    for (UUID attachementId: creature.getAttachments()) {
                        Permanent attachment = game.getPermanent(attachementId);
                        if (attachment != null && filter.match(attachment, game)) {
                            controller.moveCardToHandWithInfo(attachment, source.getSourceId(), game, Zone.BATTLEFIELD);
                        }
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

                if (creature != null) {
                    controller.moveCardToHandWithInfo(creature, source.getSourceId(), game, Zone.BATTLEFIELD);
                    for (UUID attachementId: creature.getAttachments()) {
                        Permanent attachment = game.getPermanent(attachementId);
                        if (attachment != null && filter.match(attachment, game)) {
                            controller.moveCardToHandWithInfo(attachment, source.getSourceId(), game, Zone.BATTLEFIELD);
                        }
                    }
                }
            }
            return true;
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

        while (controller.getLibrary().size() > 0) {
            Card card = controller.getLibrary().removeFromTop(game);
            if (card != null) {
                cards.add(card);
                if(card.getName().equals(cardName)){
                    controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                    break;
                }
                else{
                    controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY);
                }
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

                cards.add(card);
                player.lookAtCards("Scrying Sheets", cards, game);
                if (card.getSupertype().contains("Snow")) {
                    if (player.chooseUse(outcome, new StringBuilder("Reveal ").append(card.getName()).append(" and put it into your hand?").toString(), game)) {
                        card = player.getLibrary().removeFromTop(game);
                        player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                        player.revealCards("Scrying Sheets", cards, game);
                    }
                }
            }
            return true;
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

            TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(discarded, new FilterCard());
            target.choose(Outcome.ReturnToHand, player.getId(), source.getSourceId(), game);
            for (UUID targetId : target.getTargets()) {
                Card card = game.getCard(targetId);
                if (card != null) {
                    player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD);
                }
            }
           
            return true;
        }
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

                for (UUID targetId : targetPointer.getTargets(game, source)) {
                    switch (game.getState().getZone(targetId)) {
                        case GRAVEYARD:
                            Card card = game.getCard(targetId);
                            if (card != null) {
                                controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD);
                            else {
                                result = false;
                            }
                            break;
                    }
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

            cards.addAll(controller.getLibrary().getTopCards(game, count));
            if (!cards.isEmpty()) {
                for (Card card: cards.getCards(game)) {
                    cards.add(card);
                    if (card.getCardType().contains(CardType.LAND)) {
                        controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                    } else {
                        controller.moveCardToGraveyardWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                    }
                }
                controller.revealCards(sourceObject.getLogName(), cards, game);
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

            if (target.canChoose(source.getSourceId(), player.getId(), game) && player.choose(Outcome.DrawCard, cards, target, game)) {
                Card card = cards.get(target.getFirstTarget(), game);
                if (card != null) {
                    player.revealCards(sourcePermanent.getName(), new CardsImpl(card), game);
                    cards.remove(card);
                    player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                }
            }
        }

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.