mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-26 02:11:06 +00:00
Opt: Choose the first event for now
This commit is contained in:
parent
e8f3fd2a18
commit
62150e60b9
@ -164,6 +164,7 @@
|
|||||||
},
|
},
|
||||||
"RoguePath": {
|
"RoguePath": {
|
||||||
"Path": "The_Hunt",
|
"Path": "The_Hunt",
|
||||||
|
"DomainStrategy": "fight",
|
||||||
"Bonus": "Blessing Cosmos",
|
"Bonus": "Blessing Cosmos",
|
||||||
"PresetResonanceFilter": "preset-1",
|
"PresetResonanceFilter": "preset-1",
|
||||||
"ResonanceSelectionStrategy": "follow-presets",
|
"ResonanceSelectionStrategy": "follow-presets",
|
||||||
|
@ -1147,6 +1147,14 @@
|
|||||||
"Elation"
|
"Elation"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"DomainStrategy": {
|
||||||
|
"type": "select",
|
||||||
|
"value": "fight",
|
||||||
|
"option": [
|
||||||
|
"fight",
|
||||||
|
"leave"
|
||||||
|
]
|
||||||
|
},
|
||||||
"Bonus": {
|
"Bonus": {
|
||||||
"type": "select",
|
"type": "select",
|
||||||
"value": "Blessing Cosmos",
|
"value": "Blessing Cosmos",
|
||||||
|
@ -198,6 +198,9 @@ RoguePath:
|
|||||||
Path:
|
Path:
|
||||||
value: The_Hunt
|
value: The_Hunt
|
||||||
option: [ Preservation, Remembrance, Nihility, Abundance, The_Hunt, Destruction, Elation ]
|
option: [ Preservation, Remembrance, Nihility, Abundance, The_Hunt, Destruction, Elation ]
|
||||||
|
DomainStrategy:
|
||||||
|
value: fight
|
||||||
|
option: [ fight, leave ]
|
||||||
Bonus:
|
Bonus:
|
||||||
value: Blessing Cosmos
|
value: Blessing Cosmos
|
||||||
option: [ Blessing Cosmos, Miracle Cosmos, Fragmented Cosmos ]
|
option: [ Blessing Cosmos, Miracle Cosmos, Fragmented Cosmos ]
|
||||||
|
@ -115,6 +115,7 @@ class GeneratedConfig:
|
|||||||
|
|
||||||
# Group `RoguePath`
|
# Group `RoguePath`
|
||||||
RoguePath_Path = 'The_Hunt' # Preservation, Remembrance, Nihility, Abundance, The_Hunt, Destruction, Elation
|
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_Bonus = 'Blessing Cosmos' # Blessing Cosmos, Miracle Cosmos, Fragmented Cosmos
|
||||||
RoguePath_PresetResonanceFilter = 'preset-1' # preset-1, custom
|
RoguePath_PresetResonanceFilter = 'preset-1' # preset-1, custom
|
||||||
RoguePath_ResonanceSelectionStrategy = 'follow-presets' # follow-presets, unrecorded-first, before-random
|
RoguePath_ResonanceSelectionStrategy = 'follow-presets' # follow-presets, unrecorded-first, before-random
|
||||||
|
@ -767,6 +767,12 @@
|
|||||||
"Destruction": "Destruction",
|
"Destruction": "Destruction",
|
||||||
"Elation": "Elation"
|
"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": {
|
"Bonus": {
|
||||||
"name": "Blessings of Trailblaze",
|
"name": "Blessings of Trailblaze",
|
||||||
"help": "",
|
"help": "",
|
||||||
|
@ -767,6 +767,12 @@
|
|||||||
"Destruction": "Destrucción",
|
"Destruction": "Destrucción",
|
||||||
"Elation": "Exultació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": {
|
"Bonus": {
|
||||||
"name": "Bendiciones",
|
"name": "Bendiciones",
|
||||||
"help": "",
|
"help": "",
|
||||||
|
@ -767,6 +767,12 @@
|
|||||||
"Destruction": "Destruction",
|
"Destruction": "Destruction",
|
||||||
"Elation": "Elation"
|
"Elation": "Elation"
|
||||||
},
|
},
|
||||||
|
"DomainStrategy": {
|
||||||
|
"name": "RoguePath.DomainStrategy.name",
|
||||||
|
"help": "RoguePath.DomainStrategy.help",
|
||||||
|
"fight": "fight",
|
||||||
|
"leave": "leave"
|
||||||
|
},
|
||||||
"Bonus": {
|
"Bonus": {
|
||||||
"name": "RoguePath.Bonus.name",
|
"name": "RoguePath.Bonus.name",
|
||||||
"help": "RoguePath.Bonus.help",
|
"help": "RoguePath.Bonus.help",
|
||||||
|
@ -767,6 +767,12 @@
|
|||||||
"Destruction": "毁灭",
|
"Destruction": "毁灭",
|
||||||
"Elation": "欢愉"
|
"Elation": "欢愉"
|
||||||
},
|
},
|
||||||
|
"DomainStrategy": {
|
||||||
|
"name": "区域策略",
|
||||||
|
"help": "偏好战斗:适用于平民队伍,通关时间较长\n偏好事件:需要高练队伍,通关时间较短",
|
||||||
|
"fight": "偏好战斗",
|
||||||
|
"leave": "偏好事件"
|
||||||
|
},
|
||||||
"Bonus": {
|
"Bonus": {
|
||||||
"name": "开拓祝福三选一",
|
"name": "开拓祝福三选一",
|
||||||
"help": "",
|
"help": "",
|
||||||
|
@ -767,6 +767,12 @@
|
|||||||
"Destruction": "毀滅",
|
"Destruction": "毀滅",
|
||||||
"Elation": "歡愉"
|
"Elation": "歡愉"
|
||||||
},
|
},
|
||||||
|
"DomainStrategy": {
|
||||||
|
"name": "區域策略",
|
||||||
|
"help": "偏好戰鬥:適用於平民隊伍,通關時間較長\n偏好事件:需要高練隊伍,通關時間較短",
|
||||||
|
"fight": "偏好戰鬥",
|
||||||
|
"leave": "偏好事件"
|
||||||
|
},
|
||||||
"Bonus": {
|
"Bonus": {
|
||||||
"name": "開拓祝福三選一",
|
"name": "開拓祝福三選一",
|
||||||
"help": "",
|
"help": "",
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from module.base.button import ClickButton
|
||||||
from module.base.utils import area_limit
|
from module.base.utils import area_limit
|
||||||
from module.logger import logger
|
from module.logger import logger
|
||||||
from tasks.rogue.assets.assets_rogue_event import CHOOSE_OPTION, CHOOSE_OPTION_CONFIRM, CHOOSE_STORY, OCR_EVENT
|
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)
|
self.interval_reset(CHOOSE_OPTION)
|
||||||
return True
|
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
|
return False
|
||||||
|
|
||||||
|
def _event_option_filter(self, options: list[ClickButton]) -> ClickButton:
|
||||||
|
# TODO: OCR options instead of choosing the last one
|
||||||
|
return options[-1]
|
||||||
|
Loading…
Reference in New Issue
Block a user