- Prevent a crash in Planar Conquest when awarding 3 boosters for Chaos Round from a smaller card pool (e.g. Antiquities) which can exhaust possible rewards.

This commit is contained in:
Agetian
2017-02-03 09:21:30 +00:00
parent 189b69316a
commit d05dffc1e8

View File

@@ -63,6 +63,8 @@ public class ConquestAwardPool {
} }
public void rewardCard(List<PaperCard> rewards) { public void rewardCard(List<PaperCard> rewards) {
if (isEmpty()) { return; }
int index = Aggregates.randomInt(0, cards.size() - 1); int index = Aggregates.randomInt(0, cards.size() - 1);
PaperCard c = cards.get(index); PaperCard c = cards.get(index);
cards.remove(index); cards.remove(index);