Examples of drawCards()


Examples of mage.players.Player.drawCards()

    @Override
    public boolean replaceEvent(GameEvent event, Ability source, Game game) {
        Player you = game.getPlayer(event.getPlayerId());
        if (you != null) {
            you.drawCards(2, game, event.getAppliedEffects());
        }
        return true;
    }

    @Override
View Full Code Here

Examples of mage.players.Player.drawCards()

        Card sourceCard = game.getCard(source.getSourceId());
        if (controller != null && sourceCard != null) {
            Card card = controller.getLibrary().getFromTop(game);
            if (card != null) {
                controller.revealCards(sourceCard.getName(), new CardsImpl(card), game);
                controller.drawCards(card.getManaCost().convertedManaCost(), game);
            }
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.drawCards()

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

Examples of mage.players.Player.drawCards()

                player.getLibrary().addAll(player.getHand().getCards(game), game);
                player.getLibrary().addAll(player.getGraveyard().getCards(game), game);
                player.shuffleLibrary(game);
                player.getHand().clear();
                player.getGraveyard().clear();
                player.drawCards(7, game);
            }
        }
        return true;
    }
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) {
            player.drawCards(3, game);
            putOnLibrary(player, source, game);
            putOnLibrary(player, source, game);
            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 && player.chooseUse(Outcome.DrawCard, "Do you wish to draw a card? If you do, discard a card.", game)) {
            if (player.drawCards(1, game) > 0) {
                player.discard(1, source, game);
            }
            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) {
            player.drawCards(1, game);
            TargetDiscard target = new TargetDiscard(player.getId());
            player.choose(Outcome.Discard, target, source.getSourceId(), game);
            Card card = player.getHand().get(target.getFirstTarget(), game);
            if (card != null) {
                player.discard(card, source, game);
View Full Code Here

Examples of mage.players.Player.drawCards()

                    toughness = ((SacrificeTargetCost) cost).getPermanents().get(0).getToughness().getValue();
                    break;
                }
            }
            if (power > 0) {
                controller.drawCards(power, game);
            }
            if (toughness > 0) {
                controller.gainLife(toughness, game);
            }
            return true;
View Full Code Here

Examples of mage.players.Player.drawCards()

    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        Permanent thoughtGorgerLastState = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
        int numberCounters = thoughtGorgerLastState.getCounters().getCount(CounterType.P1P1);
        if (player != null) {
            player.drawCards(numberCounters, game);
            return true;
        }
        return false;
    }
}
View Full Code Here

Examples of mage.players.Player.drawCards()

            int amount = permanent.getCounters().getCount(CounterType.CHARGE);
            if (amount > 0) {
                for (UUID playerId : sourcePlayer.getInRange()) {
                    Player player = game.getPlayer(playerId);
                    if (player != null) {
                        player.drawCards(amount, game);
                    }
                }
            }
        }
        return true;
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.