mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Fix: Check exercise combat end before handlers
This commit is contained in:
parent
6462e68a16
commit
ff425a4ebe
@ -53,6 +53,13 @@ class ExerciseCombat(HpDaemon, OpponentChoose, ExerciseEquipment, Combat):
|
||||
while 1:
|
||||
self.device.screenshot()
|
||||
|
||||
# End
|
||||
if self._in_exercise() or self.appear(BATTLE_PREPARATION, offset=(20, 20)):
|
||||
logger.hr('Combat end')
|
||||
if not end:
|
||||
logger.warning('Combat ended without end conditions detected')
|
||||
break
|
||||
|
||||
p = self.is_combat_executing()
|
||||
if p:
|
||||
if end:
|
||||
@ -108,13 +115,6 @@ class ExerciseCombat(HpDaemon, OpponentChoose, ExerciseEquipment, Combat):
|
||||
show_hp_timer.reset()
|
||||
self._show_hp()
|
||||
|
||||
# End
|
||||
if self._in_exercise() or self.appear(BATTLE_PREPARATION, offset=(20, 20)):
|
||||
logger.hr('Combat end')
|
||||
if not end:
|
||||
logger.warning('Combat ended without end conditions detected')
|
||||
break
|
||||
|
||||
return success
|
||||
|
||||
def _choose_opponent(self, index, skip_first_screenshot=True):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user