StarRailCopilot/module/combat/combat_manual.py
LmeSzinc 964c2b3e56 Add: 增加战斗模式选择, 自律, 手操, 中路站桩
- 修复了透视识别错误保存选项无效的问题
2020-04-11 21:12:54 +08:00

28 lines
749 B
Python

from module.base.base import ModuleBase
from module.combat.assets import MOVE_DOWN
class CombatManual(ModuleBase):
auto_mode_checked = False
manual_executed = False
def combat_manual_reset(self):
self.manual_executed = False
def handle_combat_stand_still_in_the_middle(self):
if self.config.COMBAT_AUTO_MODE != 'stand_still_in_the_middle':
return False
self.device.long_click(MOVE_DOWN, duration=0.8)
return True
def handle_combat_manual(self):
if self.manual_executed or not self.auto_mode_checked:
return False
if self.handle_combat_stand_still_in_the_middle():
self.manual_executed = True
return True
return False