Makes the maximal amount of bonus for life total difference optional

This commit is contained in:
Seravy
2018-02-08 13:12:35 +01:00
parent 36917c0d18
commit a24cffa9df
3 changed files with 8 additions and 1 deletions

View File

@@ -253,6 +253,9 @@ public enum VSubmenuQuestPrefs implements IVSubmenu<CSubmenuQuestPrefs> {
pnlRewards.add(new FLabel.Builder().text("First Turn Win").fontAlign(SwingConstants.RIGHT).build(), labelConstraints);
pnlRewards.add(new PrefInput(QPref.REWARDS_TURN1, QuestPreferencesErrType.REWARDS), fieldConstraints);
pnlRewards.add(new FLabel.Builder().text("Max Life Diff. Bonus").fontAlign(SwingConstants.RIGHT).build(), labelConstraints);
pnlRewards.add(new PrefInput(QPref.REWARDS_HEALTH_DIFF, QuestPreferencesErrType.REWARDS), fieldConstraints);
}
private void populateDifficulty() {

View File

@@ -322,7 +322,7 @@ public class QuestWinLoseController {
}
if (game.getLifeDelta() >= 50) {
lifeDifferenceCredits += Math.max(Math.min((game.getLifeDelta() - 46) / 4, 750), 0);
lifeDifferenceCredits += Math.max(Math.min((game.getLifeDelta() - 46) / 4, FModel.getQuestPreferences().getPrefInt(QPref.REWARDS_HEALTH_DIFF)), 0);
}
} // End for(game)

View File

@@ -61,6 +61,9 @@ public class QuestPreferences extends PreferencesStore<QuestPreferences.QPref> i
REWARDS_MILLED("40"),
REWARDS_ALTERNATIVE("100"),
// Max Bonus for health difference
REWARDS_HEALTH_DIFF("750"),
// If you Mulligan to 0 to start a game
REWARDS_MULLIGAN0("500"),
@@ -316,6 +319,7 @@ public class QuestPreferences extends PreferencesStore<QuestPreferences.QPref> i
case REWARDS_ALTERNATIVE:
case REWARDS_TURN5:
case REWARDS_TURN1:
case REWARDS_HEALTH_DIFF:
case SHOP_MIN_PACKS:
case SHOP_STARTING_PACKS:
case SHOP_SINGLES_COMMON: