mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-25 18:05:26 +00:00
Opt: Sync Dungeon.TrailblazePower and Ornament.TrailblazePower
This commit is contained in:
parent
7e44dbed36
commit
6df40750e7
@ -810,15 +810,28 @@ class ConfigUpdater:
|
|||||||
yield 'Dungeon.Dungeon.NameAtDoubleRelic', value
|
yield 'Dungeon.Dungeon.NameAtDoubleRelic', value
|
||||||
elif key.endswith('CavernOfCorrosion'):
|
elif key.endswith('CavernOfCorrosion'):
|
||||||
yield 'Dungeon.Dungeon.NameAtDoubleRelic', value
|
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
|
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
|
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
|
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.Emulator.PackageName', 'CN-Official'
|
||||||
yield 'Alas.Optimization.WhenTaskQueueEmpty', 'close_game'
|
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]:
|
def iter_hidden_args(self, data) -> t.Iterator[str]:
|
||||||
"""
|
"""
|
||||||
@ -829,7 +842,9 @@ class ConfigUpdater:
|
|||||||
str: Arg path that should be hidden
|
str: Arg path that should be hidden
|
||||||
"""
|
"""
|
||||||
if deep_get(data, 'Dungeon.TrailblazePower.UseFuel') == False:
|
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':
|
if deep_get(data, 'Rogue.RogueBlessing.PresetBlessingFilter') != 'custom':
|
||||||
yield 'Rogue.RogueBlessing.CustomBlessingFilter'
|
yield 'Rogue.RogueBlessing.CustomBlessingFilter'
|
||||||
if deep_get(data, 'Rogue.RogueBlessing.PresetResonanceFilter') != 'custom':
|
if deep_get(data, 'Rogue.RogueBlessing.PresetResonanceFilter') != 'custom':
|
||||||
|
@ -261,6 +261,7 @@ class Dungeon(DungeonStamina, DungeonEvent, Combat):
|
|||||||
self.config.stored.DungeonDouble.rogue = rogue
|
self.config.stored.DungeonDouble.rogue = rogue
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
self.sync_config_traiblaze_power('Ornament')
|
||||||
self.config.update_battle_pass_quests()
|
self.config.update_battle_pass_quests()
|
||||||
self.config.update_daily_quests()
|
self.config.update_daily_quests()
|
||||||
self.check_synthesize()
|
self.check_synthesize()
|
||||||
@ -442,3 +443,19 @@ class Dungeon(DungeonStamina, DungeonEvent, Combat):
|
|||||||
if KEYWORDS_DAILY_QUEST.Consume_120_Trailblaze_Power in self.daily_quests:
|
if KEYWORDS_DAILY_QUEST.Consume_120_Trailblaze_Power in self.daily_quests:
|
||||||
logger.info(f'Done Consume_120_Trailblaze_Power stamina {stamina_used}')
|
logger.info(f'Done Consume_120_Trailblaze_Power stamina {stamina_used}')
|
||||||
self.achieved_daily_quest = True
|
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)
|
||||||
|
@ -63,6 +63,7 @@ class Ornament(OrnamentCombat):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
self.sync_config_traiblaze_power('Dungeon')
|
||||||
self.config.update_battle_pass_quests()
|
self.config.update_battle_pass_quests()
|
||||||
self.config.update_daily_quests()
|
self.config.update_daily_quests()
|
||||||
# self.check_synthesize()
|
# self.check_synthesize()
|
||||||
|
Loading…
Reference in New Issue
Block a user