Rework Mystery Booster and adjust some set classifications (#12138)

Mystery Booster rework:
* added images download support from scryfall (closes #11806);
* added virtual sets support (remix);
* fixed Commander set name (closes #12110);
This commit is contained in:
xenohedron 2024-04-23 01:28:40 -04:00 committed by GitHub
parent 9f52c8946e
commit 9566e23d0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 1939 additions and 3684 deletions

View file

@ -675,4 +675,13 @@ public abstract class ExpansionSet implements Serializable {
return numBoosterDoubleFaced;
}
protected static void addCardInfoToList(List<CardInfo> boosterList, String name, String expansion, String cardNumber) {
CardInfo cardInfo = CardRepository.instance.findCardWithPreferredSetAndNumber(name, expansion, cardNumber);
if (cardInfo != null && cardInfo.getSetCode().equals(expansion) && cardInfo.getCardNumber().equals(cardNumber)) {
boosterList.add(cardInfo);
} else {
throw new IllegalStateException("CardInfo not found: " + name + " (" + expansion + ":" + cardNumber + ")");
}
}
}