mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
The enforced format, if any, now also determines whether your quest starting cardpool contains snow-lands or not.
This commit is contained in:
@@ -165,10 +165,14 @@ public class QuestAssets {
|
||||
/**
|
||||
* Instantiates a new quest assets.
|
||||
*/
|
||||
public QuestAssets() {
|
||||
public QuestAssets(GameFormatQuest useFormat) {
|
||||
final QuestPreferences prefs = Singletons.getModel().getQuestPreferences();
|
||||
int snowLands = prefs.getPreferenceInt(QPref.STARTING_SNOW_LANDS);
|
||||
if (useFormat != null && !useFormat.hasSnowLands()) {
|
||||
snowLands = 0;
|
||||
}
|
||||
final ItemPoolView<CardPrinted> lands = QuestUtilCards.generateBasicLands(
|
||||
prefs.getPreferenceInt(QPref.STARTING_BASIC_LANDS), prefs.getPreferenceInt(QPref.STARTING_SNOW_LANDS));
|
||||
prefs.getPreferenceInt(QPref.STARTING_BASIC_LANDS), snowLands);
|
||||
this.getCardPool().addAll(lands);
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public final class QuestData {
|
||||
}
|
||||
this.mode = mode2;
|
||||
this.achievements = new QuestAchievements(diff);
|
||||
this.assets = new QuestAssets();
|
||||
this.assets = new QuestAssets(format);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -185,7 +185,7 @@ public class QuestDataIO {
|
||||
final int saveVersion = newData.getVersionNumber();
|
||||
|
||||
if (saveVersion < 3) {
|
||||
QuestDataIO.setFinalField(QuestData.class, "assets", newData, new QuestAssets());
|
||||
QuestDataIO.setFinalField(QuestData.class, "assets", newData, new QuestAssets(null));
|
||||
|
||||
final int diffIdx = Integer.parseInt(document.getElementsByTagName("diffIndex").item(0).getTextContent());
|
||||
QuestDataIO.setFinalField(QuestData.class, "achievements", newData, new QuestAchievements(diffIdx));
|
||||
|
||||
Reference in New Issue
Block a user