diff --git a/module/config/config_updater.py b/module/config/config_updater.py index 0b5d8cf1c..532aef18d 100644 --- a/module/config/config_updater.py +++ b/module/config/config_updater.py @@ -810,15 +810,28 @@ class ConfigUpdater: yield 'Dungeon.Dungeon.NameAtDoubleRelic', value elif key.endswith('CavernOfCorrosion'): yield 'Dungeon.Dungeon.NameAtDoubleRelic', value - elif key == 'Rogue.RogueWorld.UseImmersifier' and value is False: + if key == 'Rogue.RogueWorld.UseImmersifier' and value is False: yield 'Rogue.RogueWorld.UseStamina', False - elif key == 'Rogue.RogueWorld.UseStamina' and value is True: + if key == 'Rogue.RogueWorld.UseStamina' and value is True: yield 'Rogue.RogueWorld.UseImmersifier', True - elif key == 'Rogue.RogueWorld.DoubleEvent' and value is True: + if key == 'Rogue.RogueWorld.DoubleEvent' and value is True: yield 'Rogue.RogueWorld.UseImmersifier', True - elif key == 'Alas.Emulator.GameClient' and value == 'cloud_android': + if key == 'Alas.Emulator.GameClient' and value == 'cloud_android': yield 'Alas.Emulator.PackageName', 'CN-Official' yield 'Alas.Optimization.WhenTaskQueueEmpty', 'close_game' + # Sync Dungeon.TrailblazePower and Ornament.TrailblazePower + if key == 'Dungeon.TrailblazePower.ExtractReservedTrailblazePower': + yield 'Ornament.TrailblazePower.ExtractReservedTrailblazePower', value + if key == 'Dungeon.TrailblazePower.UseFuel': + yield 'Ornament.TrailblazePower.UseFuel', value + if key == 'Dungeon.TrailblazePower.FuelReserve': + yield 'Ornament.TrailblazePower.FuelReserve', value + if key == 'Ornament.TrailblazePower.ExtractReservedTrailblazePower': + yield 'Dungeon.TrailblazePower.ExtractReservedTrailblazePower', value + if key == 'Ornament.TrailblazePower.UseFuel': + yield 'Dungeon.TrailblazePower.UseFuel', value + if key == 'Ornament.TrailblazePower.FuelReserve': + yield 'Dungeon.TrailblazePower.FuelReserve', value def iter_hidden_args(self, data) -> t.Iterator[str]: """ @@ -829,7 +842,9 @@ class ConfigUpdater: str: Arg path that should be hidden """ if deep_get(data, 'Dungeon.TrailblazePower.UseFuel') == False: - yield 'Dungeon.TrailblazePower.UseFuelUntilRemainCount' + yield 'Dungeon.TrailblazePower.FuelReserve' + if deep_get(data, 'Ornament.TrailblazePower.UseFuel') == False: + yield 'Ornament.TrailblazePower.FuelReserve' if deep_get(data, 'Rogue.RogueBlessing.PresetBlessingFilter') != 'custom': yield 'Rogue.RogueBlessing.CustomBlessingFilter' if deep_get(data, 'Rogue.RogueBlessing.PresetResonanceFilter') != 'custom': diff --git a/tasks/dungeon/dungeon.py b/tasks/dungeon/dungeon.py index 63c4315cf..e8957049f 100644 --- a/tasks/dungeon/dungeon.py +++ b/tasks/dungeon/dungeon.py @@ -261,6 +261,7 @@ class Dungeon(DungeonStamina, DungeonEvent, Combat): self.config.stored.DungeonDouble.rogue = rogue def run(self): + self.sync_config_traiblaze_power('Ornament') self.config.update_battle_pass_quests() self.config.update_daily_quests() self.check_synthesize() @@ -442,3 +443,19 @@ class Dungeon(DungeonStamina, DungeonEvent, Combat): if KEYWORDS_DAILY_QUEST.Consume_120_Trailblaze_Power in self.daily_quests: logger.info(f'Done Consume_120_Trailblaze_Power stamina {stamina_used}') self.achieved_daily_quest = True + + def sync_config_traiblaze_power(self, set_task): + # Sync Dungeon.TrailblazePower and Ornament.TrailblazePower + with self.config.multi_set(): + value = self.config.TrailblazePower_ExtractReservedTrailblazePower + keys = [set_task, 'TrailblazePower', 'ExtractReservedTrailblazePower'] + if self.config.cross_get(keys) != value: + self.config.cross_set(keys, value) + value = self.config.TrailblazePower_UseFuel + keys = [set_task, 'TrailblazePower', 'UseFuel'] + if self.config.cross_get(keys) != value: + self.config.cross_set(keys, value) + value = self.config.TrailblazePower_FuelReserve + keys = [set_task, 'TrailblazePower', 'FuelReserve'] + if self.config.cross_get(keys) != value: + self.config.cross_set(keys, value) diff --git a/tasks/ornament/ornament.py b/tasks/ornament/ornament.py index ec2add752..5249a311a 100644 --- a/tasks/ornament/ornament.py +++ b/tasks/ornament/ornament.py @@ -63,6 +63,7 @@ class Ornament(OrnamentCombat): return result def run(self): + self.sync_config_traiblaze_power('Dungeon') self.config.update_battle_pass_quests() self.config.update_daily_quests() # self.check_synthesize()