mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-16 11:37:23 +08:00
@@ -1,5 +1,3 @@
|
||||
import module.config.server as server
|
||||
|
||||
from module.base.button import ButtonGrid
|
||||
from module.base.decorator import cached_property
|
||||
from module.base.timer import Timer
|
||||
@@ -22,12 +20,8 @@ DOCK_FAVOURITE.add_status('off', check_button=COMMON_SHIP_FILTER_DISABLE)
|
||||
CARD_GRIDS = ButtonGrid(
|
||||
origin=(93, 76), delta=(164 + 2 / 3, 227), button_shape=(138, 204), grid_shape=(7, 2), name='CARD')
|
||||
CARD_RARITY_GRIDS = CARD_GRIDS.crop(area=(0, 0, 138, 5), name='RARITY')
|
||||
if server.server != 'jp':
|
||||
CARD_LEVEL_GRIDS = CARD_GRIDS.crop(area=(77, 5, 138, 27), name='LEVEL')
|
||||
CARD_EMOTION_GRIDS = CARD_GRIDS.crop(area=(23, 29, 48, 52), name='EMOTION')
|
||||
else:
|
||||
CARD_LEVEL_GRIDS = CARD_GRIDS.crop(area=(74, 5, 136, 27), name='LEVEL')
|
||||
CARD_EMOTION_GRIDS = CARD_GRIDS.crop(area=(31, 29, 61, 52), name='EMOTION')
|
||||
CARD_LEVEL_GRIDS = CARD_GRIDS.crop(area=(77, 5, 138, 27), name='LEVEL')
|
||||
CARD_EMOTION_GRIDS = CARD_GRIDS.crop(area=(23, 29, 48, 52), name='EMOTION')
|
||||
|
||||
DOCK_SCROLL = Scroll(DOCK_SCROLL, color=(247, 211, 66), name='DOCK_SCROLL')
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@ from typing import Any, Dict, List, Tuple, Union
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
||||
import module.config.server as server
|
||||
|
||||
from module.base.button import ButtonGrid
|
||||
from module.base.utils import color_similar, crop, get_color, limit_in
|
||||
from module.combat.level import LevelOcr
|
||||
@@ -134,12 +132,8 @@ class EmotionScanner(Scanner):
|
||||
super().__init__()
|
||||
self._results = []
|
||||
self.grids = CARD_EMOTION_GRIDS
|
||||
if server.server != 'jp':
|
||||
self.ocr_model = EmotionDigit(self.grids.buttons,
|
||||
self.ocr_model = EmotionDigit(self.grids.buttons,
|
||||
name='DOCK_EMOTION_OCR', threshold=176)
|
||||
else:
|
||||
self.ocr_model = EmotionDigit(self.grids.buttons,
|
||||
name='DOCK_EMOTION_OCR', threshold=221)
|
||||
|
||||
def _scan(self, image) -> List:
|
||||
return self.ocr_model.ocr(image)
|
||||
|
||||
Reference in New Issue
Block a user