mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 06:18:21 +08:00
Merge branch 'master' of https://github.com/LmeSzinc/AzurLaneAutoScript
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -2,7 +2,7 @@ from module.base.base import ModuleBase
|
||||
from module.base.timer import Timer
|
||||
from module.base.utils import color_bar_percentage
|
||||
from module.combat_ui.assets import (PAUSE, PAUSE_Christmas, PAUSE_Cyber, PAUSE_HolyLight, PAUSE_Iridescent_Fantasy,
|
||||
PAUSE_Neon, PAUSE_New, PAUSE_Nurse, PAUSE_Pharaoh)
|
||||
PAUSE_Neon, PAUSE_New, PAUSE_Nurse, PAUSE_Pharaoh, PAUSE_Devil)
|
||||
from module.exercise.assets import *
|
||||
from module.logger import logger
|
||||
|
||||
@@ -71,6 +71,7 @@ class HpDaemon(ModuleBase):
|
||||
PAUSE_HolyLight,
|
||||
PAUSE_Pharaoh,
|
||||
PAUSE_Nurse,
|
||||
PAUSE_Devil,
|
||||
]:
|
||||
self.attacker_hp = self._calculate_hp(image, area=ATTACKER_HP_AREA_New.area, reverse=True)
|
||||
self.defender_hp = self._calculate_hp(image, area=DEFENDER_HP_AREA_New.area, reverse=True)
|
||||
|
||||
Reference in New Issue
Block a user