From ce09d1ff22dc9967beda8c19c181262f347e444c Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Wed, 18 Oct 2023 23:36:31 +0800 Subject: [PATCH] Add: Rogue settings --- config/template.json | 9 ++++- module/config/argument/args.json | 49 ++++++++++++++++++++----- module/config/argument/argument.yaml | 26 +++++++++++-- module/config/argument/menu.json | 7 ++++ module/config/argument/task.yaml | 1 + module/config/config_generated.py | 11 ++++-- module/config/config_updater.py | 7 +++- module/config/i18n/en-US.json | 45 +++++++++++++++++++---- module/config/i18n/es-ES.json | 45 +++++++++++++++++++---- module/config/i18n/ja-JP.json | 55 +++++++++++++++++++++------- module/config/i18n/zh-CN.json | 45 +++++++++++++++++++---- module/config/i18n/zh-TW.json | 45 +++++++++++++++++++---- tasks/rogue/bleesing/bonus.py | 6 +-- tasks/rogue/entry/entry.py | 7 +++- tasks/rogue/event/event.py | 2 +- tasks/rogue/rogue.py | 2 +- tasks/rogue/route/exit.py | 8 ++-- 17 files changed, 295 insertions(+), 75 deletions(-) diff --git a/config/template.json b/config/template.json index 075a78db3..9d45a5cbc 100644 --- a/config/template.json +++ b/config/template.json @@ -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> 回响构音:末日狂欢 > 回响构音:树苗长高舞" diff --git a/module/config/argument/args.json b/module/config/argument/args.json index e29514b70..af95ad18d 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -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", diff --git a/module/config/argument/argument.yaml b/module/config/argument/argument.yaml index 42d67065d..1063df056 100644 --- a/module/config/argument/argument.yaml +++ b/module/config/argument/argument.yaml @@ -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 ] diff --git a/module/config/argument/menu.json b/module/config/argument/menu.json index 2d57fb73b..c3c54dac6 100644 --- a/module/config/argument/menu.json +++ b/module/config/argument/menu.json @@ -19,5 +19,12 @@ "DataUpdate", "Freebies" ] + }, + "Rogue": { + "menu": "list", + "page": "setting", + "tasks": [ + "Rogue" + ] } } \ No newline at end of file diff --git a/module/config/argument/task.yaml b/module/config/argument/task.yaml index d10e640b8..e088d8f77 100644 --- a/module/config/argument/task.yaml +++ b/module/config/argument/task.yaml @@ -55,6 +55,7 @@ Rogue: tasks: Rogue: - Scheduler + - RogueWorld - RoguePath - RogueBlessing - RogueCurio diff --git a/module/config/config_generated.py b/module/config/config_generated.py index eff51cd67..e51128211 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -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> 回响构音:末日狂欢 > 回响构音:树苗长高舞' diff --git a/module/config/config_updater.py b/module/config/config_updater.py index 4c7b3b8ea..851210e56 100644 --- a/module/config/config_updater.py +++ b/module/config/config_updater.py @@ -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 diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index d9cd94c96..80fddad62 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -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": "", diff --git a/module/config/i18n/es-ES.json b/module/config/i18n/es-ES.json index 6b5e1c944..d170f2b00 100644 --- a/module/config/i18n/es-ES.json +++ b/module/config/i18n/es-ES.json @@ -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": "", diff --git a/module/config/i18n/ja-JP.json b/module/config/i18n/ja-JP.json index 097abce6d..c8e27557a 100644 --- a/module/config/i18n/ja-JP.json +++ b/module/config/i18n/ja-JP.json @@ -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", diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index b5d71d7a5..79585611c 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -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": "", diff --git a/module/config/i18n/zh-TW.json b/module/config/i18n/zh-TW.json index 9aa271e3f..a8cb2cee8 100644 --- a/module/config/i18n/zh-TW.json +++ b/module/config/i18n/zh-TW.json @@ -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": "", diff --git a/tasks/rogue/bleesing/bonus.py b/tasks/rogue/bleesing/bonus.py index 57821189c..900c0a6dd 100644 --- a/tasks/rogue/bleesing/bonus.py +++ b/tasks/rogue/bleesing/bonus.py @@ -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) diff --git a/tasks/rogue/entry/entry.py b/tasks/rogue/entry/entry.py index db1de79ea..211f64d64 100644 --- a/tasks/rogue/entry/entry.py +++ b/tasks/rogue/entry/entry.py @@ -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) diff --git a/tasks/rogue/event/event.py b/tasks/rogue/event/event.py index 7ae7b86ab..7cb998051 100644 --- a/tasks/rogue/event/event.py +++ b/tasks/rogue/event/event.py @@ -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( diff --git a/tasks/rogue/rogue.py b/tasks/rogue/rogue.py index 415684149..a3451542e 100644 --- a/tasks/rogue/rogue.py +++ b/tasks/rogue/rogue.py @@ -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() diff --git a/tasks/rogue/route/exit.py b/tasks/rogue/route/exit.py index c546128c6..341a2cf2e 100644 --- a/tasks/rogue/route/exit.py +++ b/tasks/rogue/route/exit.py @@ -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]}')