Package mage.players

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


        if (targetId != null
                && game.getStack().counter(targetId, source.getSourceId(), game)) {
            countered = true;
        }
        if (controller != null) {
            controller.drawCards(1, game);
        }
        return countered;
    }
}
View Full Code Here

        if (sacrificed != null && player != null) {
            sacrificed.sacrifice(source.getSourceId(), game);
            Permanent lastKnownState = (Permanent) game.getLastKnownInformation(sacrificed.getId(), Zone.BATTLEFIELD);
            int power = lastKnownState.getPower().getValue();
            player.gainLife(power, game);
            player.drawCards(power, game);
            return true;
        }
        return false;
    }
}
View Full Code Here

                Player player = game.getPlayer(playerId);
                if (player != null) {
                    int cards = player.getHand().size();
                    if (cards > 0) {
                        player.discard(cards, source, game);
                        player.drawCards(cards, game);
                    }
                }
            }
            return true;
        }
View Full Code Here

   
    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getFirstTarget());
        int handCount = player.getHand().count(new FilterCard(), game);
        player.drawCards(handCount, game);
        player.discard(handCount, source, game);
        return false;
    }
}
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Player attacker = game.getPlayer(this.getTargetPointer().getFirst(game, source));
        if (attacker != null) {
            if (attacker.getHand().size() > 0 && attacker.chooseUse(outcome, "Discard a card and draw a card?", game)){
                attacker.discard(1, source, game);
                attacker.drawCards(1, game);
            }
            return true;
        }
        return false;
    }
View Full Code Here

        if (controller != null) {
            for(UUID playerId: controller.getInRange()) {
                if (!playerId.equals(controller.getId())) {
                    Player player = game.getPlayer(playerId);
                    if (player != null) {
                        player.drawCards(1, game);
                    }
                }
            }
        }
       return false;
View Full Code Here

                card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
            }
            player.getHand().clear();

            // draws that many cards
            player.drawCards(count, game);
        }
        return true;
    }

    @Override
View Full Code Here

                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);
                player.setLife(7, game);
            }
        }
        return true;
    }
View Full Code Here

            for (Permanent p : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), source.getControllerId(), game)) {
                if (p.getPower().getValue() > amount) {
                    amount = p.getPower().getValue();
                }
            }
            player.drawCards(amount, game);
            return true;
        }
        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.