mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- 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:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user