From c2ebff92c9a59cad627e2ddf3da67acba14e103a Mon Sep 17 00:00:00 2001 From: Melledy <121644117+Melledy@users.noreply.github.com> Date: Tue, 23 Dec 2025 20:56:00 -0800 Subject: [PATCH] Clean up some stuff and update enums --- src/main/java/emu/nebula/GameConstants.java | 1 + .../command/commands/AutoBuildCommand.java | 15 +++++------ .../achievement/AchievementCondition.java | 16 ++++++----- .../nebula/game/activity/ActivityType.java | 6 ++++- .../emu/nebula/game/quest/QuestCondType.java | 27 ++++++++++++++----- 5 files changed, 41 insertions(+), 24 deletions(-) diff --git a/src/main/java/emu/nebula/GameConstants.java b/src/main/java/emu/nebula/GameConstants.java index ee81f20..cda2f4f 100644 --- a/src/main/java/emu/nebula/GameConstants.java +++ b/src/main/java/emu/nebula/GameConstants.java @@ -10,6 +10,7 @@ public class GameConstants { public static int DATA_VERSION = 0; // Set data versions for each region + // TODO move this to a json file inside the jar to make it easier to auto-update static { RegionConfig.getRegion("global") .setDataVersion(73); diff --git a/src/main/java/emu/nebula/command/commands/AutoBuildCommand.java b/src/main/java/emu/nebula/command/commands/AutoBuildCommand.java index b6ed357..b2fe81e 100644 --- a/src/main/java/emu/nebula/command/commands/AutoBuildCommand.java +++ b/src/main/java/emu/nebula/command/commands/AutoBuildCommand.java @@ -80,11 +80,12 @@ public class AutoBuildCommand implements CommandHandler { } } - // Get target score - int targetScore = 0; + // Get target level/score int targetLevel = 0; + int targetScore = 0; if (args.getSkill() < 0) { + // Default target level is 40 targetLevel = 40; } else { targetScore = args.getSkill(); @@ -95,6 +96,7 @@ public class AutoBuildCommand implements CommandHandler { targetLevel = args.getLevel(); } + // Get target score from record level if (targetLevel > 0) { var data = GameData.getStarTowerBuildRankDataTable().get(targetLevel); if (data != null) { @@ -184,7 +186,7 @@ public class AutoBuildCommand implements CommandHandler { } } - // Add random trekker from list + // If we have no versatile or support trekkers, add a random trekker from the remaining list if (list.size() > 0) { builder.getCharacters().add(Utils.randomElement(list)); } @@ -372,12 +374,7 @@ public class AutoBuildCommand implements CommandHandler { var main = builder.getCharacters().get(0); // Get random potentials - while (potentialScore > 0) { - // End - if (potentialScore <= 0 || characters.isEmpty()) { - break; - } - + while (potentialScore > 0 && !characters.isEmpty()) { // Get random character var character = Utils.randomElement(characters); diff --git a/src/main/java/emu/nebula/game/achievement/AchievementCondition.java b/src/main/java/emu/nebula/game/achievement/AchievementCondition.java index 738fd17..d454c0d 100644 --- a/src/main/java/emu/nebula/game/achievement/AchievementCondition.java +++ b/src/main/java/emu/nebula/game/achievement/AchievementCondition.java @@ -56,7 +56,6 @@ public enum AchievementCondition { LoginTotal (51), QuestTravelerDuelChallengeTotal (52), QuestTourGuideSpecific (53), - QuestTravelerDuelSpecific (54), QuestWithSpecificType (55), RegionBossClearSpecificFullStarWithBossIdAndDifficulty (56), RegionBossClearSpecificLevelWithDifficultyAndTotal (57), @@ -67,12 +66,8 @@ public enum AchievementCondition { StageClearSpecificStars (62), StoryClear (63), TravelerDuelChallengeSpecificBoosLevelWithDifficultyAndTotal (64), - TravelerDuelClearBossTotal (65), - TravelerDuelClearSpecificBossIdAndDifficulty (66), TravelerDuelChallengeClearSpecificBossLevelAndAffix (67), - TravelerDuelClearSpecificBossLevelWithDifficultyAndTotal (68), TravelerDuelClearSpecificBossTotal (69), - TravelerDuelChallengeRankUploadTotal (70), WorldClassSpecific (71), RegionBossClearSpecificTypeWithTotal (72), CharactersWithSpecificDatingCount (73), @@ -82,7 +77,6 @@ public enum AchievementCondition { VampireSurvivorPassedSpecificLevel (77), CharacterParticipateTowerNumber (78), CharacterAllSkillReachSpecificLevel (79), - TravelerDuelPlayTotal (80), VampireClearTotal (81), VampireWithSpecificClearTotal (82), AgentFinishTotal (83), @@ -101,6 +95,13 @@ public enum AchievementCondition { DailyShopReceiveShopTotal (105), AgentApplyTotal (106), DiscSpecific (114), + StorySetClearSpecific (116), + CharacterWithSpecificSkillAndLevel (118), + DiscWithSpecificQuantityLevelAndAttr (119), + TutorialLevelClearSpecific (120), + TutorialLevelSpecificClearTotal (121), + DiscWithSpecificQuantityPhaseAndAttr (122), + WeekBossClearTotal (123), ClientReport (200), TowerBattleTimes (501), TowerBossChallengeSpecificHighRewardWithTotal (502), @@ -137,7 +138,8 @@ public enum AchievementCondition { TowerSpecificSecondarySkillActivateTotal (536), TowerSpecificGetExtraNoteLvTotal (537), TowerSweepTimes (539), - TowerSweepTotal (540); + TowerSweepTotal (540), + TowerBattleWithPartner (541); @Getter private final int value; diff --git a/src/main/java/emu/nebula/game/activity/ActivityType.java b/src/main/java/emu/nebula/game/activity/ActivityType.java index 8a31984..4e914e8 100644 --- a/src/main/java/emu/nebula/game/activity/ActivityType.java +++ b/src/main/java/emu/nebula/game/activity/ActivityType.java @@ -18,7 +18,11 @@ public enum ActivityType { Avg (10), Task (11), Shop (12), - Advertise (13); + Advertise (13), + BDConvert (14), + Breakout (15), + TrekkerVersus (16), + Story (17); @Getter private final int value; diff --git a/src/main/java/emu/nebula/game/quest/QuestCondType.java b/src/main/java/emu/nebula/game/quest/QuestCondType.java index 1cb8d36..74b79c5 100644 --- a/src/main/java/emu/nebula/game/quest/QuestCondType.java +++ b/src/main/java/emu/nebula/game/quest/QuestCondType.java @@ -41,7 +41,6 @@ public enum QuestCondType { LoginTotal (51), QuestTravelerDuelChallengeTotal (52), QuestTourGuideSpecific (53), - QuestTravelerDuelSpecific (54), QuestWithSpecificType (55), RegionBossClearSpecificFullStarWithBossIdAndDifficulty (56), RegionBossClearSpecificLevelWithDifficultyAndTotal (57), @@ -51,12 +50,8 @@ public enum QuestCondType { StageClearSpecificStars (62), StoryClear (63), TravelerDuelChallengeSpecificBoosLevelWithDifficultyAndTotal (64), - TravelerDuelClearBossTotal (65), - TravelerDuelClearSpecificBossIdAndDifficulty (66), TravelerDuelChallengeClearSpecificBossLevelAndAffix (67), - TravelerDuelClearSpecificBossLevelWithDifficultyAndTotal (68), TravelerDuelClearSpecificBossTotal (69), - TravelerDuelChallengeRankUploadTotal (70), WorldClassSpecific (71), RegionBossClearSpecificTypeWithTotal (72), CharactersWithSpecificDatingCount (73), @@ -64,7 +59,6 @@ public enum QuestCondType { VampireSurvivorPassedSpecificLevel (77), CharacterParticipateTowerNumber (78), CharacterAllSkillReachSpecificLevel (79), - TravelerDuelPlayTotal (80), VampireClearTotal (81), VampireWithSpecificClearTotal (82), AgentFinishTotal (83), @@ -94,10 +88,28 @@ public enum QuestCondType { ActivityTypeLevelStarWithSpecificIdAndLevelTypeTotal (111), ActivityTypeLevelPassedWithSpecificIdAndLevelIdAndSpecificPositionAndCharElem (112), ActivityTypeLevelPassedSpecificIdTotal (113), + StorySetClearSpecific (116), + CharacterWithSpecificSkillAndLevel (118), + DiscWithSpecificQuantityLevelAndAttr (119), + TutorialLevelClearSpecific (120), + TutorialLevelSpecificClearTotal (121), + DiscWithSpecificQuantityPhaseAndAttr (122), + WeekBossClearTotal (123), + ActivityStoryReadStory (124), ClientReport (200), + TowerBattleTimes (501), + TowerBossChallengeSpecificHighRewardWithTotal (502), + TowerBuildSpecificCharacter (503), TowerBuildSpecificScoreWithTotal (504), + TowerClearSpecificCharacterTypeWithTotal (505), + TowerClearSpecificGroupIdAndDifficulty (506), TowerClearSpecificLevelWithDifficultyAndTotal (507), + TowerClearTotal (508), + TowerEnterRoom (509), TowerEnterTotal (510), + TowerEventTimes (511), + TowerFateTimes (512), + TowerItemsGet (513), TowerSpecificDifficultyShopBuyTimes (514), TowerGrowthSpecificNote (515), TowerClearSpecificLevelWithDifficultyAndTotalHistory (516), @@ -122,7 +134,8 @@ public enum QuestCondType { TowerSpecificGetExtraNoteLvTotal (537), TowerEnterFloor (538), TowerSweepTimes (539), - TowerSweepTotal (540); + TowerSweepTotal (540), + TowerBattleWithPartner (541); @Getter private final int value;