This commit is contained in:
Anthony Calosa
2023-04-26 14:02:03 +08:00
committed by GitHub
parent 94bef3cf1c
commit ee0f99e0ad

View File

@@ -1,6 +1,7 @@
package forge.deck;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import com.google.common.base.Predicate;
@@ -27,11 +28,14 @@ public class CommanderDeckGenerator extends DeckProxy implements Comparable<Comm
if (isCardGen){
uniqueCards = new ItemPool<>(PaperCard.class);
String matrixKey = (format.equals(DeckFormat.TinyLeaders) ? DeckFormat.Commander : format).toString(); //use Commander for Tiny Leaders
Iterable<String> legendNames = CardRelationMatrixGenerator.cardPools.get(matrixKey).keySet();
HashMap matrixPool = CardRelationMatrixGenerator.cardPools.get(matrixKey);
if (matrixPool != null) {
Iterable<String> legendNames = matrixPool.keySet();
for (String legendName : legendNames) {
uniqueCards.add(FModel.getMagicDb().getCommonCards().getUniqueByName(legendName));
}
}
}
else {
uniqueCards = ItemPool.createFrom(FModel.getMagicDb().getCommonCards().getUniqueCards(), PaperCard.class);
}