Fix Div by zero error

This commit is contained in:
Eradev
2025-10-04 03:56:40 -04:00
parent a2b324c9ce
commit 091c61829b

View File

@@ -792,6 +792,11 @@ public final class QuestUtilCards {
Predicate<PaperCard> filter = PaperCardPredicates.printedInSet(edition);
Iterable<PaperCard> editionCards = IterableUtil.filter(FModel.getMagicDb().getCommonCards().getAllCards(), filter);
// For editions such as MB1 which only contains PLST cards.
if (!editionCards.iterator().hasNext()) {
return 0;
}
ItemPool<PaperCard> ownedCards = questAssets.getCardPool();
// 100% means at least one of every basic land and at least 4 of every other card in the set
int completeCards = 0;