From 4bf52f127d9718c214e972228505e1cf34d8fa99 Mon Sep 17 00:00:00 2001 From: Melledy <121644117+Melledy@users.noreply.github.com> Date: Tue, 6 Oct 2026 15:14:18 -0700 Subject: [PATCH] Fix main story chapter 9 --- README.md | 4 ++-- .../emu/nebula/game/story/StoryManager.java | 23 +++++++++++++++++-- src/main/resources/defs/AchievementParam.json | 15 ++++++++++++ 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 41cd597..5df7b80 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Latest nightly compiled server jar: [Nightly](https://nightly.link/Melledy/Nebul - Inventory/Discs working - Energy system - Mail system -- Story (untested) +- Story - Daily quests - Battle pass - Gacha @@ -27,7 +27,7 @@ Latest nightly compiled server jar: [Nightly](https://nightly.link/Melledy/Nebul - Proving Grounds - Catacylsm Survivor (talents not fully working) - Boss Blitz -- Events (Only tower defense and trials) +- Events (Only tower defense and trials. Other events may work) ### Supported regions diff --git a/src/main/java/emu/nebula/game/story/StoryManager.java b/src/main/java/emu/nebula/game/story/StoryManager.java index 9ffc791..58f24b7 100644 --- a/src/main/java/emu/nebula/game/story/StoryManager.java +++ b/src/main/java/emu/nebula/game/story/StoryManager.java @@ -83,14 +83,15 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject { // Handle regular story for (var settle : list) { - // Get id + // Get story id int id = settle.getIdx(); // Get story data var data = GameData.getStoryDataTable().get(id); if (data == null) continue; - // Settle options (Must be before the completion check as we need to do the same story multiple times to get all the endings) + // Settle options + // Important: Must be before the completion check as we need to do the same story multiple times to get all the endings this.settleOptions(settle); // Check if we already completed the story @@ -122,6 +123,9 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject { continue; } + // Add evidence + this.getEvidences().add(id); + // Save to db Nebula.getGameDatabase().addToSet(this, this.getPlayerUid(), "evidences", id); } @@ -252,8 +256,10 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject { @PostLoad public void onLoad() { + // Simple flag to check if we need to save this manager to the database boolean save = false; + // Create evidences/option data if we are missing them if (this.evidences == null) { this.evidences = new IntOpenHashSet(); save = true; @@ -264,6 +270,19 @@ public class StoryManager extends PlayerManager implements GameDatabaseObject { save = true; } + // Hardcoded fix if the player is missing the last option in main story chapter 9 + if (this.getCompletedStories().contains(1025)) { + if (!this.getEvidences().contains(1004)) { + this.getEvidences().add(1004); + save = true; + } + if (!this.getEvidences().contains(1007)) { + this.getEvidences().add(1007); + save = true; + } + } + + // Save to database if (save) { this.save(); } diff --git a/src/main/resources/defs/AchievementParam.json b/src/main/resources/defs/AchievementParam.json index 3aa07e0..b5947da 100644 --- a/src/main/resources/defs/AchievementParam.json +++ b/src/main/resources/defs/AchievementParam.json @@ -1451,5 +1451,20 @@ "Id": 633, "Param1": 309, "ParamCond1": 0 + }, + { + "Id": 635, + "Param1": 825, + "ParamCond1": 0 + }, + { + "Id": 636, + "Param1": 926, + "ParamCond1": 0 + }, + { + "Id": 657, + "Param1": 1026, + "ParamCond1": 0 } ]