Add: Rogue settings

This commit is contained in:
LmeSzinc 2023-10-18 23:36:31 +08:00
parent 8750704a4d
commit ce09d1ff22
17 changed files with 295 additions and 75 deletions

View File

@ -173,10 +173,15 @@
"Command": "Rogue",
"ServerUpdate": "04:00"
},
"RoguePath": {
"RogueWorld": {
"World": "Simulated_Universe_World_7",
"Path": "The_Hunt",
"DomainStrategy": "combat",
"Bonus": "Blessing Cosmos",
"DomainStrategy": "combat",
"ImmersionReward": "immersifier",
"StopCondition": "weekly_point_reward"
},
"RoguePath": {
"PresetResonanceFilter": "preset-1",
"ResonanceSelectionStrategy": "follow-presets",
"CustomResonanceFilter": "回响构音:均晶转变 > 回响构音:零维强化\n> 回响构音:第二次初恋 > 回响构音:体验的富翁\n> 回响构音:局外人 > 回响构音:怀疑的四重根\n> 回响构音:诸法无我 > 回响构音:诸行无常\n> 回响构音:射不主皮 > 回响构音:柘弓危矢\n> 回响构音:激变变星 > 回响构音:极端氦闪\n> 回响构音:末日狂欢 > 回响构音:树苗长高舞"

View File

@ -1169,7 +1169,18 @@
"display": "hide"
}
},
"RoguePath": {
"RogueWorld": {
"World": {
"type": "select",
"value": "Simulated_Universe_World_7",
"option": [
"Simulated_Universe_World_3",
"Simulated_Universe_World_4",
"Simulated_Universe_World_5",
"Simulated_Universe_World_6",
"Simulated_Universe_World_7"
]
},
"Path": {
"type": "select",
"value": "The_Hunt",
@ -1183,14 +1194,6 @@
"Elation"
]
},
"DomainStrategy": {
"type": "select",
"value": "combat",
"option": [
"combat",
"occurrence"
]
},
"Bonus": {
"type": "select",
"value": "Blessing Cosmos",
@ -1200,6 +1203,34 @@
"Fragmented Cosmos"
]
},
"DomainStrategy": {
"type": "select",
"value": "combat",
"option": [
"combat",
"occurrence"
]
},
"ImmersionReward": {
"type": "select",
"value": "immersifier",
"option": [
"do_not_claim",
"immersifier",
"immersifier_trailblaze_power"
]
},
"StopCondition": {
"type": "select",
"value": "weekly_point_reward",
"option": [
"weekly_point_reward",
"100_elite_boss",
"non_stop"
]
}
},
"RoguePath": {
"PresetResonanceFilter": {
"type": "select",
"value": "preset-1",

View File

@ -196,16 +196,34 @@ ItemStorage:
# ==================== Rogue ====================
RoguePath:
RogueWorld:
# Worlds will be injected in config updater
World:
value: Simulated_Universe_World_7
option: [
Simulated_Universe_World_3,
Simulated_Universe_World_4,
Simulated_Universe_World_5,
Simulated_Universe_World_6,
Simulated_Universe_World_7,
]
Path:
value: The_Hunt
option: [ Preservation, Remembrance, Nihility, Abundance, The_Hunt, Destruction, Elation ]
DomainStrategy:
value: combat
option: [ combat, occurrence ]
Bonus:
value: Blessing Cosmos
option: [ Blessing Cosmos, Miracle Cosmos, Fragmented Cosmos ]
DomainStrategy:
value: combat
option: [ combat, occurrence ]
ImmersionReward:
value: immersifier
option: [ do_not_claim, immersifier, immersifier_trailblaze_power ]
StopCondition:
value: weekly_point_reward
option: [ weekly_point_reward, 100_elite_boss, non_stop ]
RoguePath:
PresetResonanceFilter:
value: preset-1
option: [ preset-1, custom ]

View File

@ -19,5 +19,12 @@
"DataUpdate",
"Freebies"
]
},
"Rogue": {
"menu": "list",
"page": "setting",
"tasks": [
"Rogue"
]
}
}

View File

