mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 16:47:03 +08:00
Add: Predict swipe to handle random game stuck
- Fix: Urgent commission in OS - Fix: More accurate predict_current_fleet - Opt: Increase edge tolerance in homography detection - Opt: Shorten swipe distance in OS, because swipe predict needs something in common
This commit is contained in:
@@ -7,8 +7,10 @@ from module.base.mask import Mask
|
||||
from module.base.utils import crop
|
||||
|
||||
UI_MASK = Mask(file='./assets/mask/MASK_MAP_UI.png')
|
||||
UI_MASK_OS = Mask(file='./assets/mask/MASK_OS_MAP_UI.png')
|
||||
TILE_CENTER = Mask(file='./assets/map_detection/TILE_CENTER.png')
|
||||
TILE_CORNER = Mask(file='./assets/map_detection/TILE_CORNER.png')
|
||||
DETECTING_AREA = (123, 55, 1280, 720)
|
||||
|
||||
|
||||
class Assets:
|
||||
@@ -24,11 +26,16 @@ class Assets:
|
||||
|
||||
@cached_property
|
||||
def ui_mask_in_map(self):
|
||||
DETECTING_AREA = (123, 55, 1280, 720)
|
||||
area = np.append(np.subtract(0, DETECTING_AREA[:2]), self.ui_mask.shape[::-1])
|
||||
# area = (-123, -55, 1157, 665)
|
||||
return crop(self.ui_mask, area)
|
||||
|
||||
@cached_property
|
||||
def ui_mask_os_in_map(self):
|
||||
area = np.append(np.subtract(0, DETECTING_AREA[:2]), self.ui_mask.shape[::-1])
|
||||
# area = (-123, -55, 1157, 665)
|
||||
return crop(UI_MASK_OS.image, area)
|
||||
|
||||
@cached_property
|
||||
def tile_center_image(self):
|
||||
return TILE_CENTER.image
|
||||
|
||||
Reference in New Issue
Block a user