//20091005 - 103.2
if (startingPlayerId == null) {
TargetPlayer targetPlayer = new TargetPlayer();
targetPlayer.setRequired(true);
targetPlayer.setTargetName("starting player");
Player choosingPlayer = getPlayer(pickChoosingPlayer());
if (choosingPlayer.chooseTarget(Outcome.Benefit, targetPlayer, null, this)) {
startingPlayerId = ((List<UUID>)targetPlayer.getTargets()).get(0);
fireInformEvent(state.getPlayer(startingPlayerId).getName() + " will start");
}
else {
return;
}
}
saveState();
//20091005 - 103.3
for (UUID playerId: state.getPlayerList(startingPlayerId)) {
Player player = getPlayer(playerId);
player.setLife(this.getLife(), this);
player.drawCards(7, this);
}
//20091005 - 103.4
for (UUID playerId: state.getPlayerList(startingPlayerId)) {
Player player = getPlayer(playerId);
while (player.getHand().size() > 0 && player.chooseMulligan(this)) {
mulligan(player.getId());
}
fireInformEvent(player.getName() + " keeps hand");
saveState();
}
//20100716 - 103.5
for (UUID playerId: state.getPlayerList(startingPlayerId)) {
Player player = getPlayer(playerId);
for (Card card: player.getHand().getCards(this)) {
if (card.getAbilities().containsKey(LeylineAbility.getInstance().getId())) {
if (player.chooseUse(Outcome.PutCardInPlay, "Do you wish to put " + card.getName() + " on the battlefield?", this)) {
player.getHand().remove(card);
card.putOntoBattlefield(this, Zone.HAND, null, player.getId());
}
}
}
}
}