@ -55,6 +55,7 @@ Rogue:
tasks:
Rogue:
- Scheduler
- RogueWorld
- RoguePath
- RogueBlessing
- RogueCurio

View File

@ -116,10 +116,15 @@ class GeneratedConfig:
ItemStorage_Credit = {}
ItemStorage_StallerJade = {}
# Group `RogueWorld`
RogueWorld_World = 'Simulated_Universe_World_7' # Simulated_Universe_World_3, Simulated_Universe_World_4, Simulated_Universe_World_5, Simulated_Universe_World_6, Simulated_Universe_World_7
RogueWorld_Path = 'The_Hunt' # Preservation, Remembrance, Nihility, Abundance, The_Hunt, Destruction, Elation
RogueWorld_Bonus = 'Blessing Cosmos' # Blessing Cosmos, Miracle Cosmos, Fragmented Cosmos
RogueWorld_DomainStrategy = 'combat' # combat, occurrence
RogueWorld_ImmersionReward = 'immersifier' # do_not_claim, immersifier, immersifier_trailblaze_power
RogueWorld_StopCondition = 'weekly_point_reward' # weekly_point_reward, 100_elite_boss, non_stop
# Group `RoguePath`
RoguePath_Path = 'The_Hunt' # Preservation, Remembrance, Nihility, Abundance, The_Hunt, Destruction, Elation
RoguePath_DomainStrategy = 'combat' # combat, occurrence
RoguePath_Bonus = 'Blessing Cosmos' # Blessing Cosmos, Miracle Cosmos, Fragmented Cosmos
RoguePath_PresetResonanceFilter = 'preset-1' # preset-1, custom
RoguePath_ResonanceSelectionStrategy = 'follow-presets' # follow-presets, unrecorded-first, before-random
RoguePath_CustomResonanceFilter = '回响构音:均晶转变 > 回响构音:零维强化\n> 回响构音:第二次初恋 > 回响构音:体验的富翁\n> 回响构音:局外人 > 回响构音:怀疑的四重根\n> 回响构音:诸法无我 > 回响构音:诸行无常\n> 回响构音:射不主皮 > 回响构音:柘弓危矢\n> 回响构音:激变变星 > 回响构音:极端氦闪\n> 回响构音:末日狂欢 > 回响构音:树苗长高舞'

View File

@ -412,6 +412,11 @@ class ConfigGenerator:
dungeon_name = dungeon.__getattribute__(ingame_lang)
value = f'{dungeon_name} ({world_name})'
deep_set(new, keys=['Weekly', 'Name', dungeon.name], value=value)
# Rogue worlds
for dungeon in [d for d in DungeonList.instances.values() if d.is_Simulated_Universe]:
name = deep_get(new, keys=['RogueWorld', 'World', dungeon.name], default=None)
if name:
deep_set(new, keys=['RogueWorld', 'World', dungeon.name], value=dungeon.__getattribute__(ingame_lang))
# GUI i18n
for path, _ in deep_iter(self.gui, depth=2):
@ -461,7 +466,7 @@ class ConfigGenerator:
# Simulated universe is WIP, task won't show on GUI but can still be bound
# e.g. `RogueUI('src', task='Rogue')`
# Comment this for development
data.pop('Rogue')
# data.pop('Rogue')
return data

View File

