mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-27 10:36:23 +00:00
bea05d396e
- 开荒模式移动至出击设置 - 增加开荒模式自动启用, 无脑开就完事了 - 将透视识别参数放到了config里, 这样就可以用地图config覆盖了 - 适配小地图模式, 参数抄A1就行了 - 修复了章节名OCR的识别位置 - 修复了开荒会把BOSS当作精英打问题 - 增加战斗中的剧情跳过 - 注释掉了截图和点击的retry - 增加了捕捉目标点超出移动范围
63 lines
2.0 KiB
Python
63 lines
2.0 KiB
Python
from module.combat.combat import Combat
|
|
from module.daemon.assets import *
|
|
from module.handler.ambush import MAP_AMBUSH_EVADE
|
|
from module.handler.mystery import MysteryHandler
|
|
from module.handler.story import StoryHandler
|
|
from module.handler.urgent_commission import UrgentCommissionHandler
|
|
from module.map.map_fleet_preparation import FleetPreparation
|
|
|
|
|
|
class AzurLaneDaemon(FleetPreparation, Combat, UrgentCommissionHandler, MysteryHandler,
|
|
StoryHandler):
|
|
def daemon(self):
|
|
|
|
while 1:
|
|
self.device.screenshot()
|
|
|
|
# If is running a combat, do nothing.
|
|
if self.is_combat_executing():
|
|
continue
|
|
|
|
# Combat
|
|
if self.combat_appear():
|
|
# if self.handle_combat_automation_set(auto=True):
|
|
# continue
|
|
# self.device.click(BATTLE_PREPARATION)
|
|
self.combat_preparation()
|
|
if self.handle_battle_status(save_get_items=False):
|
|
self.combat_status(save_get_items=False, expected_end='no_searching')
|
|
continue
|
|
|
|
# Map operation
|
|
if self.appear_then_click(MAP_AMBUSH_EVADE):
|
|
self.device.sleep(1)
|
|
continue
|
|
if self.appear_then_click(STRATEGY_OPEN):
|
|
continue
|
|
|
|
# Map preparation
|
|
if self.config.ENABLE_SEMI_MAP_PREPARATION:
|
|
if self.appear_then_click(MAP_PREPARATION, interval=2):
|
|
continue
|
|
if self.appear_then_click(FLEET_PREPARATION, interval=2):
|
|
continue
|
|
|
|
# Retire
|
|
pass
|
|
|
|
# Emotion
|
|
pass
|
|
|
|
# Urgent commission
|
|
if self.handle_urgent_commission(save_get_items=False):
|
|
continue
|
|
|
|
# Story
|
|
if self.config.ENABLE_SEMI_STORY_SKIP:
|
|
self.story_skip()
|
|
|
|
# End
|
|
# No end condition, stop it manually.
|
|
|
|
return True
|