From c971aea67d4c9628ad6ca455dc529bcea0f3bbe6 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 18 Sep 2016 01:15:56 +0200 Subject: [PATCH] * Gonti, Lord of Luxury - Fixed a endless loop error. --- Mage.Sets/src/mage/sets/kaladesh/GontiLordOfLuxury.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/kaladesh/GontiLordOfLuxury.java b/Mage.Sets/src/mage/sets/kaladesh/GontiLordOfLuxury.java index 0d798520d7..173205a72f 100644 --- a/Mage.Sets/src/mage/sets/kaladesh/GontiLordOfLuxury.java +++ b/Mage.Sets/src/mage/sets/kaladesh/GontiLordOfLuxury.java @@ -146,9 +146,9 @@ class GontiLordOfLuxuryEffect extends OneShotEffect { effect.setTargetPointer(new FixedTarget(card.getId())); game.addEffect(effect, source); } - while (!topCards.isEmpty()) { + while (!topCards.isEmpty() && controller.isInGame()) { Card libCard = topCards.getRandom(game); - topCards.remove(card); + topCards.remove(libCard); controller.moveCardToLibraryWithInfo(libCard, source.getSourceId(), game, Zone.LIBRARY, false, false); } }