mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Added a Preference for Card Sale Percentage Base and Max
This commit is contained in:
@@ -382,6 +382,12 @@ public enum VSubmenuQuestPrefs implements IVSubmenu<CSubmenuQuestPrefs> {
|
|||||||
pnlShop.add(new FLabel.Builder().text("Rare Singles").fontAlign(SwingConstants.RIGHT).build(), labelConstraints);
|
pnlShop.add(new FLabel.Builder().text("Rare Singles").fontAlign(SwingConstants.RIGHT).build(), labelConstraints);
|
||||||
pnlShop.add(new PrefInput(QPref.SHOP_SINGLES_RARE, QuestPreferencesErrType.SHOP), fieldConstraints);
|
pnlShop.add(new PrefInput(QPref.SHOP_SINGLES_RARE, QuestPreferencesErrType.SHOP), fieldConstraints);
|
||||||
|
|
||||||
|
pnlShop.add(new FLabel.Builder().text("Card Sale Percentage Base").fontAlign(SwingConstants.RIGHT).build(), labelConstraints);
|
||||||
|
pnlShop.add(new PrefInput(QPref.SHOP_SELLING_PERCENTAGE_BASE, QuestPreferencesErrType.SHOP), fieldConstraints);
|
||||||
|
|
||||||
|
pnlShop.add(new FLabel.Builder().text("Card Sale Percentage Cap").fontAlign(SwingConstants.RIGHT).build(), labelConstraints);
|
||||||
|
pnlShop.add(new PrefInput(QPref.SHOP_SELLING_PERCENTAGE_MAX, QuestPreferencesErrType.SHOP), fieldConstraints);
|
||||||
|
|
||||||
pnlShop.add(new FLabel.Builder().text("Card Sale Price Cap").fontAlign(SwingConstants.RIGHT).build(), labelConstraints);
|
pnlShop.add(new FLabel.Builder().text("Card Sale Price Cap").fontAlign(SwingConstants.RIGHT).build(), labelConstraints);
|
||||||
pnlShop.add(new PrefInput(QPref.SHOP_MAX_SELLING_PRICE, QuestPreferencesErrType.SHOP), fieldConstraints);
|
pnlShop.add(new PrefInput(QPref.SHOP_MAX_SELLING_PRICE, QuestPreferencesErrType.SHOP), fieldConstraints);
|
||||||
|
|
||||||
|
|||||||
@@ -463,9 +463,13 @@ public final class QuestUtilCards {
|
|||||||
* @return the sell mutliplier
|
* @return the sell mutliplier
|
||||||
*/
|
*/
|
||||||
public double getSellMultiplier() {
|
public double getSellMultiplier() {
|
||||||
double multi = 0.20 + (0.001 * this.qc.getAchievements().getWin());
|
double baseMultiplier = Double.parseDouble(this.qpref.getPref(QPref.SHOP_SELLING_PERCENTAGE_BASE))/100.0;
|
||||||
if (multi > 0.6) {
|
double maxMultiplier = Double.parseDouble(this.qpref.getPref(QPref.SHOP_SELLING_PERCENTAGE_MAX))/100.0;
|
||||||
multi = 0.6;
|
|
||||||
|
|
||||||
|
double multi = baseMultiplier + (0.001 * this.qc.getAchievements().getWin());
|
||||||
|
if (maxMultiplier > 0 && multi > maxMultiplier) {
|
||||||
|
multi = maxMultiplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
final int lvlEstates = this.qc.getMode() == QuestMode.Fantasy ? this.qa.getItemLevel(QuestItemType.ESTATES) : 0;
|
final int lvlEstates = this.qc.getMode() == QuestMode.Fantasy ? this.qa.getItemLevel(QuestItemType.ESTATES) : 0;
|
||||||
|
|||||||
@@ -154,6 +154,10 @@ public class QuestPreferences extends PreferencesStore<QuestPreferences.QPref> i
|
|||||||
// How many packs the shop start with.
|
// How many packs the shop start with.
|
||||||
SHOP_STARTING_PACKS("5"),
|
SHOP_STARTING_PACKS("5"),
|
||||||
|
|
||||||
|
// Value * .20 + Wins
|
||||||
|
SHOP_SELLING_PERCENTAGE_BASE("20"),
|
||||||
|
SHOP_SELLING_PERCENTAGE_MAX("60"),
|
||||||
|
|
||||||
// Maximum selling price in a spell shop
|
// Maximum selling price in a spell shop
|
||||||
SHOP_MAX_SELLING_PRICE("1000"),
|
SHOP_MAX_SELLING_PRICE("1000"),
|
||||||
// Wins until the selling price limit is removed
|
// Wins until the selling price limit is removed
|
||||||
@@ -277,6 +281,8 @@ public class QuestPreferences extends PreferencesStore<QuestPreferences.QPref> i
|
|||||||
|
|
||||||
case SHOP_MAX_PACKS:
|
case SHOP_MAX_PACKS:
|
||||||
case SHOP_MAX_SELLING_PRICE:
|
case SHOP_MAX_SELLING_PRICE:
|
||||||
|
case SHOP_SELLING_PERCENTAGE_BASE:
|
||||||
|
case SHOP_SELLING_PERCENTAGE_MAX:
|
||||||
case SHOP_WINS_FOR_ADDITIONAL_PACK:
|
case SHOP_WINS_FOR_ADDITIONAL_PACK:
|
||||||
case PLAYSET_SIZE:
|
case PLAYSET_SIZE:
|
||||||
case PLAYSET_ANY_NUMBER_SIZE:
|
case PLAYSET_ANY_NUMBER_SIZE:
|
||||||
|
|||||||
Reference in New Issue
Block a user