Package mage.players

Examples of mage.players.Player.moveCardToHandWithInfo()


                Card card = player.getLibrary().removeFromTop(game);
                if (card != null) {
                    player.moveCardToGraveyardWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                }
            }
            player.moveCardToHandWithInfo(sourceCard, source.getSourceId(), game, Zone.GRAVEYARD);
            return true;
        }
        return false;
    }
View Full Code Here


                for (UUID targetId: targets.get(0).getTargets()) {
                    Permanent permanent = game.getPermanent(targetId);
                    if (permanent == null) {
                        return false;
                    }
                    paid |= controller.moveCardToHandWithInfo(permanent, sourceId, game, Zone.HAND);
                }
            }
        }
        return paid;
    }
View Full Code Here

                    MageObject mageObject = game.getObject(stackObject.getSourceId());
                    if (mageObject instanceof Card) {
                        Card card = (Card) mageObject;
                        switch (targetZone) {
                            case HAND:
                                controller.moveCardToHandWithInfo(card, sourceId, game, Zone.STACK);
                                break;
                            case LIBRARY:
                                controller.moveCardToLibraryWithInfo(card, sourceId, game, Zone.STACK, flag, true);
                                break;
                            case EXILED:
View Full Code Here

    @Override
    public void postResolve(Card card, Ability source, UUID controllerId, Game game) {
        Player controller = game.getPlayer(controllerId);
        if (controller != null) {
            controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.STACK);
        }
    }
}
View Full Code Here

            Card card = defender.getLibrary().getFromTop(game);
            if (card != null) {
                cards.add(card);
                defender.revealCards("Goblin Guide", cards, game);
                if (card.getCardType().contains(CardType.LAND)) {
                    defender.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                }
            }
            return true;
        }
        return false;
View Full Code Here

            if (card != null) {
                switch (game.getState().getZone(card.getId())) {
                    case BATTLEFIELD:
                        Permanent permanent = game.getPermanent(source.getSourceId());
                        if (permanent != null) {
                            return controller.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
                        }
                        break;
                    case GRAVEYARD:
                        if (!fromBattlefieldOnly) {
                            return controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD);
View Full Code Here

                            return controller.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
                        }
                        break;
                    case GRAVEYARD:
                        if (!fromBattlefieldOnly) {
                            return controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD);
                        }

                }
            }           
        }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
                controller.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
            }
            return true;
        }
        return false;
View Full Code Here

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

                    }
                    break;
                case GRAVEYARD:
                    Card card = game.getCard(targetId);
                    if (card != null) {
                        controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD);
                    else {
                        result = false;
                    }
                    break;
                case EXILED:
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.