1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-30 03:56:02 +08:00

Fix: Add TEMPLATE_STAGE_HALF_PERCENT to fix SP3

In event Vacation Lane SP3, when it's 50%, a part of the '%' is out of the stage icon, so use the left side of '%' to match stage entrance
This commit is contained in:
LmeSzinc
2020-11-26 22:46:58 +08:00
parent 2a49ecaa46
commit 15381e9dc3
8 changed files with 9 additions and 1 deletions

View File

@@ -106,6 +106,9 @@ class CampaignOcr(ModuleBase):
if 'normal' in self.config.STAGE_ENTRANCE:
digits += self.campaign_match_multi(TEMPLATE_STAGE_CLEAR, image, name_offset=(70, 12), name_size=(60, 14))
digits += self.campaign_match_multi(TEMPLATE_STAGE_PERCENT, image, name_offset=(45, 3), name_size=(60, 14))
if 'half' in self.config.STAGE_ENTRANCE:
digits += self.campaign_match_multi(
TEMPLATE_STAGE_HALF_PERCENT, image, name_offset=(48, 0), name_size=(60, 16))
if 'blue' in self.config.STAGE_ENTRANCE:
digits += self.campaign_match_multi(
TEMPLATE_STAGE_BLUE_PERCENT, image, extract_letters(image, letter=(255, 255, 255), threshold=153),
@@ -123,6 +126,9 @@ class CampaignOcr(ModuleBase):
if 'normal' in self.config.STAGE_ENTRANCE:
digits += self.campaign_match_multi(TEMPLATE_STAGE_CLEAR, image, name_offset=(75, 9), name_size=(60, 16))
digits += self.campaign_match_multi(TEMPLATE_STAGE_PERCENT, image, name_offset=(48, 0), name_size=(60, 16))
if 'half' in self.config.STAGE_ENTRANCE:
digits += self.campaign_match_multi(
TEMPLATE_STAGE_HALF_PERCENT, image, name_offset=(48, 0), name_size=(60, 16))
if 'blue' in self.config.STAGE_ENTRANCE:
digits += self.campaign_match_multi(
TEMPLATE_STAGE_BLUE_PERCENT, image, extract_letters(image, letter=(255, 255, 255), threshold=153),