@ -768,11 +768,20 @@
"help": ""
}
},
"RoguePath": {
"RogueWorld": {
"_info": {
"name": "Path Settings",
"name": "Simulated Universe Settings",
"help": ""
},
"World": {
"name": "World",
"help": "",
"Simulated_Universe_World_3": "Simulated Universe — World 3",
"Simulated_Universe_World_4": "Simulated Universe — World 4",
"Simulated_Universe_World_5": "Simulated Universe — World 5",
"Simulated_Universe_World_6": "Simulated Universe — World 6",
"Simulated_Universe_World_7": "Simulated Universe — World 7"
},
"Path": {
"name": "Path",
"help": "",
@ -784,12 +793,6 @@
"Destruction": "Destruction",
"Elation": "Elation"
},
"DomainStrategy": {
"name": "Domain Strategy",
"help": "Prefer Combat: Suitable for normal builds, longer clear time\nPrefer Occurrence: Require efficient builds, shorter clear time",
"combat": "Prefer Combat",
"occurrence": "Prefer Occurrence"
},
"Bonus": {
"name": "Blessings of Trailblaze",
"help": "",
@ -797,6 +800,32 @@
"Miracle Cosmos": "Miracle Cosmos (Choose a curio)",
"Fragmented Cosmos": "Fragmented Cosmos (Claim some Cosmic Fragments)"
},
"DomainStrategy": {
"name": "Domain Strategy",
"help": "Prefer Combat: Suitable for normal builds, longer clear time\nPrefer Occurrence: Require efficient builds, shorter clear time",
"combat": "Prefer Combat",
"occurrence": "Prefer Occurrence"
},
"ImmersionReward": {
"name": "Claim Immersion Rewards",
"help": "Note: If \"Use Immersifier and Trailblaze Power\" is selected, the dungeon task will no longer run, and all trailblaze power will be used first to claim immersion rewards, except for double events.",
"do_not_claim": "Do not Claim",
"immersifier": "Use Immersifier",
"immersifier_trailblaze_power": "Use Immersifier and Trailblaze Power"
},
"StopCondition": {
"name": "Stop Condition",
"help": "Note: If \"Reached 100 Elite/Boss drop rewards\", the simulated universe task will run for several hours",
"weekly_point_reward": "Reached Weekly Point Rewards",
"100_elite_boss": "Reached 100 Elite/BOSS drop rewards",
"non_stop": "Non-stop (for debugging only)"
}
},
"RoguePath": {
"_info": {
"name": "Path Settings",
"help": ""
},
"PresetResonanceFilter": {
"name": "Preset Resonance Filter",
"help": "",

View File

@ -768,11 +768,20 @@
"help": ""
}
},
"RoguePath": {
"RogueWorld": {
"_info": {
"name": "Ajustes de Vía",
"name": "Ajustes de Universo Simulado",
"help": ""
},
"World": {
"name": "Mundo",
"help": "",
"Simulated_Universe_World_3": "Mundo 3",
"Simulated_Universe_World_4": "Mundo 4",
"Simulated_Universe_World_5": "Mundo 5",
"Simulated_Universe_World_6": "Mundo 6",
"Simulated_Universe_World_7": "Mundo 7"
},
"Path": {
"name": "Vía",
"help": "",
@ -784,12 +793,6 @@
"Destruction": "Destrucción",
"Elation": "Exultación"
},
"DomainStrategy": {
"name": "Estrategia de dominio",
"help": "Prefiero Batalla: Adecuado para configuraciones normales, tiempo de eliminación más prolongado\\Prefiero Evento: Requiere configuraciones eficientes, tiempo de eliminación más corto",
"combat": "Prefiero Batalla",
"occurrence": "Prefiero Evento"
},
"Bonus": {
"name": "Bendiciones",
"help": "",
@ -797,6 +800,32 @@
"Miracle Cosmos": "Cosmos milagroso (Elige un objeto raro)",
"Fragmented Cosmos": "Fragmented Cosmos (Claim some Cosmic Fragments)"
},
"DomainStrategy": {
"name": "Estrategia de dominio",
"help": "Prefiero Batalla: Adecuado para configuraciones normales, tiempo de eliminación más prolongado\\Prefiero Evento: Requiere configuraciones eficientes, tiempo de eliminación más corto",
"combat": "Prefiero Batalla",
"occurrence": "Prefiero Evento"
},
"ImmersionReward": {
"name": "Reclamar recompensas de inmersión",
"help": "Si se selecciona \"Usa inmersor y poder trazacaminos\", la tarea de mazmorra ya no se ejecutará y todo el poder trazacaminos se usará primero para reclamar recompensas de inmersión, excepto para eventos dobles",
"do_not_claim": "No reclamar",
"immersifier": "Usar inmersor",
"immersifier_trailblaze_power": "Usa inmersor y poder trazacaminos"
},
"StopCondition": {
"name": "Condición de detención",
"help": "Nota: Si \"recompensas de Elite/BOSS\", la tarea del universo simulado se ejecutará durante varias horas",
"weekly_point_reward": "Recompensas de puntos semanales alcanzados",
"100_elite_boss": "Has alcanzado 100 recompensas de Elite/BOSS",
"non_stop": "Sin parar (solo para depuración)"
}
},
"RoguePath": {
"_info": {
"name": "Ajustes de Vía",
"help": ""
},
"PresetResonanceFilter": {
"name": "Filtro de preajuste de resonancia",
"help": "",

View File

@ -768,14 +768,23 @@
"help": "ItemStorage.StallerJade.help"
}
},
"RoguePath": {
"RogueWorld": {
"_info": {
"name": "RoguePath._info.name",
"help": "RoguePath._info.help"
"name": "RogueWorld._info.name",
"help": "RogueWorld._info.help"
},
"World": {
"name": "RogueWorld.World.name",
"help": "RogueWorld.World.help",
"Simulated_Universe_World_3": "第三世界・模擬宇宙",
"Simulated_Universe_World_4": "第四世界・模擬宇宙",
"Simulated_Universe_World_5": "第五世界・模擬宇宙",
"Simulated_Universe_World_6": "第六世界・模擬宇宙",
"Simulated_Universe_World_7": "第七世界・模擬宇宙"
},
"Path": {
"name": "RoguePath.Path.name",
"help": "RoguePath.Path.help",
"name": "RogueWorld.Path.name",
"help": "RogueWorld.Path.help",
"Preservation": "Preservation",
"Remembrance": "Remembrance",
"Nihility": "Nihility",
@ -784,19 +793,39 @@
"Destruction": "Destruction",
"Elation": "Elation"
},
"DomainStrategy": {
"name": "RoguePath.DomainStrategy.name",
"help": "RoguePath.DomainStrategy.help",
"combat": "combat",
"occurrence": "occurrence"
},
"Bonus": {
"name": "RoguePath.Bonus.name",
"help": "RoguePath.Bonus.help",
"name": "RogueWorld.Bonus.name",
"help": "RogueWorld.Bonus.help",
"Blessing Cosmos": "Blessing Cosmos",
"Miracle Cosmos": "Miracle Cosmos",
"Fragmented Cosmos": "Fragmented Cosmos"
},
"DomainStrategy": {
"name": "RogueWorld.DomainStrategy.name",
"help": "RogueWorld.DomainStrategy.help",
"combat": "combat",
"occurrence": "occurrence"
},
"ImmersionReward": {
"name": "RogueWorld.ImmersionReward.name",
"help": "RogueWorld.ImmersionReward.help",
"do_not_claim": "do_not_claim",
"immersifier": "immersifier",
"immersifier_trailblaze_power": "immersifier_trailblaze_power"
},
"StopCondition": {
"name": "RogueWorld.StopCondition.name",
"help": "RogueWorld.StopCondition.help",
"weekly_point_reward": "weekly_point_reward",
"100_elite_boss": "100_elite_boss",
"non_stop": "non_stop"
}
},
"RoguePath": {
"_info": {
"name": "RoguePath._info.name",
"help": "RoguePath._info.help"
},
"PresetResonanceFilter": {
"name": "RoguePath.PresetResonanceFilter.name",
"help": "RoguePath.PresetResonanceFilter.help",

View File

@ -768,11 +768,20 @@
"help": ""
}
},
"RoguePath": {
"RogueWorld": {
"_info": {
"name": "命途设置",
"name": "模拟宇宙设置",
"help": ""
},
"World": {
"name": "模拟宇宙关卡",
"help": "",
"Simulated_Universe_World_3": "第三世界•模拟宇宙",
"Simulated_Universe_World_4": "第四世界•模拟宇宙",
"Simulated_Universe_World_5": "第五世界•模拟宇宙",
"Simulated_Universe_World_6": "第六世界•模拟宇宙",
"Simulated_Universe_World_7": "第七世界•模拟宇宙"
},
"Path": {
"name": "命途",
"help": "",
@ -784,12 +793,6 @@
"Destruction": "毁灭",
"Elation": "欢愉"
},
"DomainStrategy": {
"name": "区域策略",
"help": "偏好战斗:适用于平民队伍,通关时间较长\n偏好事件需要高练队伍通关时间较短",
"combat": "偏好战斗",
"occurrence": "偏好事件"
},
"Bonus": {
"name": "开拓祝福三选一",
"help": "",
@ -797,6 +800,32 @@
"Miracle Cosmos": "神奇宇宙(获得一个奇物)",
"Fragmented Cosmos": "破碎宇宙(获得宇宙碎片)"
},
"DomainStrategy": {
"name": "区域策略",
"help": "偏好战斗:适用于平民队伍,通关时间较长\n偏好事件需要高练队伍通关时间较短",
"combat": "偏好战斗",
"occurrence": "偏好事件"
},
"ImmersionReward": {
"name": "领取浸器奖励",
"help": "注意:选择 \"使用沉浸器和开拓力领取\" 时,每日副本任务不再打本,所有开拓力将优先被用于领取浸器奖励,双倍活动时除外",
"do_not_claim": "不领取",
"immersifier": "仅使用沉浸器领取",
"immersifier_trailblaze_power": "使用沉浸器和开拓力领取"
},
"StopCondition": {
"name": "停止条件",
"help": "注意:\"每周100精英怪掉落奖励达到上限\" 时,模拟宇宙任务将运行数小时",
"weekly_point_reward": "每周点数奖励达到上限",
"100_elite_boss": "每周100精英怪掉落奖励达到上限",
"non_stop": "不停止 (仅用于调试)"
}
},
"RoguePath": {
"_info": {
"name": "命途设置",
"help": ""
},
"PresetResonanceFilter": {
"name": "回响构音过滤器",
"help": "",

View File

@ -768,11 +768,20 @@
"help": ""
}
},
"RoguePath": {
"RogueWorld": {
"_info": {
"name": "命途設定",
"name": "模拟宇宙设置",
"help": ""
},
"World": {
"name": "模拟宇宙关卡",
"help": "",
"Simulated_Universe_World_3": "第三世界•模擬宇宙",
"Simulated_Universe_World_4": "第四世界•模擬宇宙",
"Simulated_Universe_World_5": "第五世界•模擬宇宙",
"Simulated_Universe_World_6": "第六世界•模擬宇宙",
"Simulated_Universe_World_7": "第七世界•模擬宇宙"
},
"Path": {
"name": "命途",
"help": "",
@ -784,12 +793,6 @@
"Destruction": "毀滅",
"Elation": "歡愉"
},
"DomainStrategy": {
"name": "區域策略",
"help": "偏好戰鬥:適用於平民隊伍,通關時間較長\n偏好事件需要高練隊伍通關時間較短",
"combat": "偏好戰鬥",
"occurrence": "偏好事件"
},
"Bonus": {
"name": "開拓祝福三選一",
"help": "",
@ -797,6 +800,32 @@
"Miracle Cosmos": "神奇宇宙(獲得一個奇物)",
"Fragmented Cosmos": "破碎宇宙(獲得宇宙碎片)"
},
"DomainStrategy": {
"name": "區域策略",
"help": "偏好戰鬥:適用於平民隊伍,过關時間較長\n偏好事件需要高練隊伍过關時間較短",
"combat": "偏好戰鬥",
"occurrence": "偏好事件"
},
"ImmersionReward": {
"name": "领取浸器奖励",
"help": "注意:选择 \"使用沉浸器和开拓力领取\" 时,每日副本任务不再打本,所有开拓力将优先被用于领取浸器奖励,双倍活动时除外",
"do_not_claim": "不领取",
"immersifier": "仅使用沉浸器领取",
"immersifier_trailblaze_power": "使用沉浸器和开拓力领取"
},
"StopCondition": {
"name": "停止条件",
"help": "注意:\"每周100精英怪掉落奖励达到上限\" 时,模拟宇宙任务将运行数小时",
"weekly_point_reward": "每周点数奖励达到上限",
"100_elite_boss": "每周100精英怪掉落奖励达到上限",
"non_stop": "不停止 (仅用于除錯)"
}
},
"RoguePath": {
"_info": {
"name": "命途設定",
"help": ""
},
"PresetResonanceFilter": {
"name": "迴響構音過濾器",
"help": "",

View File

@ -83,10 +83,10 @@ class RogueBonusSelector(RogueSelector):
if not self.ocr_results:
self.ui_select(None)
options = {result.matched_keyword.en: result for result in self.ocr_results}
if self.main.config.RoguePath_Bonus not in options.keys():
logger.warning(f"Can not find option: {self.main.config.RoguePath_Bonus}, randomly choose one")
if self.main.config.RogueWorld_Bonus not in options.keys():
logger.warning(f"Can not find option: {self.main.config.RogueWorld_Bonus}, randomly choose one")
target = np.random.choice(options)
else:
target = options[self.main.config.RoguePath_Bonus]
target = options[self.main.config.RogueWorld_Bonus]
logger.info(f"Choose bonus: {target}")
self.ui_select(target)

View File

@ -219,7 +219,7 @@ class RogueEntry(DungeonUI, RogueRewardHandler, RoguePathHandler):
self._dungeon_nav_goto(Simulated_Universe_World_1)
self._rogue_teleport()
def rogue_world_enter(self, world: int | DungeonList):
def rogue_world_enter(self, world: int | DungeonList = None):
"""
Args:
world: 7 or KEYWORDS_DUNGEON_LIST.Simulated_Universe_World_7
@ -229,6 +229,9 @@ class RogueEntry(DungeonUI, RogueRewardHandler, RoguePathHandler):
out: is_page_rogue_launch()
"""
logger.hr('Rogue world enter', level=1)
if world is None:
world = DungeonList.find(self.config.RogueWorld_World)
current = self.ui_get_current_page()
if current == page_rogue:
if self.is_page_rogue_main():
@ -248,4 +251,4 @@ class RogueEntry(DungeonUI, RogueRewardHandler, RoguePathHandler):
# Enter
self._rogue_world_set(world)
self._rogue_world_enter()
self.rogue_path_select(self.config.RoguePath_Path)
self.rogue_path_select(self.config.RogueWorld_Path)

View File

@ -272,7 +272,7 @@ class RogueEvent(RogueUI):
logger.info(f'Randomly select option {random_index+1}')
return self.valid_options[random_index]
strategy_name = self.config.RoguePath_DomainStrategy
strategy_name = self.config.RogueWorld_DomainStrategy
logger.attr('DomainStrategy', strategy_name)
if strategy_name not in STRATEGIES:
logger.warning(

View File

@ -11,7 +11,7 @@ class RogueHandler(RouteLoader, RogueEntry):
in: Any
out: page_rogue, is_page_rogue_main()
"""
self.rogue_world_enter(7)
self.rogue_world_enter()
self.rogue_run()
self.rogue_reward_claim()

View File

@ -200,8 +200,8 @@ class RogueExit(CombatInteract):
logger.info(f'Goto next domain: {domain}')
return direction
logger.attr('DomainStrategy', self.config.RoguePath_DomainStrategy)
if self.config.RoguePath_DomainStrategy == 'occurrence':
logger.attr('DomainStrategy', self.config.RogueWorld_DomainStrategy)
if self.config.RogueWorld_DomainStrategy == 'occurrence':
for expect in [
KEYWORDS_MAP_PLANE.Rogue_DomainTransaction,
KEYWORDS_MAP_PLANE.Rogue_DomainOccurrence,
@ -212,7 +212,7 @@ class RogueExit(CombatInteract):
if domain == expect:
logger.info(f'Goto next domain: {domain}')
return direction
elif self.config.RoguePath_DomainStrategy == 'combat':
elif self.config.RogueWorld_DomainStrategy == 'combat':
for expect in [
KEYWORDS_MAP_PLANE.Rogue_DomainCombat,
KEYWORDS_MAP_PLANE.Rogue_DomainEncounter,
@ -224,7 +224,7 @@ class RogueExit(CombatInteract):
logger.info(f'Goto next domain: {domain}')
return direction
else:
logger.error(f'Unknown domain strategy: {self.config.RoguePath_DomainStrategy}')
logger.error(f'Unknown domain strategy: {self.config.RogueWorld_DomainStrategy}')
logger.error('No domain was selected, return the first instead')
logger.info(f'Goto next domain: {results[0]}')