mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
adjusted default booster template,
fixed some crashes in quest mode shop content generation
This commit is contained in:
@@ -73,6 +73,8 @@ public class BoosterGenerator {
|
||||
public static final List<CardPrinted> getBoosterPack(SealedProductTemplate booster, Iterable<CardPrinted> sourcePool) {
|
||||
if(sourcePool == CardDb.instance().getAllCards())
|
||||
throw new IllegalArgumentException("Do not use this overload to obtain boosters based on complete cardDb");
|
||||
if(null == sourcePool)
|
||||
return getBoosterPack(booster);
|
||||
|
||||
List<CardPrinted> result = new ArrayList<CardPrinted>();
|
||||
for(Pair<String, Integer> slot : booster.getSlots()) {
|
||||
|
||||
@@ -16,7 +16,7 @@ public class BoosterTemplate extends SealedProductTemplate {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public final static BoosterTemplate genericBooster = new BoosterTemplate(null, 1, Lists.newArrayList(
|
||||
Pair.of("Common", 10), Pair.of("Uncommon", 3), Pair.of("Rare", 1), Pair.of("BasicLand", 1)
|
||||
Pair.of("Common", 10), Pair.of("Uncommon", 3), Pair.of("RareMythic", 1), Pair.of("BasicLand", 1)
|
||||
));
|
||||
|
||||
private final int foilRate = 68;
|
||||
|
||||
@@ -518,11 +518,8 @@ public final class QuestUtilCards {
|
||||
*/
|
||||
private void generateCardsInShop() {
|
||||
Iterable<CardPrinted> cardList = null;
|
||||
if (qc.getFormat() == null) {
|
||||
cardList = CardDb.instance().getAllCards(); }
|
||||
else {
|
||||
cardList = Iterables.filter(CardDb.instance().getAllCards(),
|
||||
qc.getFormat().getFilterPrinted());
|
||||
if (qc.getFormat() != null) {
|
||||
cardList = Iterables.filter(CardDb.instance().getAllCards(), qc.getFormat().getFilterPrinted());
|
||||
}
|
||||
|
||||
int nLevel = this.qc.getAchievements().getLevel();
|
||||
@@ -541,7 +538,7 @@ public final class QuestUtilCards {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
SealedProductTemplate template = new SealedProductTemplate(Lists.newArrayList(
|
||||
Pair.of("Commmon", common), Pair.of("uncommmon", uncommon), Pair.of("Rare", rare)
|
||||
Pair.of("Commmon", common), Pair.of("uncommmon", uncommon), Pair.of("RareMythic", rare)
|
||||
));
|
||||
|
||||
for (int i = 0; i < totalPacks; i++) {
|
||||
|
||||
Reference in New Issue
Block a user