diff --git a/assets/cn/template/TEMPLATE_STAGE_HALF_PERCENT.png b/assets/cn/template/TEMPLATE_STAGE_HALF_PERCENT.png new file mode 100644 index 000000000..fe70f458e Binary files /dev/null and b/assets/cn/template/TEMPLATE_STAGE_HALF_PERCENT.png differ diff --git a/assets/en/template/TEMPLATE_STAGE_HALF_PERCENT.png b/assets/en/template/TEMPLATE_STAGE_HALF_PERCENT.png new file mode 100644 index 000000000..fe70f458e Binary files /dev/null and b/assets/en/template/TEMPLATE_STAGE_HALF_PERCENT.png differ diff --git a/assets/jp/template/TEMPLATE_STAGE_HALF_PERCENT.png b/assets/jp/template/TEMPLATE_STAGE_HALF_PERCENT.png new file mode 100644 index 000000000..fe70f458e Binary files /dev/null and b/assets/jp/template/TEMPLATE_STAGE_HALF_PERCENT.png differ diff --git a/assets/tw/template/TEMPLATE_STAGE_HALF_PERCENT.png b/assets/tw/template/TEMPLATE_STAGE_HALF_PERCENT.png new file mode 100644 index 000000000..fe70f458e Binary files /dev/null and b/assets/tw/template/TEMPLATE_STAGE_HALF_PERCENT.png differ diff --git a/campaign/event_20201126_cn/sp1.py b/campaign/event_20201126_cn/sp1.py index 577d066d6..a61ea618e 100644 --- a/campaign/event_20201126_cn/sp1.py +++ b/campaign/event_20201126_cn/sp1.py @@ -49,6 +49,7 @@ class Config: MAP_HAS_AMBUSH = False # ===== End of generated config ===== + STAGE_ENTRANCE = ['normal', 'half'] # normal, blue, half MAP_SWIPE_MULTIPLY = 1.866 MAP_SWIPE_MULTIPLY_MINITOUCH = 1.804 diff --git a/module/campaign/campaign_ocr.py b/module/campaign/campaign_ocr.py index ef6c21ff5..bec3a6605 100644 --- a/module/campaign/campaign_ocr.py +++ b/module/campaign/campaign_ocr.py @@ -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), diff --git a/module/config/config.py b/module/config/config.py index 28affcf4d..9894c7ebc 100644 --- a/module/config/config.py +++ b/module/config/config.py @@ -145,7 +145,7 @@ class AzurLaneConfig: STAR_REQUIRE_2 = 2 STAR_REQUIRE_3 = 3 # In Dreamwaker's Butterfly (event_20200917) add new stage entrance icons, called `blue`. - STAGE_ENTRANCE = ['normal'] # normal, blue + STAGE_ENTRANCE = ['normal'] # normal, blue, half """ module.event diff --git a/module/template/assets.py b/module/template/assets.py index 21ca6f69e..bd89d38c2 100644 --- a/module/template/assets.py +++ b/module/template/assets.py @@ -72,6 +72,7 @@ TEMPLATE_SIREN_Z2 = Template(file={'cn': './assets/cn/template/TEMPLATE_SIREN_Z2 TEMPLATE_STAGE_BLUE_CLEAR = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_BLUE_CLEAR.png', 'en': './assets/en/template/TEMPLATE_STAGE_BLUE_CLEAR.png', 'jp': './assets/jp/template/TEMPLATE_STAGE_BLUE_CLEAR.png', 'tw': './assets/tw/template/TEMPLATE_STAGE_BLUE_CLEAR.png'}) TEMPLATE_STAGE_BLUE_PERCENT = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_BLUE_PERCENT.png', 'en': './assets/en/template/TEMPLATE_STAGE_BLUE_PERCENT.png', 'jp': './assets/jp/template/TEMPLATE_STAGE_BLUE_PERCENT.png', 'tw': './assets/tw/template/TEMPLATE_STAGE_BLUE_PERCENT.png'}) TEMPLATE_STAGE_CLEAR = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_CLEAR.png', 'en': './assets/en/template/TEMPLATE_STAGE_CLEAR.png', 'jp': './assets/jp/template/TEMPLATE_STAGE_CLEAR.png', 'tw': './assets/tw/template/TEMPLATE_STAGE_CLEAR.png'}) +TEMPLATE_STAGE_HALF_PERCENT = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_HALF_PERCENT.png', 'en': './assets/en/template/TEMPLATE_STAGE_HALF_PERCENT.png', 'jp': './assets/jp/template/TEMPLATE_STAGE_HALF_PERCENT.png', 'tw': './assets/tw/template/TEMPLATE_STAGE_HALF_PERCENT.png'}) TEMPLATE_STAGE_PERCENT = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_PERCENT.png', 'en': './assets/en/template/TEMPLATE_STAGE_PERCENT.png', 'jp': './assets/jp/template/TEMPLATE_STAGE_PERCENT.png', 'tw': './assets/tw/template/TEMPLATE_STAGE_PERCENT.png'}) TEMPLATE_STAGE_SOS = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_SOS.png', 'en': './assets/en/template/TEMPLATE_STAGE_SOS.png', 'jp': './assets/jp/template/TEMPLATE_STAGE_SOS.png', 'tw': './assets/cn/template/TEMPLATE_STAGE_SOS.png'}) TEMPLATE_SUBMARINE = Template(file={'cn': './assets/cn/template/TEMPLATE_SUBMARINE.png', 'en': './assets/en/template/TEMPLATE_SUBMARINE.png', 'jp': './assets/jp/template/TEMPLATE_SUBMARINE.png', 'tw': './assets/tw/template/TEMPLATE_SUBMARINE.png'})