mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Adding a Minimum amount of Packs Field for Quest mode.
- Slight increase to Quest Packs available in the Spell Shop
This commit is contained in:
@@ -213,6 +213,9 @@ public class QuestPreferencesHandler extends SkinnedPanel {
|
|||||||
pnlShop.add(new FLabel.Builder().text("Maximum Packs").build(), constraints2);
|
pnlShop.add(new FLabel.Builder().text("Maximum Packs").build(), constraints2);
|
||||||
pnlShop.add(new PrefInput(QPref.SHOP_MAX_PACKS, ErrType.SHOP), constraints1);
|
pnlShop.add(new PrefInput(QPref.SHOP_MAX_PACKS, ErrType.SHOP), constraints1);
|
||||||
|
|
||||||
|
pnlShop.add(new FLabel.Builder().text("Minimum Packs").build(), constraints2);
|
||||||
|
pnlShop.add(new PrefInput(QPref.SHOP_MIN_PACKS, ErrType.SHOP), constraints1);
|
||||||
|
|
||||||
pnlShop.add(new FLabel.Builder().text("Starting Packs").build(), constraints2);
|
pnlShop.add(new FLabel.Builder().text("Starting Packs").build(), constraints2);
|
||||||
pnlShop.add(new PrefInput(QPref.SHOP_STARTING_PACKS, ErrType.SHOP), constraints1);
|
pnlShop.add(new PrefInput(QPref.SHOP_STARTING_PACKS, ErrType.SHOP), constraints1);
|
||||||
|
|
||||||
|
|||||||
@@ -351,6 +351,9 @@ public enum VSubmenuQuestPrefs implements IVSubmenu<CSubmenuQuestPrefs> {
|
|||||||
pnlShop.add(new FLabel.Builder().text("Maximum Packs").fontAlign(SwingConstants.RIGHT).build(), constraints2);
|
pnlShop.add(new FLabel.Builder().text("Maximum Packs").fontAlign(SwingConstants.RIGHT).build(), constraints2);
|
||||||
pnlShop.add(new PrefInput(QPref.SHOP_MAX_PACKS, QuestPreferencesErrType.SHOP), constraints1);
|
pnlShop.add(new PrefInput(QPref.SHOP_MAX_PACKS, QuestPreferencesErrType.SHOP), constraints1);
|
||||||
|
|
||||||
|
pnlShop.add(new FLabel.Builder().text("Minimum Packs").fontAlign(SwingConstants.RIGHT).build(), constraints2);
|
||||||
|
pnlShop.add(new PrefInput(QPref.SHOP_MIN_PACKS, QuestPreferencesErrType.SHOP), constraints1);
|
||||||
|
|
||||||
pnlShop.add(new FLabel.Builder().text("Starting Packs").fontAlign(SwingConstants.RIGHT).build(), constraints2);
|
pnlShop.add(new FLabel.Builder().text("Starting Packs").fontAlign(SwingConstants.RIGHT).build(), constraints2);
|
||||||
pnlShop.add(new PrefInput(QPref.SHOP_STARTING_PACKS, QuestPreferencesErrType.SHOP), constraints1);
|
pnlShop.add(new PrefInput(QPref.SHOP_STARTING_PACKS, QuestPreferencesErrType.SHOP), constraints1);
|
||||||
|
|
||||||
|
|||||||
@@ -665,11 +665,12 @@ public final class QuestUtilCards {
|
|||||||
final int startPacks = this.qpref.getPrefInt(QPref.SHOP_STARTING_PACKS);
|
final int startPacks = this.qpref.getPrefInt(QPref.SHOP_STARTING_PACKS);
|
||||||
final int winsForPack = this.qpref.getPrefInt(QPref.SHOP_WINS_FOR_ADDITIONAL_PACK);
|
final int winsForPack = this.qpref.getPrefInt(QPref.SHOP_WINS_FOR_ADDITIONAL_PACK);
|
||||||
final int maxPacks = this.qpref.getPrefInt(QPref.SHOP_MAX_PACKS);
|
final int maxPacks = this.qpref.getPrefInt(QPref.SHOP_MAX_PACKS);
|
||||||
|
final int minPacks = this.qpref.getPrefInt(QPref.SHOP_MIN_PACKS);
|
||||||
|
|
||||||
int level = this.qc.getAchievements().getLevel();
|
int level = this.qc.getAchievements().getLevel();
|
||||||
final int levelPacks = level > 0 ? startPacks / level : startPacks;
|
final int levelPacks = level > 0 ? startPacks / level : startPacks;
|
||||||
final int winPacks = this.qc.getAchievements().getWin() / winsForPack;
|
final int winPacks = this.qc.getAchievements().getWin() / winsForPack;
|
||||||
final int totalPacks = Math.min(levelPacks + winPacks, maxPacks);
|
final int totalPacks = Math.min(Math.max(levelPacks + winPacks, minPacks), maxPacks);
|
||||||
|
|
||||||
|
|
||||||
SealedProduct.Template tpl = getShopBoosterTemplate();
|
SealedProduct.Template tpl = getShopBoosterTemplate();
|
||||||
|
|||||||
@@ -135,7 +135,8 @@ public class QuestPreferences extends PreferencesStore<QuestPreferences.QPref> i
|
|||||||
WINS_UNLOCK_SET("20"),
|
WINS_UNLOCK_SET("20"),
|
||||||
|
|
||||||
// Maximum amount of "Packs" opened by the Shop and available as singles
|
// Maximum amount of "Packs" opened by the Shop and available as singles
|
||||||
SHOP_MAX_PACKS("6"),
|
SHOP_MAX_PACKS("7"),
|
||||||
|
SHOP_MIN_PACKS("3"),
|
||||||
|
|
||||||
// Rarity distribution of Singles in an Opened Shop Pack
|
// Rarity distribution of Singles in an Opened Shop Pack
|
||||||
SHOP_SINGLES_COMMON("7"),
|
SHOP_SINGLES_COMMON("7"),
|
||||||
@@ -145,7 +146,7 @@ public class QuestPreferences extends PreferencesStore<QuestPreferences.QPref> i
|
|||||||
// How many wins it takes to open an additional pack in the shop
|
// How many wins it takes to open an additional pack in the shop
|
||||||
SHOP_WINS_FOR_ADDITIONAL_PACK("10"),
|
SHOP_WINS_FOR_ADDITIONAL_PACK("10"),
|
||||||
// How many packs the shop start with.
|
// How many packs the shop start with.
|
||||||
SHOP_STARTING_PACKS("4");
|
SHOP_STARTING_PACKS("5");
|
||||||
|
|
||||||
private final String strDefaultVal;
|
private final String strDefaultVal;
|
||||||
|
|
||||||
@@ -313,7 +314,7 @@ public class QuestPreferences extends PreferencesStore<QuestPreferences.QPref> i
|
|||||||
return "Value too large (maximum 15).";
|
return "Value too large (maximum 15).";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SHOP_WINS_FOR_ADDITIONAL_PACK: case SHOP_MAX_PACKS:
|
case SHOP_WINS_FOR_ADDITIONAL_PACK: case SHOP_MAX_PACKS: case SHOP_MIN_PACKS:
|
||||||
if (val < 1) {
|
if (val < 1) {
|
||||||
return "Value too small (minimum 1).";
|
return "Value too small (minimum 1).";
|
||||||
} else if (val > 25) {
|
} else if (val > 25) {
|
||||||
|
|||||||
Reference in New Issue
Block a user