Fixing sealed/draft formats choking on ownership of cards that were reprinted, as in The Ruling Ring and Hobbit Sword.

This commit is contained in:
Christian 'ketura' McCarty
2023-05-13 11:48:34 -05:00
parent e3ea1e657f
commit 68543efeb7

View File

@@ -715,10 +715,17 @@ public class HallServer extends AbstractServer {
int collectionCount = collection.getItemCount(cardCount.getKey()) +
collection.getItemCount(format.applyErrata(cardCount.getKey()));
for(String id : format.findBaseCards(cardCount.getKey())) {
collectionCount += collection.getItemCount(id);
var alts = _library.getAllAlternates(cardCount.getKey());
if(alts != null) {
for (String id : alts) {
collectionCount += collection.getItemCount(id);
}
}
// for(String id : format.findBaseCards(cardCount.getKey())) {
// collectionCount += collection.getItemCount(id);
// }
if (collectionCount < cardCount.getValue()) {
String cardName = null;
try {