Fixed cards with endless loops if a player left game while he has to make a choice.

This commit is contained in:
LevelX2 2013-10-02 08:08:09 +02:00
parent 8007b16d64
commit 1dabfbb07b
14 changed files with 21 additions and 19 deletions

View file

@ -95,7 +95,7 @@ class AdaptiveAutomatonEffect extends OneShotEffect<AdaptiveAutomatonEffect> {
Choice typeChoice = new ChoiceImpl(true);
typeChoice.setMessage("Choose creature type");
typeChoice.setChoices(CardRepository.instance.getCreatureTypes());
while (!player.choose(Outcome.BoostCreature, typeChoice, game)) {
while (!player.choose(Outcome.BoostCreature, typeChoice, game) && player.isInGame()) {
game.debugMessage("player canceled choosing type. retrying.");
}
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice());