Examples of moveCardToHandWithInfo()


Examples of mage.players.Player.moveCardToHandWithInfo()

            return false;
        }
        while (controller.chooseUse(outcome, message, game) && controller.getLibrary().size() > 0) {
            Card card = controller.getLibrary().removeFromTop(game);
            if (card != null) {
                controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                int cmc = card.getManaCost().convertedManaCost();
                if (cmc > 0) {
                    controller.loseLife(cmc, game);
                }
                controller.revealCards(new StringBuilder(sourceCard.getName()).append(" put into hand").toString(), new CardsImpl(card), game);
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
            if (permanent != null) {
                return controller.moveCardToHandWithInfo(permanent, source.getSourceId(), game, Zone.BATTLEFIELD);
            }

            /**
             * 01.05.2007   If a spell is returned to its owner's hand, it's removed from
             * the stack and thus will not resolve. The spell isn't countered; it just no longer exists.
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

                if (!spell.isCopy()) {
                    card = spell.getCard();
                }
                game.getStack().remove(spell);
                if (card != null) {
                    controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.STACK);
                }
                return true;
            }

        }
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

            boolean topOfLibrary = false;
            if (ClashEffect.getInstance().apply(game, source)) {
                topOfLibrary = controller.chooseUse(outcome, "Put " + creature.getLogName() + " to top of libraray instead?" , game);
            }
            if (topOfLibrary) {
                controller.moveCardToHandWithInfo(creature, source.getSourceId(), game, Zone.BATTLEFIELD);
            } else {
                controller.moveCardToLibraryWithInfo(creature, source.getSourceId(), game, Zone.BATTLEFIELD, true, true);
            }
            return true;
        }
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

    public boolean apply(Game game, Ability source) {
        Permanent target = game.getPermanent(source.getFirstTarget());
        if (target != null) {
            Player controller = game.getPlayer(target.getControllerId());
            if (controller != null) {
                controller.moveCardToHandWithInfo(target, source.getSourceId(), game, Zone.BATTLEFIELD);
                controller.discard(1, source, game);
                return true;
            }
        }
        return false;
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

        if (controller != null) {
            ExileZone exZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source));
            if (exZone != null) {
                for (Card card : exZone.getCards(game)) {
                    if (card != null) {
                        controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.EXILED);
                    }
                }
                return true;
            }           
        }
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

        if (target.canChoose(source.getSourceId(), source.getControllerId(), game) && player.choose(Outcome.ReturnToHand, target, source.getSourceId(), game)) {
            Card card = game.getCard(target.getFirstTarget());
            if (card == null) {
                return false;
            }
            return player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.GRAVEYARD);
        }
        return true;
    }
}
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

            if (!cardsToReveal.isEmpty() && sourceCard != null) {
                player.revealCards(sourceCard.getName(), cardsToReveal, game);
            }

            for (Card card: cardsElf.getCards(game)) {
                player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
            }

            TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put on the bottom of your library"));
            while (player.isInGame() && cards2.size() > 0 && player.choose(Outcome.Detriment, cards2, target, game)) {
                Card card = cards2.get(target.getFirstTarget(), game);
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

                        player.putOntoBattlefieldWithInfo(card, game, Zone.LIBRARY, source.getSourceId(), true);
                        revealed.remove(card);
                    }
                    card = revealed.getCards(game).iterator().next();
                    if (card != null) {
                        player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                    }
                }
                else if (target.getTargets().size() == 1) {
                    Card card = revealed.getCards(game).iterator().next();
                    if (card != null) {
View Full Code Here

Examples of mage.players.Player.moveCardToHandWithInfo()

                Card card = player.getLibrary().removeFromTop(game);
                if (card != null) {
                    cards.add(card);
                    // Put that card into your hand
                    if (card.getName().equals(name)) {
                        player.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
                        break;
                    }
                    // and exile all other cards revealed this way.
                    else {
                        player.moveCardToExileWithInfo(card, null, "", 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.