Merge pull request #4356 from LmeSzinc/dev

Bug fix
This commit is contained in:
LmeSzinc 2024-11-06 20:35:24 +08:00 committed by GitHub
commit 1889ab1ac6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 39 additions and 18 deletions

View File

@ -218,3 +218,4 @@ To add a new event, add a new row in here, and run `python -m module.config.conf
| 20241017 | event 20220728 cn | Aquilifer's Ballade Rerun | 复刻雄鹰的叙事歌 | Aquilifer's Ballade Rerun | 鋼鷲の冒険譚(復刻) | - |
| 20241017 | coalition 20240627 | Welcome to Little Academy | - | - | - | 歡迎來到童心學院 |
| 20241024 | event 20241024 cn | Tempesta and the Sleeping Sea | 飓风与沉眠之海 | Tempesta and the Sleeping Sea | テンペスタと眠りし海 | - |
| 20241031 | event 20240829 cn | Whence Flowers Bear No Fruit | - | - | - | 埋葬於彼岸之花 |

View File

@ -1,8 +1,10 @@
from .campaign_base import CampaignBase, EventGrid
from module.base.utils import color_similarity_2d
from .campaign_base import CampaignBase, EventGrid as Grid
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from module.logger import logger
from .t1 import Config as ConfigBase
from module.template.assets import TEMPLATE_ENEMY_BOSS
MAP = CampaignMap('T4')
MAP.shape = 'J8'
@ -78,6 +80,20 @@ class Config(ConfigBase):
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.186, 1.208)
class EventGrid(Grid):
def predict_enemy_genre(self):
if self.enemy_scale:
return ''
image = self.relative_crop((-0, -0.2, 0.8, 0.2), shape=(40, 20))
image = color_similarity_2d(image, color=(255, 190, 84))
if image[image > 221].shape[0] > 30:
if TEMPLATE_ENEMY_BOSS.match(image, similarity=0.6, scaling=0.5):
return 'Siren_Siren'
return super().predict_enemy_genre()
class Campaign(CampaignBase):
MAP = MAP
ENEMY_FILTER = '1L > 1M > 1E > 1C > 2L > 2M > 2E > 2C > 3L > 3M > 3E > 3C'

View File

@ -1714,13 +1714,13 @@
],
"display": "hide",
"option_bold": [
"event_20230914_cn",
"event_20240829_cn",
"event_20241024_cn"
],
"cn": "event_20241024_cn",
"en": "event_20241024_cn",
"jp": "event_20241024_cn",
"tw": "event_20230914_cn"
"tw": "event_20240829_cn"
},
"Mode": {
"type": "select",
@ -2054,13 +2054,13 @@
"event_20241024_cn"
],
"option_bold": [
"event_20230914_cn",
"event_20240829_cn",
"event_20241024_cn"
],
"cn": "event_20241024_cn",
"en": "event_20241024_cn",
"jp": "event_20241024_cn",
"tw": "event_20230914_cn"
"tw": "event_20240829_cn"
},
"Mode": {
"type": "select",
@ -2509,13 +2509,13 @@
"event_20241024_cn"
],
"option_bold": [
"event_20230914_cn",
"event_20240829_cn",
"event_20241024_cn"
],
"cn": "event_20241024_cn",
"en": "event_20241024_cn",
"jp": "event_20241024_cn",
"tw": "event_20230914_cn"
"tw": "event_20240829_cn"
},
"Mode": {
"type": "select",
@ -3926,13 +3926,13 @@
"event_20241024_cn"
],
"option_bold": [
"event_20230914_cn",
"event_20240829_cn",
"event_20241024_cn"
],
"cn": "event_20241024_cn",
"en": "event_20241024_cn",
"jp": "event_20241024_cn",
"tw": "event_20230914_cn"
"tw": "event_20240829_cn"
},
"Mode": {
"type": "select",
@ -4398,13 +4398,13 @@
"event_20241024_cn"
],
"option_bold": [
"event_20230914_cn",
"event_20240829_cn",
"event_20241024_cn"
],
"cn": "event_20241024_cn",
"en": "event_20241024_cn",
"jp": "event_20241024_cn",
"tw": "event_20230914_cn"
"tw": "event_20240829_cn"
},
"Mode": {
"type": "select",
@ -4870,13 +4870,13 @@
"event_20241024_cn"
],
"option_bold": [
"event_20230914_cn",
"event_20240829_cn",
"event_20241024_cn"
],
"cn": "event_20241024_cn",
"en": "event_20241024_cn",
"jp": "event_20241024_cn",
"tw": "event_20230914_cn"
"tw": "event_20240829_cn"
},
"Mode": {
"type": "select",
@ -5342,13 +5342,13 @@
"event_20241024_cn"
],
"option_bold": [
"event_20230914_cn",
"event_20240829_cn",
"event_20241024_cn"
],
"cn": "event_20241024_cn",
"en": "event_20241024_cn",
"jp": "event_20241024_cn",
"tw": "event_20230914_cn"
"tw": "event_20240829_cn"
},
"Mode": {
"type": "select",
@ -5804,13 +5804,13 @@
"event_20241024_cn"
],
"option_bold": [
"event_20230914_cn",
"event_20240829_cn",
"event_20241024_cn"
],
"cn": "event_20241024_cn",
"en": "event_20241024_cn",
"jp": "event_20241024_cn",
"tw": "event_20230914_cn"
"tw": "event_20240829_cn"
},
"Mode": {
"type": "select",

View File

@ -731,7 +731,7 @@
"event_20240521_cn": "Light of the Martyrium",
"event_20240725_cn": "Interlude of Illusions",
"event_20240815_cn": "Windborne Steel Wings",
"event_20240829_cn": "Whence Flowers Bear No Fruit",
"event_20240829_cn": "埋葬於彼岸之花",
"event_20240912_cn": "Ode of Everblooming Crimson",
"event_20241024_cn": "Tempesta and the Sleeping Sea",
"raid_20200624": "特別演習埃塞克斯級(復刻)",

View File

@ -449,12 +449,16 @@ class RewardTacticalClass(Dock):
# Popups
if self.appear_then_click(REWARD_2, offset=(20, 20), interval=3):
self.interval_reset(REWARD_2_WHITE)
continue
if self.appear_then_click(REWARD_2_WHITE, offset=(20, 20), interval=3):
self.interval_reset(REWARD_2)
continue
if self.appear_then_click(REWARD_GOTO_TACTICAL, offset=(20, 20), interval=3):
self.interval_reset(REWARD_GOTO_TACTICAL_WHITE)
continue
if self.appear_then_click(REWARD_GOTO_TACTICAL_WHITE, offset=(20, 20), interval=3):
self.interval_reset(REWARD_GOTO_TACTICAL)
continue
if self.ui_main_appear_then_click(page_reward, interval=3):
continue