Examples of moveToZone()


Examples of mage.cards.Card.moveToZone()

                            break;
                        case LIBRARY:
                            controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.EXILED, true, true);
                            break;
                        default:
                            card.moveToZone(zone, source.getSourceId(), game, tapped);
                            game.informPlayers(new StringBuilder(controller.getName()).append(" moves ").append(card.getName()).append(" to ").append(zone.toString()).toString());
                    }
                }
            }
            game.getExile().getExileZone(exileId).clear();
View Full Code Here

Examples of mage.cards.Card.moveToZone()

            Cards hand = player.getHand().copy();
            for(UUID uuid : hand){
                Card card = game.getCard(uuid);
                if(card != null){
                    if(card.getCardType().contains(CardType.LAND)){
                        card.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false);
                    }
                    else{
                        player.discard(card, source, game);
                    }
                }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

            TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(Math.min(amount, player.getGraveyard().size()), new FilterCard());
            if (player.chooseTarget(outcome, target, source, game)) {
                for (UUID targetId: target.getTargets()) {
                    Card card = player.getGraveyard().get(targetId, game);
                    if (card != null) {
                        card.moveToZone(Zone.EXILED, source.getSourceId(), game, false);
                    }
                }
            }
            return true;
        }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

            }          
            if (card != null) {
                Player player = game.getPlayer(card.getOwnerId());
                if (player != null && player.chooseUse(Outcome.Benefit, "Move commander to command zone?", game)){
                    game.informPlayers(player.getName() + " moved his commander to the command zone instead");
                    return card.moveToZone(Zone.COMMAND, source.getSourceId(), game, false);
                }
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

            if (target.getTargets().size() > 0) {
                Cards cards = new CardsImpl();
                for (UUID cardId: target.getTargets()) {
                    Card card = player.getLibrary().remove(cardId, game);
                    if (card != null){
                        card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
                        if (revealCards) {
                            cards.add(card);
                        }
                    }
                }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

            }
            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) {               
                card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
            }
            return true;
        }
        // shuffle
        if (forceShuffle) {
View Full Code Here

Examples of mage.cards.Card.moveToZone()

        for (int i = 0; i < count; i++) {
            Card card = player.getLibrary().removeFromTop(game);
            if (card != null) {
                cardsToReveal.add(card);
                if (card.hasSubtype("Island")) {
                    card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
                } else {
                    cards.add(card);
                    game.setZone(card.getId(), Zone.PICK);
                }
            }
View Full Code Here

Examples of mage.cards.Card.moveToZone()

        while (player.isInGame() && cards.size() > 1) {
            player.choose(Outcome.Neutral, cards, target, game);
            Card card = cards.get(target.getFirstTarget(), game);
            if (card != null) {
                cards.remove(card);
                card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
            }
            target.clearChosen();
        }
        if (cards.size() == 1) {
            Card card = cards.get(cards.iterator().next(), game);
View Full Code Here

Examples of mage.cards.Card.moveToZone()

            }
            target.clearChosen();
        }
        if (cards.size() == 1) {
            Card card = cards.get(cards.iterator().next(), game);
            card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
        }

        return true;
    }
}
View Full Code Here

Examples of mage.cards.Card.moveToZone()

    public boolean apply(Game game, Ability source) {
        Object object = getValue("attachedTo");
        if (object != null && object instanceof Permanent) {
            Card card = game.getCard(((Permanent)object).getId());
            if (card != null) {
                if (card.moveToZone(Zone.HAND, source.getSourceId(), game, false)) {
                    return true;
                }
            }
        }
        return false;
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.