mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Fix: Combat auto on cloud game
This commit is contained in:
parent
832b474a56
commit
576276e2da
Binary file not shown.
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 5.8 KiB |
@ -17,10 +17,10 @@ COMBAT_PAUSE = ButtonWrapper(
|
|||||||
name='COMBAT_PAUSE',
|
name='COMBAT_PAUSE',
|
||||||
share=Button(
|
share=Button(
|
||||||
file='./assets/share/combat/state/COMBAT_PAUSE.png',
|
file='./assets/share/combat/state/COMBAT_PAUSE.png',
|
||||||
area=(1218, 27, 1245, 53),
|
area=(1218, 43, 1245, 53),
|
||||||
search=(1198, 7, 1265, 73),
|
search=(1198, 23, 1265, 73),
|
||||||
color=(125, 129, 134),
|
color=(121, 126, 131),
|
||||||
button=(1218, 27, 1245, 53),
|
button=(1218, 43, 1245, 53),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
COMBAT_SPEED_2X = ButtonWrapper(
|
COMBAT_SPEED_2X = ButtonWrapper(
|
||||||
|
@ -54,6 +54,7 @@ class CombatState(UI):
|
|||||||
def combat_state_reset(self):
|
def combat_state_reset(self):
|
||||||
self._combat_auto_checked = False
|
self._combat_auto_checked = False
|
||||||
self._combat_2x_checked = False
|
self._combat_2x_checked = False
|
||||||
|
self._combat_click_interval.clear()
|
||||||
|
|
||||||
def handle_combat_state(self, auto=True, speed_2x=True):
|
def handle_combat_state(self, auto=True, speed_2x=True):
|
||||||
"""
|
"""
|
||||||
@ -65,6 +66,10 @@ class CombatState(UI):
|
|||||||
if self._combat_auto_checked and self._combat_2x_checked:
|
if self._combat_auto_checked and self._combat_2x_checked:
|
||||||
return False
|
return False
|
||||||
if not self.is_combat_executing():
|
if not self.is_combat_executing():
|
||||||
|
if not self._combat_auto_checked and auto:
|
||||||
|
if self._combat_click_interval.started() and not self._combat_click_interval.reached():
|
||||||
|
logger.info('Combat on going, _combat_auto_checked')
|
||||||
|
self._combat_auto_checked = True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not self._combat_2x_checked:
|
if not self._combat_2x_checked:
|
||||||
|
Loading…
Reference in New Issue
Block a user