mirror of
https://github.com/sui-feng-cb/AzurLaneAutoScript1.git
synced 2026-07-13 19:05:16 +08:00
Fix: drop support for new UI for submarine call timing
This commit is contained in:
@@ -6,12 +6,12 @@ from module.logger import logger
|
||||
|
||||
# BOSS detection areas
|
||||
# Classic UI: BOSS avatar frame right border
|
||||
BOSS_AVATAR_FRAME_RIGHT = (301, 13, 303, 89)
|
||||
BOSS_AVATAR_FRAME_RIGHT = (301, 15, 302, 80)
|
||||
BOSS_AVATAR_FRAME_COLOR = (24, 28, 24)
|
||||
# New UI: BOSS HP bar bottom border, middle-left portion
|
||||
# Color targets deep blue themes; need adjustment for other color schemes
|
||||
BOSS_HP_BAR_BORDER = (420, 48, 620, 50)
|
||||
BOSS_HP_BAR_COLOR = (31, 39, 61)
|
||||
# BOSS_HP_BAR_BORDER = (420, 48, 620, 50)
|
||||
# BOSS_HP_BAR_COLOR = (31, 39, 61)
|
||||
|
||||
|
||||
class SubmarineCall(ModuleBase):
|
||||
@@ -31,12 +31,12 @@ class SubmarineCall(ModuleBase):
|
||||
Detect whether BOSS has appeared by checking stable BOSS UI elements.
|
||||
"""
|
||||
# New UI: BOSS HP bar bottom border
|
||||
avg = get_color(self.device.image, BOSS_HP_BAR_BORDER)
|
||||
if color_similar(avg, BOSS_HP_BAR_COLOR, threshold=40):
|
||||
return True
|
||||
# avg = get_color(self.device.image, BOSS_HP_BAR_BORDER)
|
||||
# if color_similar(avg, BOSS_HP_BAR_COLOR, threshold=40):
|
||||
# return True
|
||||
# Classic UI: BOSS avatar frame right border
|
||||
frame = crop(self.device.image, BOSS_AVATAR_FRAME_RIGHT, copy=False)
|
||||
if image_color_count(frame, color=BOSS_AVATAR_FRAME_COLOR, count=55):
|
||||
if image_color_count(frame, color=BOSS_AVATAR_FRAME_COLOR, threshold=200, count=50):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user