Examples of drawCards()


Examples of mage.players.Player.drawCards()

            if (returnToHand) {
                card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
            }
            else {
                card.moveToZone(Zone.GRAVEYARD, source.getSourceId(), game, false);
                controller.drawCards(3, game);
            }
        }

    }
}
View Full Code Here

Examples of mage.players.Player.drawCards()

        Player player = game.getPlayer(source.getControllerId());
        if (player == null) {
            return false;
        }

        player.drawCards(3, game);
        if (player.getHand().size() > 0) {
            FilterCard filter = new FilterCard("card from your hand to put on the bottom of your library");
            TargetCard target = new TargetCard(Zone.HAND, filter);

            if (player.choose(Outcome.Detriment, player.getHand(), target, game)) {
View Full Code Here

Examples of mage.players.Player.drawCards()

            int numberCounters = creature.getCounters().getCount(CounterType.P1P1);
            if (numberCounters > 0) {
                creature.removeCounters(CounterType.P1P1.getName(), numberCounters, game);
                Player controller = game.getPlayer(source.getControllerId());
                if (controller != null) {
                    controller.drawCards(numberCounters, game);
                } else {
                    throw new UnsupportedOperationException("Controller missing");
                }
            }
            return true;
View Full Code Here

Examples of mage.players.Player.drawCards()

        }

        if (permanent != null) {
            Player controller = game.getPlayer(permanent.getControllerId());
            if (controller != null) {
                controller.drawCards(1, game);
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.drawCards()

    @Override
    public boolean apply(Game game, Ability source) {
        Player you = game.getPlayer(source.getControllerId());
        if (you != null) {
            you.discard(1, source, game);
            if (you.drawCards(1, game) > 0) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.drawCards()

            }
            if (drawCards) {
                UUID targetPlayer = getTargetPointer().getFirst(game, source);
                if (targetPlayer != null) {
                    Player player = game.getPlayer(targetPlayer);
                    player.drawCards(3, game);
                }
            }
            return drawCards;
        }
        return false;
View Full Code Here

Examples of mage.players.Player.drawCards()

                power = ((SacrificeTargetCost)cost).getPermanents().get(0).getPower().getValue();
                break;
            }
        }
        if (power > 0) {
            controller.drawCards(power, game);
        }
        return true;
    }

    @Override
View Full Code Here

Examples of mage.players.Player.drawCards()

                }
                if (permanent.getColor().isWhite()) {
                    colors.add(ObjectColor.WHITE);
                }
            }
            controller.drawCards(colors.size(), game);
            return true;
        }
        return false;
    }
}
View Full Code Here

Examples of mage.players.Player.drawCards()

                    cards.add(game.getCard(cardId));
                }
                for (Card card: cards.getCards(game)) {
                    card.moveToExile(null, null, source.getSourceId(), game);
                }
                controller.drawCards(cardsHand, game);
            }
            game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(controller.getName()).append(" exiles hand and draws ").append(cardsHand).append(" card(s)").toString());
            return true;
        }
        return false;
View Full Code Here

Examples of mage.players.Player.drawCards()

   
    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            int drawnCards = player.drawCards(source.getManaCostsToPay().getX(), game);
            Target target = new TargetControlledPermanent(0, drawnCards, new FilterPermanent(), true);
            target.choose(Outcome.Sacrifice, player.getId(), source.getSourceId(), game);
            int sacrificedPermanents = 0;
            for (UUID permanentId : target.getTargets()) {
                Permanent permanent = game.getPermanent(permanentId);
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.