Opt: Choose the first event for now

This commit is contained in:
LmeSzinc 2023-10-04 21:23:46 +08:00
parent e8f3fd2a18
commit 62150e60b9
10 changed files with 54 additions and 1 deletions

View File

@ -164,6 +164,7 @@
},
"RoguePath": {
"Path": "The_Hunt",
"DomainStrategy": "fight",
"Bonus": "Blessing Cosmos",
"PresetResonanceFilter": "preset-1",
"ResonanceSelectionStrategy": "follow-presets",

View File

@ -1147,6 +1147,14 @@
"Elation"
]
},
"DomainStrategy": {
"type": "select",
"value": "fight",
"option": [
"fight",
"leave"
]
},
"Bonus": {
"type": "select",
"value": "Blessing Cosmos",

View File

@ -198,6 +198,9 @@ RoguePath:
Path:
value: The_Hunt
option: [ Preservation, Remembrance, Nihility, Abundance, The_Hunt, Destruction, Elation ]
DomainStrategy:
value: fight
option: [ fight, leave ]
Bonus:
value: Blessing Cosmos
option: [ Blessing Cosmos, Miracle Cosmos, Fragmented Cosmos ]

View File

@ -115,6 +115,7 @@ class GeneratedConfig:
# Group `RoguePath`
RoguePath_Path = 'The_Hunt' # Preservation, Remembrance, Nihility, Abundance, The_Hunt, Destruction, Elation
RoguePath_DomainStrategy = 'fight' # fight, leave
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

View File

@ -767,6 +767,12 @@
"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",
"fight": "Prefer Combat",
"leave": "Prefer Occurrence"
},
"Bonus": {
"name": "Blessings of Trailblaze",
"help": "",

View File

@ -767,6 +767,12 @@
"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",
"fight": "Prefiero Batalla",
"leave": "Prefiero Evento"
},
"Bonus": {
"name": "Bendiciones",
"help": "",

View File

@ -767,6 +767,12 @@
"Destruction": "Destruction",
"Elation": "Elation"
},
"DomainStrategy": {
"name": "RoguePath.DomainStrategy.name",
"help": "RoguePath.DomainStrategy.help",
"fight": "fight",
"leave": "leave"
},
"Bonus": {
"name": "RoguePath.Bonus.name",
"help": "RoguePath.Bonus.help",

View File

@ -767,6 +767,12 @@
"Destruction": "毁灭",
"Elation": "欢愉"
},
"DomainStrategy": {
"name": "区域策略",
"help": "偏好战斗:适用于平民队伍,通关时间较长\n偏好事件需要高练队伍通关时间较短",
"fight": "偏好战斗",
"leave": "偏好事件"
},
"Bonus": {
"name": "开拓祝福三选一",
"help": "",

View File

@ -767,6 +767,12 @@
"Destruction": "毀滅",
"Elation": "歡愉"
},
"DomainStrategy": {
"name": "區域策略",
"help": "偏好戰鬥:適用於平民隊伍,通關時間較長\n偏好事件需要高練隊伍通關時間較短",
"fight": "偏好戰鬥",
"leave": "偏好事件"
},
"Bonus": {
"name": "開拓祝福三選一",
"help": "",

View File

@ -1,3 +1,4 @@
from module.base.button import ClickButton
from module.base.utils import area_limit
from module.logger import logger
from tasks.rogue.assets.assets_rogue_event import CHOOSE_OPTION, CHOOSE_OPTION_CONFIRM, CHOOSE_STORY, OCR_EVENT
@ -39,5 +40,14 @@ class RogueEvent(RogueUI):
self.interval_reset(CHOOSE_OPTION)
return True
# ocr, OCR_EVENT
if self.interval_is_reached(CHOOSE_OPTION, interval=2):
option = self._event_option_filter(options)
self.device.click(option)
self.interval_reset(CHOOSE_OPTION)
return True
return False
def _event_option_filter(self, options: list[ClickButton]) -> ClickButton:
# TODO: OCR options instead of choosing the last one
return options[-1]