mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
It was giving too many mythics at quest game start
This commit is contained in:
@@ -152,7 +152,7 @@ public class BoosterGenerator {
|
||||
return getBoosterPack(numCommons, numUncommons, numRareSlots, 0, 0, numSpecials, 0, 0);
|
||||
}
|
||||
/**
|
||||
* So many parameters needed for custom limited cardpools,
|
||||
* So many parameters are needed for custom limited cardpools,
|
||||
*/
|
||||
public final List<CardPrinted> getBoosterPack(final int nCom, final int nUnc, final int nRareSlots,
|
||||
final int nRares, final int nMythics, final int nSpecs, final int nAnyCard, final int nLands) {
|
||||
|
||||
@@ -50,8 +50,22 @@ public final class BoosterUtils {
|
||||
Predicate.and(filter, CardPrinted.Predicates.Presets.isCommon), numCommon, colorFilters));
|
||||
cards.addAll(generateDefinetlyColouredCards(cardpool,
|
||||
Predicate.and(filter, CardPrinted.Predicates.Presets.isUncommon), numUncommon, colorFilters));
|
||||
|
||||
int nRares = numRare, nMythics = 0;
|
||||
Predicate<CardPrinted> filterMythics = Predicate.and(filter, CardPrinted.Predicates.Presets.isMythicRare);
|
||||
boolean haveMythics = filterMythics.any(cardpool);
|
||||
for(int iSlot = 0; haveMythics && iSlot < numRare; iSlot++) {
|
||||
if (MyRandom.random.nextInt(7) < 1) { // a bit higher chance to get a mythic
|
||||
nRares--;
|
||||
nMythics++;
|
||||
}
|
||||
}
|
||||
|
||||
cards.addAll(generateDefinetlyColouredCards(cardpool,
|
||||
Predicate.and(filter, CardPrinted.Predicates.Presets.isRareOrMythic), numRare, colorFilters));
|
||||
Predicate.and(filter, CardPrinted.Predicates.Presets.isRare), nRares, colorFilters));
|
||||
if (nMythics > 0) {
|
||||
cards.addAll(generateDefinetlyColouredCards(cardpool, filterMythics, nMythics, colorFilters));
|
||||
}
|
||||
return cards;
|
||||
}
|
||||
|
||||
|
||||
@@ -144,12 +144,12 @@ public final class DeckEditorShop extends DeckEditorBase {
|
||||
columns.get(2).setCellRenderer(new ManaCostRenderer());
|
||||
|
||||
List<TableColumnInfo<InventoryItem>> columnsBelow = new ArrayList<TableColumnInfo<InventoryItem>>(columns);
|
||||
columns.add(new TableColumnInfo<InventoryItem>("Price", 40, fnPriceCompare, fnPriceGet));
|
||||
columns.add(new TableColumnInfo<InventoryItem>("Price", 36, fnPriceCompare, fnPriceGet));
|
||||
top.setup(columns, cardView);
|
||||
|
||||
columnsBelow.add(new TableColumnInfo<InventoryItem>("Dks", 30, fnDeckCompare, fnDeckGet));
|
||||
columnsBelow.add(new TableColumnInfo<InventoryItem>("New", 35, questData.getCards().fnNewCompare, questData.getCards().fnNewGet));
|
||||
columnsBelow.add(new TableColumnInfo<InventoryItem>("Price", 35, fnPriceCompare, fnPriceSellGet));
|
||||
columnsBelow.add(new TableColumnInfo<InventoryItem>("Price", 36, fnPriceCompare, fnPriceSellGet));
|
||||
bottom.setup(columnsBelow, cardView);
|
||||
|
||||
this.setSize(1024, 768);
|
||||
|
||||
Reference in New Issue
Block a user