mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-24 10:09:04 +08:00
Fix: Check exercise combat end before handlers
This commit is contained in:
@@ -53,6 +53,13 @@ class ExerciseCombat(HpDaemon, OpponentChoose, ExerciseEquipment, Combat):
|
|||||||
while 1:
|
while 1:
|
||||||
self.device.screenshot()
|
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()
|
p = self.is_combat_executing()
|
||||||
if p:
|
if p:
|
||||||
if end:
|
if end:
|
||||||
@@ -108,13 +115,6 @@ class ExerciseCombat(HpDaemon, OpponentChoose, ExerciseEquipment, Combat):
|
|||||||
show_hp_timer.reset()
|
show_hp_timer.reset()
|
||||||
self._show_hp()
|
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
|
return success
|
||||||
|
|
||||||
def _choose_opponent(self, index, skip_first_screenshot=True):
|
def _choose_opponent(self, index, skip_first_screenshot=True):
|
||||||
|
|||||||
Reference in New Issue
Block a user