1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 00:28:20 +08:00

Fix: handle_game_tips if only the background is dark (#5103)

This commit is contained in:
guoh064
2025-09-11 22:30:37 +08:00
committed by GitHub
parent 67985322a0
commit 5e027ec923

View File

@@ -499,13 +499,16 @@ class InfoHandler(ModuleBase):
Returns:
bool: If handled
"""
if self.appear(GAME_TIPS, offset=(20, 20), interval=2):
if self.appear(GAME_TIPS, offset=(20, 20), interval=2) and self.image_color_count(
GAME_TIPS, color=(40, 40, 40), threshold=240, count=50):
self.device.click(GAME_TIPS)
return True
if self.appear(GAME_TIPS3, offset=(20, 20), interval=2):
if self.appear(GAME_TIPS3, offset=(20, 20), interval=2) and self.image_color_count(
GAME_TIPS3, color=(40, 40, 40), threshold=240, count=50):
self.device.click(GAME_TIPS)
return True
if self.appear(GAME_TIPS4, offset=(20, 20), interval=2):
if self.appear(GAME_TIPS4, offset=(20, 20), interval=2) and self.image_color_count(
GAME_TIPS4, color=(40, 40, 40), threshold=240, count=50):
self.device.click(GAME_TIPS)
return True