mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-11 22:08:20 +08:00
Refactor: Use numpy image cache instead of pillow image
This commit is contained in:
@@ -15,7 +15,7 @@ class ExerciseCombat(HpDaemon, OpponentChoose, ExerciseEquipment):
|
||||
Returns:
|
||||
bool:
|
||||
"""
|
||||
return self.appear(PAUSE) and np.max(self.image_area(PAUSE_DOUBLE_CHECK)) < 153
|
||||
return self.appear(PAUSE) and np.max(self.image_crop(PAUSE_DOUBLE_CHECK)) < 153
|
||||
|
||||
def _combat_preparation(self):
|
||||
logger.info('Combat preparation')
|
||||
|
||||
@@ -24,7 +24,7 @@ class HpDaemon(ModuleBase):
|
||||
Returns:
|
||||
float: HP. 0 to 1.
|
||||
"""
|
||||
# bar = np.array(image.crop(area))
|
||||
# bar = crop(image, area)
|
||||
# length = bar.shape[1]
|
||||
# bar = np.swapaxes(bar, 0, 1)
|
||||
# bar = bar[::-1, :, :] if reverse else bar
|
||||
|
||||
Reference in New Issue
Block a user