* Gonti, Lord of Luxury - Fixed a endless loop error.

This commit is contained in:
LevelX2 2016-09-18 01:15:56 +02:00
parent 844b36c7dc
commit c971aea67d

View file

@ -146,9 +146,9 @@ class GontiLordOfLuxuryEffect extends OneShotEffect {
effect.setTargetPointer(new FixedTarget(card.getId())); effect.setTargetPointer(new FixedTarget(card.getId()));
game.addEffect(effect, source); game.addEffect(effect, source);
} }
while (!topCards.isEmpty()) { while (!topCards.isEmpty() && controller.isInGame()) {
Card libCard = topCards.getRandom(game); Card libCard = topCards.getRandom(game);
topCards.remove(card); topCards.remove(libCard);
controller.moveCardToLibraryWithInfo(libCard, source.getSourceId(), game, Zone.LIBRARY, false, false); controller.moveCardToLibraryWithInfo(libCard, source.getSourceId(), game, Zone.LIBRARY, false, false);
} }
} }