Opt: Sync Dungeon.TrailblazePower and Ornament.TrailblazePower

This commit is contained in:
LmeSzinc 2024-07-19 12:20:45 +08:00
parent 7e44dbed36
commit 6df40750e7
3 changed files with 38 additions and 5 deletions

View File

@ -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':

View File

@ -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)

View File

@ -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()