mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-08 05:51:07 +08:00
Fix: Add click interval in exercise combat to avoid GameTooManyClickError
This commit is contained in:
@@ -49,25 +49,25 @@ class ExerciseCombat(HpDaemon, OpponentChoose, ExerciseEquipment):
|
|||||||
|
|
||||||
if not self.is_combat_executing():
|
if not self.is_combat_executing():
|
||||||
# Finish - S or D rank
|
# Finish - S or D rank
|
||||||
if self.appear_then_click(BATTLE_STATUS_S):
|
if self.appear_then_click(BATTLE_STATUS_S, interval=1):
|
||||||
success = True
|
success = True
|
||||||
end = True
|
end = True
|
||||||
continue
|
continue
|
||||||
if self.appear_then_click(BATTLE_STATUS_D):
|
if self.appear_then_click(BATTLE_STATUS_D, interval=1):
|
||||||
success = True
|
success = True
|
||||||
end = True
|
end = True
|
||||||
logger.info("Exercise LOST")
|
logger.info("Exercise LOST")
|
||||||
continue
|
continue
|
||||||
if self.appear_then_click(GET_ITEMS_1):
|
if self.appear_then_click(GET_ITEMS_1, interval=1):
|
||||||
continue
|
continue
|
||||||
if self.appear(EXP_INFO_S):
|
if self.appear(EXP_INFO_S, interval=1):
|
||||||
self.device.click(CLICK_SAFE_AREA)
|
self.device.click(CLICK_SAFE_AREA)
|
||||||
continue
|
continue
|
||||||
if self.appear(EXP_INFO_D):
|
if self.appear(EXP_INFO_D, interval=1):
|
||||||
self.device.click(CLICK_SAFE_AREA)
|
self.device.click(CLICK_SAFE_AREA)
|
||||||
continue
|
continue
|
||||||
# Last D rank screen
|
# Last D rank screen
|
||||||
if self.appear_then_click(OPTS_INFO_D, offset=(30, 30)):
|
if self.appear_then_click(OPTS_INFO_D, offset=(30, 30), interval=1):
|
||||||
success = True
|
success = True
|
||||||
end = True
|
end = True
|
||||||
logger.info("Exercise LOST")
|
logger.info("Exercise LOST")
|
||||||
@@ -77,8 +77,7 @@ class ExerciseCombat(HpDaemon, OpponentChoose, ExerciseEquipment):
|
|||||||
if not end:
|
if not end:
|
||||||
if self._at_low_hp(image=self.device.image):
|
if self._at_low_hp(image=self.device.image):
|
||||||
logger.info('Exercise quit')
|
logger.info('Exercise quit')
|
||||||
if self.appear_then_click(PAUSE):
|
if self.appear_then_click(PAUSE, interval=0.5):
|
||||||
self.device.sleep(0.3)
|
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
if show_hp_timer.reached():
|
if show_hp_timer.reached():
|
||||||
|
|||||||
Reference in New Issue
Block a user