Package mage.players

Examples of mage.players.Player.drawCards()


            for(Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)){
                permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
            }
            player.shuffleLibrary(game);
           
            player.drawCards(7, game);
           
            player.setLife(20, game);
        }
        return true;
    }
View Full Code Here


    @Override
    public boolean apply(Game game, Ability source) {
        Player you = game.getPlayer(source.getControllerId());
        Permanent dragon = game.getPermanent(source.getSourceId());
        you.drawCards(1, game);
        TargetDiscard target = new TargetDiscard(you.getId());
        you.choose(Outcome.Discard, target, source.getSourceId(), game);
        Card card = you.getHand().get(target.getFirstTarget(), game);
        if (card != null && you.discard(card, source, game)) {
            int cmc = card.getManaCost().convertedManaCost();
View Full Code Here

        //Draw 7 cards
        for (UUID playerId: game.getPlayer(source.getControllerId()).getInRange()) {
            Player player = game.getPlayer(playerId);
            if (player != null)
            {
                player.drawCards(7, game);
            }
        }
        //Delayed ability
        Effect effect = new MemoryJarDelayedEffect();
        effect.setValue("MemoryJarCards", cards);
View Full Code Here

                        controller.removeFromHand(card, game);
                        card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
                    }
                }
                controller.shuffleLibrary(game);
                controller.drawCards(cardsHand, game);
            }
            return true;
        }

        return false;
View Full Code Here

                                card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
                            }
                        }
                        game.informPlayers(player.getName() + " shuffles the cards from his or her hand into his or her library");
                        player.shuffleLibrary(game);
                        player.drawCards(cardsHand, game);
                    }
                }
            }
            return true;
        }
View Full Code Here

                    if (card != null) {
                        controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, true, false);
                    }
                }
                controller.shuffleLibrary(game);
                controller.drawCards(cardsHand, game);
            }
            return true;           
        }

        return false;
View Full Code Here

        Permanent permanent = (Permanent) game.getLastKnownInformation(this.getTargetPointer().getFirst(game, source), Zone.BATTLEFIELD);
        if (permanent != null) {
            Player controller = game.getPlayer(permanent.getControllerId());
            if (controller != null) {
                if (controller.chooseUse(outcome, "Draw a card?", game)) {
                    controller.drawCards(1, game);
                }
                return true;
            }
        }
        return false;
View Full Code Here

            if (player.flipCoin(game)) {
                Permanent perm = game.getPermanent(source.getSourceId());
                if (perm != null) {
                    perm.sacrifice(source.getSourceId(), game);
                }
                player.drawCards(3, game);
                return true;
            }
        }
        return false;
    }
View Full Code Here

            }
        }
        for (UUID playerId : sourcePlayer.getInRange()) {
            Player player = game.getPlayer(playerId);
            if (player != null) {
                player.drawCards(maxDiscarded, game);
            }
        }
        return true;
    }
View Full Code Here

    public boolean apply(Game game, Ability source) {
        UUID defenderId = game.getCombat().getDefenderId(source.getSourceId());
        Player defender = game.getPlayer(defenderId);
        if (defender != null) {
            if (defender.chooseUse(outcome, "Draw a card?", game)) {
                defender.drawCards(1, game);
            }
        }
        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.