mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Added quest preference for number of wins per set unlock.
This commit is contained in:
@@ -38,6 +38,7 @@ import forge.quest.data.QuestAchievements;
|
||||
import forge.quest.data.QuestAssets;
|
||||
import forge.quest.data.QuestData;
|
||||
import forge.quest.data.QuestPreferences.DifficultyPrefs;
|
||||
import forge.quest.data.QuestPreferences.QPref;
|
||||
import forge.quest.io.QuestChallengeReader;
|
||||
import forge.util.storage.IStorage;
|
||||
import forge.util.storage.StorageBase;
|
||||
@@ -436,7 +437,7 @@ public class QuestController {
|
||||
final int wins = this.model.getAchievements().getWin();
|
||||
|
||||
int cntLocked = this.questFormat.getLockedSets().size();
|
||||
int unlocksAvaliable = wins / 20;
|
||||
int unlocksAvaliable = wins / FModel.getQuestPreferences().getPrefInt(QPref.WINS_UNLOCK_SET);
|
||||
int unlocksSpent = this.questFormat.getUnlocksUsed();
|
||||
|
||||
return unlocksAvaliable > unlocksSpent ? Math.min(unlocksAvaliable - unlocksSpent, cntLocked) : 0;
|
||||
|
||||
@@ -127,6 +127,8 @@ public class QuestPreferences extends PreferencesStore<QuestPreferences.QPref> i
|
||||
WINS_EXPERTAI_MEDIUM("36"),
|
||||
WINS_EXPERTAI_HARD("32"),
|
||||
WINS_EXPERTAI_EXPERT("28"),
|
||||
|
||||
WINS_UNLOCK_SET("20"),
|
||||
|
||||
// Maximum amount of "Packs" opened by the Shop and available as singles
|
||||
SHOP_MAX_PACKS("6"),
|
||||
|
||||
Reference in New Issue
Block a user