Просмотр исходного кода

Merge pull request #2 from LGG686/dev

Dev
yuyuyuyuyu 8 месяцев назад
Родитель
Сommit
3cf4c2a47a
70 измененных файлов с 648 добавлено и 82 удалено
  1. 5 1
      assets/i18n/zh-CN.json
  2. 1 1
      module/config/config_manual.py
  3. 2 2
      module/config/config_menu.py
  4. 3 0
      module/config/config_model.py
  5. 4 11
      tasks/AbyssShadows/script_task.py
  6. 13 0
      tasks/Component/Costume/assets.py
  7. 8 3
      tasks/Component/Costume/config.py
  8. 9 3
      tasks/Component/Costume/costume_base.py
  9. 47 0
      tasks/Component/Costume/main14/image.json
  10. BIN
      tasks/Component/Costume/main14/main14_check_main_14.png
  11. BIN
      tasks/Component/Costume/main14/main14_main_goto_exploration_14.png
  12. BIN
      tasks/Component/Costume/main14/main14_main_goto_summon_14.png
  13. BIN
      tasks/Component/Costume/main14/main14_main_goto_town_14.png
  14. BIN
      tasks/Component/Costume/main14/main14_pet_house_14.png
  15. 15 0
      tasks/Component/CostumeBattle/assets.py
  16. BIN
      tasks/Component/CostumeBattle/battle12/battle12_de_win_12.png
  17. BIN
      tasks/Component/CostumeBattle/battle12/battle12_exit_12.png
  18. BIN
      tasks/Component/CostumeBattle/battle12/battle12_false_12.png
  19. BIN
      tasks/Component/CostumeBattle/battle12/battle12_friends_12.png
  20. BIN
      tasks/Component/CostumeBattle/battle12/battle12_local_12.png
  21. BIN
      tasks/Component/CostumeBattle/battle12/battle12_win_12.png
  22. 56 0
      tasks/Component/CostumeBattle/battle12/image.json
  23. 50 7
      tasks/Component/CostumeShikigami/assets.py
  24. 14 14
      tasks/Component/CostumeShikigami/sk6/image.json
  25. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_1_6.png
  26. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_2_6.png
  27. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_3_6.png
  28. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_4_6.png
  29. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_5_6.png
  30. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_6_6.png
  31. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_7_6.png
  32. 182 0
      tasks/Component/CostumeShikigami/sk8/image.json
  33. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_check_records_8.png
  34. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_record_soul_back_8.png
  35. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_1_8.png
  36. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_2_8.png
  37. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_3_8.png
  38. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_4_8.png
  39. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_5_8.png
  40. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_6_8.png
  41. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_7_8.png
  42. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_in_8.png
  43. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_click_present_8.png
  44. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_1_8.png
  45. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_2_8.png
  46. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_3_8.png
  47. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_4_8.png
  48. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_sure_8.png
  49. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_team_preset_8.png
  50. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_soul_preset_8.png
  51. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_st_replace_8.png
  52. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_st_souls_8.png
  53. 3 1
      tasks/Component/GeneralInvite/assets.py
  54. BIN
      tasks/Component/GeneralInvite/gi/gi_flag_2_on.png
  55. 3 3
      tasks/Component/GeneralInvite/gi/image.json
  56. 7 7
      tasks/Component/SwitchSoul/assets.py
  57. 14 14
      tasks/Component/SwitchSoul/ss/click.json
  58. 1 1
      tasks/GameUi/assets.py
  59. BIN
      tasks/GameUi/page/page_check_summon.png
  60. 2 2
      tasks/GameUi/page/page_img_supplement.json
  61. 12 0
      tasks/GuildActivityMonitor/assets.py
  62. 27 0
      tasks/GuildActivityMonitor/config.py
  63. 134 0
      tasks/GuildActivityMonitor/script_task.py
  64. 1 1
      tasks/Restart/assets.py
  65. 2 2
      tasks/Restart/harvest/image.json
  66. 2 2
      tasks/Restart/login.py
  67. 1 1
      tasks/TalismanPass/assets.py
  68. 1 1
      tasks/TalismanPass/tp/image.json
  69. 17 0
      tasks/WantedQuests/config.py
  70. 12 5
      tasks/WantedQuests/script_task.py

+ 5 - 1
assets/i18n/zh-CN.json

@@ -15,11 +15,15 @@
   "costume_battle_10": "流焰蝶舞",
   "costume_battle_11": "辰烁奇夜",
   "enable_courtyard_affairs": "庭院事务",
+  "GuildActivityMonitor": "寮活动监控",
+  "guild_activity_monitor_combat_time": "监控时间设置",
+  "guild_activity": "监控活动",
   "AutoCheckinBigGod": "大神签到",
   "auto_checkin_big_god": "大神签到",
   "checkin_config": "签到配置",
   "Usage": "使用说明",
-  "checkin_big_god_usage_help": "自动领取网易大神APP的阴阳师福利礼包。\n\n使用前准备:\n1. 开启模拟器的Root模式\n2. 模拟器中安装并登录「网易大神」APP\n3. 在大神APP中绑定阴阳师角色\n\nFrida Server 会自动推送到模拟器并启动,无需手动操作。"
+  "checkin_big_god_usage_help": "自动领取网易大神APP的阴阳师福利礼包。\n\n使用前准备:\n1. 开启模拟器的Root模式\n2. 模拟器中安装并登录「网易大神」APP\n3. 在大神APP中绑定阴阳师角色\n\nFrida Server 会自动推送到模拟器并启动,无需手动操作。",
+  "costume_main_14": "雪月华庭"
 }
 
 

+ 1 - 1
module/config/config_manual.py

@@ -11,7 +11,7 @@ class ConfigManual:
         Restart > SoulsTidy
         > KekkaiUtilize > KekkaiActivation > DemonEncounter
         > AreaBoss > GoldYoukai > ExperienceYoukai > Nian > Tako > AutoCheckinBigGod > RealmRaid > RyouToppa > DailyTrifles > Exploration
-        > Dokan > AbyssShadows > Hunt > GuildBanquet > DemonRetreat
+        > Dokan > AbyssShadows > Hunt > GuildBanquet > DemonRetreat > GuildActivityMonitor
         > Orochi > OrochiMoans > OrochiJudgement > Sougenbi > FallenSun > EternitySea > SixRealms
         > ActivityShikigami > WantedQuests
         > BondlingFairyland > EvoZone > GoryouRealm > HeroTest

+ 2 - 2
module/config/config_menu.py

@@ -37,7 +37,7 @@ class ConfigMenu:
         ]
         # 阴阳寮
         self.menu["Guild"] = ['KekkaiUtilize', 'KekkaiActivation', 'RealmRaid', 'RyouToppa', 'Dokan', 'CollectiveMissions',
-                              'Hunt' , 'AbyssShadows', 'GuildBanquet', 'DemonRetreat']
+                              'Hunt' , 'AbyssShadows', 'GuildBanquet', 'DemonRetreat', 'GuildActivityMonitor']
         # 每周任务
         self.menu["Weekly Task"] = ['TrueOrochi', 'RichMan', 'Secret', 'WeeklyTrifles', 'MysteryShop', 'Duel']
         # 活动的任务
@@ -65,4 +65,4 @@ if __name__ == "__main__":
         m = ConfigMenu()
         print(m.gui_menu)
     except:
-        print('weih')
+        print('weih')

+ 3 - 0
module/config/config_model.py

@@ -1,6 +1,7 @@
 # This Python file uses the following encoding: utf-8
 # @author runhey
 # github https://github.com/runhey
+from tasks.GuildActivityMonitor.config import GuildActivityMonitor
 from typing import Dict, Any
 
 import re
@@ -49,6 +50,7 @@ from tasks.Hunt.config import Hunt
 from tasks.AbyssShadows.config import AbyssShadows
 from tasks.GuildBanquet.config import GuildBanquet
 from tasks.DemonRetreat.config import DemonRetreat
+from tasks.GuildActivityMonitor.config import GuildActivityMonitor
 
 # 这一部分是活动的配置-----------------------------------------------------------------------------------------------------
 from tasks.ActivityShikigami.config import ActivityShikigami
@@ -147,6 +149,7 @@ class ConfigModel(ConfigBase):
     abyss_shadows: AbyssShadows = Field(default_factory=AbyssShadows)
     guild_banquet: GuildBanquet = Field(default_factory=GuildBanquet)
     demon_retreat: DemonRetreat = Field(default_factory=DemonRetreat)
+    guild_activity_monitor: GuildActivityMonitor = Field(default_factory=GuildActivityMonitor)
 
     def __init__(self, config_name: str=None) -> None:
         """

+ 4 - 11
tasks/AbyssShadows/script_task.py

@@ -545,18 +545,11 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, AbyssShadowsAssets):
         # 点击返回
         while 1:
             self.screenshot()
-            if self.appear_then_click(self.I_EXIT, interval=1.5):
+            if self.appear_then_click(self.I_EXIT, interval=2):
                 continue
-            if self.appear(self.I_EXIT_ENSURE):
-                break
-        logger.info(f"Click {self.I_EXIT.name}")
-
-        # 点击返回确认
-        while 1:
-            self.screenshot()
-            if self.appear_then_click(self.I_EXIT_ENSURE, interval=1.5):
+            if self.appear_then_click(self.I_EXIT_ENSURE, interval=2):
                 continue
-            if self.appear_then_click(self.I_WIN, interval=1.5):
+            if self.appear_then_click(self.I_WIN, interval=2):
                 continue
             if self.appear(self.I_ABYSS_NAVIGATION):
                 break
@@ -573,4 +566,4 @@ if __name__ == "__main__":
     config = Config('zhu')
     device = Device(config)
     t = ScriptTask(config, device)
-    t.run()
+    t.run()

+ 13 - 0
tasks/Component/Costume/assets.py

@@ -75,6 +75,19 @@ class CostumeAssets:
 	I_MAIN_GOTO_EXPLORATION_13 = RuleImage(roi_front=(561,133,24,45), roi_back=(543,125,57,64), threshold=0.6, method="Template matching", file="./tasks/Component/Costume/main13/main13_main_goto_exploration_13.png")
 
 
+	# Image Rule Assets
+	# description 
+	I_CHECK_MAIN_14 = RuleImage(roi_front=(928,134,93,87), roi_back=(793,31,367,309), threshold=0.8, method="Template matching", file="./tasks/Component/Costume/main14/main14_check_main_14.png")
+	# 探索 
+	I_MAIN_GOTO_EXPLORATION_14 = RuleImage(roi_front=(654,163,25,26), roi_back=(551,109,237,228), threshold=0.7, method="Template matching", file="./tasks/Component/Costume/main14/main14_main_goto_exploration_14.png")
+	# 召唤屋 
+	I_MAIN_GOTO_SUMMON_14 = RuleImage(roi_front=(1152,167,32,35), roi_back=(1009,94,270,264), threshold=0.7, method="Template matching", file="./tasks/Component/Costume/main14/main14_main_goto_summon_14.png")
+	# 町中 
+	I_MAIN_GOTO_TOWN_14 = RuleImage(roi_front=(839,282,23,42), roi_back=(685,217,306,262), threshold=0.7, method="Template matching", file="./tasks/Component/Costume/main14/main14_main_goto_town_14.png")
+	# 宠物室 
+	I_PET_HOUSE_14 = RuleImage(roi_front=(1034,449,35,33), roi_back=(925,362,235,218), threshold=0.7, method="Template matching", file="./tasks/Component/Costume/main14/main14_pet_house_14.png")
+
+
 	# Image Rule Assets
 	# description 
 	I_CHECK_MAIN_2 = RuleImage(roi_front=(1090,146,48,55), roi_back=(880,108,271,100), threshold=0.8, method="Template matching", file="./tasks/Component/Costume/main2/main2_check_main_2.png")

+ 8 - 3
tasks/Component/Costume/config.py

@@ -20,6 +20,7 @@ class MainType(str, Enum):
     COSTUME_MAIN_11 = 'costume_main_11'  # 鏖刀禁府
     COSTUME_MAIN_12 = 'costume_main_12'  # 龙吟溯玉
     COSTUME_MAIN_13 = 'costume_main_13'  # 云景阆苑
+    COSTUME_MAIN_14 = 'costume_main_14'  # 雪月华庭
 
 # 结界皮肤
 class RealmType(str, Enum):
@@ -45,6 +46,7 @@ class ShikigamiType(str, Enum):
     COSTUME_SHIKIGAMI_5 = 'costume_shikigami_5'  # 契光水境
     COSTUME_SHIKIGAMI_6 = 'costume_shikigami_6'  # 月下火舞
     COSTUME_SHIKIGAMI_7 = 'costume_shikigami_7'  # 赤溟幽界
+    COSTUME_SHIKIGAMI_8 = 'costume_shikigami_8'  # 童梦基地
 
 # 签到主题
 class SignType(str, Enum):
@@ -64,6 +66,7 @@ class BattleType(str, Enum):
     COSTUME_BATTLE_9 = 'costume_battle_9'  # 莲华圣域
     COSTUME_BATTLE_10 = 'costume_battle_10'  # 流焰蝶舞
     COSTUME_BATTLE_11 = 'costume_battle_11'  # 辰烁奇夜
+    COSTUME_BATTLE_12 = 'costume_battle_12'  # 招财纳福
 
 
 
@@ -77,10 +80,12 @@ class CostumeConfig(BaseModel):
     costume_sign_type: SignType = Field(default=SignType.COSTUME_SIGN_DEFAULT, description='costume_sign_type_help')
     costume_battle_type: BattleType = Field(default=BattleType.COSTUME_BATTLE_DEFAULT, description='costume_battle_type_help')
 
-    @field_validator('costume_realm_type', mode='after')
+    @field_validator('costume_realm_type', mode='before')
     @classmethod
-    def validator_realm(cls, v: RealmType) -> RealmType:
-        return RealmType.COSTUME_REALM_DEFAULT
+    def validate_realm(cls, v):
+        if v and v not in RealmType._value2member_map_:
+            return RealmType.COSTUME_REALM_DEFAULT
+        return v
 
 
 

+ 9 - 3
tasks/Component/Costume/costume_base.py

@@ -21,7 +21,7 @@ main_costume_model = {
         'I_MAIN_GOTO_SUMMON': f'I_MAIN_GOTO_SUMMON_{i}',
         'I_MAIN_GOTO_TOWN': f'I_MAIN_GOTO_TOWN_{i}',
         'I_PET_HOUSE': f'I_PET_HOUSE_{i}'
-    } for i in range(1, 14)
+    } for i in range(1, 15)
 }
 
 
@@ -37,7 +37,7 @@ carpbanner_costume_model = {
 
 # 战斗主题(使用循环处理常规情况 + 特例处理)
 battle_theme_model = {}
-for i in range(1, 12):
+for i in range(1, 13):
     entry = {
         'I_LOCAL': f'I_LOCAL_{i}',
         'I_EXIT': f'I_EXIT_{i}',
@@ -49,6 +49,12 @@ for i in range(1, 12):
             'I_DE_WIN': 'I_DE_WIN_8',
             'I_FALSE': 'I_FALSE_8'
         })
+    if i == 12:  # 特殊处理第12项
+        entry.update({
+            'I_WIN': 'I_WIN_12',
+            'I_DE_WIN': 'I_DE_WIN_12',
+            'I_FALSE': 'I_FALSE_12'
+        })
     battle_theme_model[getattr(BattleType, f"COSTUME_BATTLE_{i}")] = entry
 
 # 幕间主题
@@ -71,7 +77,7 @@ shikigami_costume_model = {
         'I_ST_SOULS': f'I_ST_SOULS_{i}',
         'I_ST_REPLACE': f'I_ST_REPLACE_{i}',
     }
-    for i in range(1, 8)  # 目前只有 COSTUME_SHIKIGAMI_1,如需扩展可改 range
+    for i in range(1, 9)  # 目前支持 COSTUME_SHIKIGAMI_1 到 COSTUME_SHIKIGAMI_8
 }
 
 class CostumeBase:

+ 47 - 0
tasks/Component/Costume/main14/image.json

@@ -0,0 +1,47 @@
+[
+  {
+    "itemName": "check_main_14",
+    "imageName": "main14_check_main_14.png",
+    "roiFront": "928,134,93,87",
+    "roiBack": "793,31,367,309",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "main_goto_exploration_14",
+    "imageName": "main14_main_goto_exploration_14.png",
+    "roiFront": "654,163,25,26",
+    "roiBack": "551,109,237,228",
+    "method": "Template matching",
+    "threshold": 0.7,
+    "description": "探索"
+  },
+  {
+    "itemName": "main_goto_summon_14",
+    "imageName": "main14_main_goto_summon_14.png",
+    "roiFront": "1152,167,32,35",
+    "roiBack": "1009,94,270,264",
+    "method": "Template matching",
+    "threshold": 0.7,
+    "description": "召唤屋"
+  },
+  {
+    "itemName": "main_goto_town_14",
+    "imageName": "main14_main_goto_town_14.png",
+    "roiFront": "839,282,23,42",
+    "roiBack": "685,217,306,262",
+    "method": "Template matching",
+    "threshold": 0.7,
+    "description": "町中"
+  },
+  {
+    "itemName": "pet_house_14",
+    "imageName": "main14_pet_house_14.png",
+    "roiFront": "1034,449,35,33",
+    "roiBack": "925,362,235,218",
+    "method": "Template matching",
+    "threshold": 0.7,
+    "description": "宠物室"
+  }
+]

BIN
tasks/Component/Costume/main14/main14_check_main_14.png


BIN
tasks/Component/Costume/main14/main14_main_goto_exploration_14.png


BIN
tasks/Component/Costume/main14/main14_main_goto_summon_14.png


BIN
tasks/Component/Costume/main14/main14_main_goto_town_14.png


BIN
tasks/Component/Costume/main14/main14_pet_house_14.png


+ 15 - 0
tasks/Component/CostumeBattle/assets.py

@@ -115,3 +115,18 @@ class CostumeBattleAssets:
 	I_LOCAL_9 = RuleImage(roi_front=(114,489,37,37), roi_back=(114,489,37,37), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle9/battle9_local_9.png")
 
 
+	# Image Rule Assets
+	# 左上角退出 
+	I_EXIT_12 = RuleImage(roi_front=(16,15,22,25), roi_back=(16,15,40,40), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle12/battle12_exit_12.png")
+	# 左上角好友 
+	I_FRIENDS_12 = RuleImage(roi_front=(90,14,22,30), roi_back=(90,14,40,40), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle12/battle12_friends_12.png")
+	# 指针 
+	I_LOCAL_12 = RuleImage(roi_front=(29,566,28,28), roi_back=(29,566,40,40), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle12/battle12_local_12.png")
+	# 战斗胜利 
+	I_WIN_12 = RuleImage(roi_front=(390,30,46,88), roi_back=(390,30,510,290), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle12/battle12_win_12.png")
+	# 针对封魔的特殊 
+	I_DE_WIN_12 = RuleImage(roi_front=(390,30,46,88), roi_back=(390,30,510,290), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle12/battle12_de_win_12.png")
+	# 失败 
+	I_FALSE_12 = RuleImage(roi_front=(390,30,58,86), roi_back=(390,30,510,290), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle12/battle12_false_12.png")
+
+

BIN
tasks/Component/CostumeBattle/battle12/battle12_de_win_12.png


BIN
tasks/Component/CostumeBattle/battle12/battle12_exit_12.png


BIN
tasks/Component/CostumeBattle/battle12/battle12_false_12.png


BIN
tasks/Component/CostumeBattle/battle12/battle12_friends_12.png


BIN
tasks/Component/CostumeBattle/battle12/battle12_local_12.png


BIN
tasks/Component/CostumeBattle/battle12/battle12_win_12.png


+ 56 - 0
tasks/Component/CostumeBattle/battle12/image.json

@@ -0,0 +1,56 @@
+[
+  {
+    "itemName": "exit_12",
+    "imageName": "battle12_exit_12.png",
+    "roiFront": "16,15,22,25",
+    "roiBack": "16,15,40,40",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "左上角退出"
+  },
+  {
+    "itemName": "friends_12",
+    "imageName": "battle12_friends_12.png",
+    "roiFront": "90,14,22,30",
+    "roiBack": "90,14,40,40",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "左上角好友"
+  },
+  {
+    "itemName": "local_12",
+    "imageName": "battle12_local_12.png",
+    "roiFront": "29,566,28,28",
+    "roiBack": "29,566,40,40",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "指针"
+  },
+  {
+    "itemName": "win_12",
+    "imageName": "battle12_win_12.png",
+    "roiFront": "390,30,46,88",
+    "roiBack": "390,30,510,290",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "战斗胜利"
+  },
+  {
+    "itemName": "de_win_12",
+    "imageName": "battle12_de_win_12.png",
+    "roiFront": "390,30,46,88",
+    "roiBack": "390,30,510,290",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "针对封魔的特殊"
+  },
+  {
+    "itemName": "false_12",
+    "imageName": "battle12_false_12.png",
+    "roiFront": "390,30,58,86",
+    "roiBack": "390,30,510,290",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "失败"
+  }
+]

+ 50 - 7
tasks/Component/CostumeShikigami/assets.py

@@ -245,19 +245,19 @@ class CostumeShikigamiAssets:
 	# 用于判断是否在式神录里面 
 	I_SOU_CHECK_IN_6 = RuleImage(roi_front=(269,69,50,49), roi_back=(269,69,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_in_6.png")
 	# 检查是否为第一组 
-	I_SOU_CHECK_GROUP_1_6 = RuleImage(roi_front=(1078,79,22,52), roi_back=(1078,79,22,52), threshold=0.9, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_1_6.png")
+	I_SOU_CHECK_GROUP_1_6 = RuleImage(roi_front=(1087,80,22,52), roi_back=(1087,80,22,52), threshold=0.9, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_1_6.png")
 	# description 
-	I_SOU_CHECK_GROUP_2_6 = RuleImage(roi_front=(1080,149,25,49), roi_back=(1080,149,25,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_2_6.png")
+	I_SOU_CHECK_GROUP_2_6 = RuleImage(roi_front=(1088,152,25,49), roi_back=(1088,152,25,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_2_6.png")
 	# description 
-	I_SOU_CHECK_GROUP_3_6 = RuleImage(roi_front=(1080,221,22,43), roi_back=(1080,221,22,43), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_3_6.png")
+	I_SOU_CHECK_GROUP_3_6 = RuleImage(roi_front=(1089,225,22,43), roi_back=(1089,225,22,43), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_3_6.png")
 	# description 
-	I_SOU_CHECK_GROUP_4_6 = RuleImage(roi_front=(1081,289,21,50), roi_back=(1081,289,21,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_4_6.png")
+	I_SOU_CHECK_GROUP_4_6 = RuleImage(roi_front=(1092,293,21,47), roi_back=(1092,293,21,47), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_4_6.png")
 	# description 
-	I_SOU_CHECK_GROUP_5_6 = RuleImage(roi_front=(1081,360,21,50), roi_back=(1081,360,21,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_5_6.png")
+	I_SOU_CHECK_GROUP_5_6 = RuleImage(roi_front=(1090,361,21,50), roi_back=(1090,361,21,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_5_6.png")
 	# description 
-	I_SOU_CHECK_GROUP_6_6 = RuleImage(roi_front=(1081,428,23,49), roi_back=(1081,428,23,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_6_6.png")
+	I_SOU_CHECK_GROUP_6_6 = RuleImage(roi_front=(1089,429,23,49), roi_back=(1089,429,23,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_6_6.png")
 	# description 
-	I_SOU_CHECK_GROUP_7_6 = RuleImage(roi_front=(1079,500,21,48), roi_back=(1079,500,21,48), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_7_6.png")
+	I_SOU_CHECK_GROUP_7_6 = RuleImage(roi_front=(1088,502,21,48), roi_back=(1088,502,21,48), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_7_6.png")
 	# 匹配队伍预设 
 	I_SOU_TEAM_PRESENT_6 = RuleImage(roi_front=(720,76,136,43), roi_back=(706,68,175,63), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_team_present_6.png")
 	# 需要切换的预设按钮(颜色深一点) 
@@ -311,3 +311,46 @@ class CostumeShikigamiAssets:
 	I_ST_REPLACE_7 = RuleImage(roi_front=(858,162,100,100), roi_back=(858,162,100,100), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk7/sk7_st_replace_7.png")
 
 
+	# Image Rule Assets - sk8 童梦基地
+	# 用于判断在式神录 
+	I_CHECK_RECORDS_8 = RuleImage(roi_front=(265,71,34,36), roi_back=(265,71,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_check_records_8.png")
+	# 退出式神录 
+	I_RECORD_SOUL_BACK_8 = RuleImage(roi_front=(19,9,51,44), roi_back=(19,9,51,44), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_record_soul_back_8.png")
+	# 预设 
+	I_SOUL_PRESET_8 = RuleImage(roi_front=(335,73,73,36), roi_back=(310,57,169,72), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_soul_preset_8.png")
+	# 第一组切换 
+	I_SOU_SWITCH_1_8 = RuleImage(roi_front=(973,140,25,27), roi_back=(960,131,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_1_8.png")
+	# 第二组切换 
+	I_SOU_SWITCH_2_8 = RuleImage(roi_front=(971,293,25,27), roi_back=(960,284,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_2_8.png")
+	# 第三组切换 
+	I_SOU_SWITCH_3_8 = RuleImage(roi_front=(968,448,25,27), roi_back=(960,442,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_3_8.png")
+	# 第四组切换 
+	I_SOU_SWITCH_4_8 = RuleImage(roi_front=(967,597,25,27), roi_back=(960,592,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_4_8.png")
+	# 确认切换 
+	I_SOU_SWITCH_SURE_8 = RuleImage(roi_front=(668,401,180,61), roi_back=(668,401,180,61), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_sure_8.png")
+	# 用于判断是否在式神录里面 
+	I_SOU_CHECK_IN_8 = RuleImage(roi_front=(265,71,34,36), roi_back=(265,71,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_check_in_8.png")
+	# 检查是否为第一组 
+	I_SOU_CHECK_GROUP_1_8 = RuleImage(roi_front=(1086,91,25,60), roi_back=(1086,91,25,60), threshold=0.9, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_1_8.png")
+	# 检查是否为第二组 
+	I_SOU_CHECK_GROUP_2_8 = RuleImage(roi_front=(1086,163,25,60), roi_back=(1086,163,25,60), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_2_8.png")
+	# 检查是否为第三组 
+	I_SOU_CHECK_GROUP_3_8 = RuleImage(roi_front=(1085,234,25,60), roi_back=(1085,234,25,60), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_3_8.png")
+	# 检查是否为第四组 
+	I_SOU_CHECK_GROUP_4_8 = RuleImage(roi_front=(1086,303,25,60), roi_back=(1086,303,25,60), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_4_8.png")
+	# 检查是否为第五组 
+	I_SOU_CHECK_GROUP_5_8 = RuleImage(roi_front=(1088,370,25,60), roi_back=(1088,370,25,60), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_5_8.png")
+	# 检查是否为第六组 
+	I_SOU_CHECK_GROUP_6_8 = RuleImage(roi_front=(1085,443,25,60), roi_back=(1085,443,25,60), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_6_8.png")
+	# 检查是否为第七组 
+	I_SOU_CHECK_GROUP_7_8 = RuleImage(roi_front=(1088,512,25,60), roi_back=(1088,512,25,60), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_7_8.png")
+	# 匹配队伍预设 
+	I_SOU_TEAM_PRESENT_8 = RuleImage(roi_front=(720,76,112,35), roi_back=(706,68,175,63), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_team_preset_8.png")
+	# 需要切换的预设按钮(颜色深一点) 
+	I_SOU_CLICK_PRESENT_8 = RuleImage(roi_front=(967,305,25,27), roi_back=(965,142,48,480), threshold=0.9, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_click_present_8.png")
+	# 选中的御魂 
+	I_ST_SOULS_8 = RuleImage(roi_front=(1170,220,33,65), roi_back=(1170,220,70,90), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_st_souls_8.png")
+	# 更换 
+	I_ST_REPLACE_8 = RuleImage(roi_front=(856,150,49,73), roi_back=(856,150,110,130), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_st_replace_8.png")
+
+

+ 14 - 14
tasks/Component/CostumeShikigami/sk6/image.json

@@ -83,8 +83,8 @@
   {
     "itemName": "sou_check_group_1_6",
     "imageName": "sk6_sou_check_group_1_6.png",
-    "roiFront": "1078,79,22,52",
-    "roiBack": "1078,79,22,52",
+    "roiFront": "1087,80,22,52",
+    "roiBack": "1087,80,22,52",
     "method": "Template matching",
     "threshold": 0.9,
     "description": "检查是否为第一组"
@@ -92,8 +92,8 @@
   {
     "itemName": "sou_check_group_2_6",
     "imageName": "sk6_sou_check_group_2_6.png",
-    "roiFront": "1080,149,25,49",
-    "roiBack": "1080,149,25,49",
+    "roiFront": "1088,152,25,49",
+    "roiBack": "1088,152,25,49",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -101,8 +101,8 @@
   {
     "itemName": "sou_check_group_3_6",
     "imageName": "sk6_sou_check_group_3_6.png",
-    "roiFront": "1080,221,22,43",
-    "roiBack": "1080,221,22,43",
+    "roiFront": "1089,225,22,43",
+    "roiBack": "1089,225,22,43",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -110,8 +110,8 @@
   {
     "itemName": "sou_check_group_4_6",
     "imageName": "sk6_sou_check_group_4_6.png",
-    "roiFront": "1081,289,21,50",
-    "roiBack": "1081,289,21,50",
+    "roiFront": "1092,293,21,47",
+    "roiBack": "1092,293,21,47",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -119,8 +119,8 @@
   {
     "itemName": "sou_check_group_5_6",
     "imageName": "sk6_sou_check_group_5_6.png",
-    "roiFront": "1081,360,21,50",
-    "roiBack": "1081,360,21,50",
+    "roiFront": "1090,361,21,50",
+    "roiBack": "1090,361,21,50",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -128,8 +128,8 @@
   {
     "itemName": "sou_check_group_6_6",
     "imageName": "sk6_sou_check_group_6_6.png",
-    "roiFront": "1081,428,23,49",
-    "roiBack": "1081,428,23,49",
+    "roiFront": "1089,429,23,49",
+    "roiBack": "1089,429,23,49",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -137,8 +137,8 @@
   {
     "itemName": "sou_check_group_7_6",
     "imageName": "sk6_sou_check_group_7_6.png",
-    "roiFront": "1079,500,21,48",
-    "roiBack": "1079,500,21,48",
+    "roiFront": "1088,502,21,48",
+    "roiBack": "1088,502,21,48",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"

BIN
tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_1_6.png


BIN
tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_2_6.png


BIN
tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_3_6.png


BIN
tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_4_6.png


BIN
tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_5_6.png


BIN
tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_6_6.png


BIN
tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_7_6.png


+ 182 - 0
tasks/Component/CostumeShikigami/sk8/image.json

@@ -0,0 +1,182 @@
+[
+  {
+    "itemName": "check_records_8",
+    "imageName": "sk8_check_records_8.png",
+    "roiFront": "265,71,34,36",
+    "roiBack": "265,71,60,50",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "用于判断在式神录"
+  },
+  {
+    "itemName": "record_soul_back_8",
+    "imageName": "sk8_record_soul_back_8.png",
+    "roiFront": "19,9,51,44",
+    "roiBack": "19,9,51,44",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "退出式神录"
+  },
+  {
+    "itemName": "soul_preset_8",
+    "imageName": "sk8_soul_preset_8.png",
+    "roiFront": "335,73,73,36",
+    "roiBack": "310,57,169,72",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "预设"
+  },
+  {
+    "itemName": "sou_switch_1_8",
+    "imageName": "sk8_sou_switch_1_8.png",
+    "roiFront": "973,140,25,27",
+    "roiBack": "960,131,60,50",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "第一组切换"
+  },
+  {
+    "itemName": "sou_switch_2_8",
+    "imageName": "sk8_sou_switch_2_8.png",
+    "roiFront": "971,293,25,27",
+    "roiBack": "960,284,60,50",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "第二组切换"
+  },
+  {
+    "itemName": "sou_switch_3_8",
+    "imageName": "sk8_sou_switch_3_8.png",
+    "roiFront": "968,448,25,27",
+    "roiBack": "960,442,60,50",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "第三组切换"
+  },
+  {
+    "itemName": "sou_switch_4_8",
+    "imageName": "sk8_sou_switch_4_8.png",
+    "roiFront": "967,597,25,27",
+    "roiBack": "960,592,60,50",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "第四组切换"
+  },
+  {
+    "itemName": "sou_switch_sure_8",
+    "imageName": "sk8_sou_switch_sure_8.png",
+    "roiFront": "668,401,180,61",
+    "roiBack": "668,401,180,61",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "确认切换"
+  },
+  {
+    "itemName": "sou_check_in_8",
+    "imageName": "sk8_sou_check_in_8.png",
+    "roiFront": "265,71,34,36",
+    "roiBack": "265,71,60,50",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "用于判断是否在式神录里面"
+  },
+  {
+    "itemName": "sou_check_group_1_8",
+    "imageName": "sk8_sou_check_group_1_8.png",
+    "roiFront": "1086,91,25,60",
+    "roiBack": "1086,91,25,60",
+    "method": "Template matching",
+    "threshold": 0.9,
+    "description": "检查是否为第一组"
+  },
+  {
+    "itemName": "sou_check_group_2_8",
+    "imageName": "sk8_sou_check_group_2_8.png",
+    "roiFront": "1086,163,25,60",
+    "roiBack": "1086,163,25,60",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "检查是否为第二组"
+  },
+  {
+    "itemName": "sou_check_group_3_8",
+    "imageName": "sk8_sou_check_group_3_8.png",
+    "roiFront": "1085,234,25,60",
+    "roiBack": "1085,234,25,60",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "检查是否为第三组"
+  },
+  {
+    "itemName": "sou_check_group_4_8",
+    "imageName": "sk8_sou_check_group_4_8.png",
+    "roiFront": "1086,303,25,60",
+    "roiBack": "1086,303,25,60",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "检查是否为第四组"
+  },
+  {
+    "itemName": "sou_check_group_5_8",
+    "imageName": "sk8_sou_check_group_5_8.png",
+    "roiFront": "1088,370,25,60",
+    "roiBack": "1088,370,25,60",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "检查是否为第五组"
+  },
+  {
+    "itemName": "sou_check_group_6_8",
+    "imageName": "sk8_sou_check_group_6_8.png",
+    "roiFront": "1085,443,25,60",
+    "roiBack": "1085,443,25,60",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "检查是否为第六组"
+  },
+  {
+    "itemName": "sou_check_group_7_8",
+    "imageName": "sk8_sou_check_group_7_8.png",
+    "roiFront": "1088,512,25,60",
+    "roiBack": "1088,512,25,60",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "检查是否为第七组"
+  },
+  {
+    "itemName": "sou_team_present_8",
+    "imageName": "sk8_sou_team_preset_8.png",
+    "roiFront": "720,76,112,35",
+    "roiBack": "706,68,175,63",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "匹配队伍预设"
+  },
+  {
+    "itemName": "sou_click_present_8",
+    "imageName": "sk8_sou_click_present_8.png",
+    "roiFront": "967,305,25,27",
+    "roiBack": "965,142,48,480",
+    "method": "Template matching",
+    "threshold": 0.9,
+    "description": "需要切换的预设按钮(颜色深一点)"
+  },
+  {
+    "itemName": "st_souls_8",
+    "imageName": "sk8_st_souls_8.png",
+    "roiFront": "1170,220,33,65",
+    "roiBack": "1170,220,70,90",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "选中的御魂"
+  },
+  {
+    "itemName": "st_replace_8",
+    "imageName": "sk8_st_replace_8.png",
+    "roiFront": "856,150,49,73",
+    "roiBack": "856,150,110,130",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "更换"
+  }
+]

BIN
tasks/Component/CostumeShikigami/sk8/sk8_check_records_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_record_soul_back_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_1_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_2_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_3_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_4_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_5_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_6_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_7_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_check_in_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_click_present_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_1_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_2_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_3_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_4_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_sure_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_team_preset_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_soul_preset_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_st_replace_8.png


BIN
tasks/Component/CostumeShikigami/sk8/sk8_st_souls_8.png


+ 3 - 1
tasks/Component/GeneralInvite/assets.py

@@ -54,7 +54,7 @@ class GeneralInviteAssets:
 	# description 
 	I_FLAG_1_OFF = RuleImage(roi_front=(353,126,58,22), roi_back=(353,126,58,22), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_flag_1_off.png")
 	# description 
-	I_FLAG_2_ON = RuleImage(roi_front=(465,126,61,24), roi_back=(465,126,61,24), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_flag_2_on.png")
+	I_FLAG_2_ON = RuleImage(roi_front=(471,128,54,18), roi_back=(471,128,54,18), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_flag_2_on.png")
 	# description 
 	I_FLAG_2_OFF = RuleImage(roi_front=(469,127,58,21), roi_back=(469,127,58,21), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_flag_2_off.png")
 	# description 
@@ -127,3 +127,5 @@ class GeneralInviteAssets:
 	O_FRIEND_NAME_2 = RuleOcr(roi=(729,184,196,346), area=(729,184,196,346), mode="Full", method="Default", keyword="", name="friend_name_2")
 	# Ocr-description 
 	O_ONLINE = RuleOcr(roi=(790,102,124,42), area=(0,0,100,100), mode="Single", method="Default", keyword="", name="online")
+
+

BIN
tasks/Component/GeneralInvite/gi/gi_flag_2_on.png


+ 3 - 3
tasks/Component/GeneralInvite/gi/image.json

@@ -191,8 +191,8 @@
   {
     "itemName": "flag_2_on",
     "imageName": "gi_flag_2_on.png",
-    "roiFront": "465,126,61,24",
-    "roiBack": "465,126,61,24",
+    "roiFront": "471,128,54,18",
+    "roiBack": "471,128,54,18",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -377,4 +377,4 @@
     "threshold": 0.8,
     "description": "识别到寄养邀请"
   }
-]
+]

+ 7 - 7
tasks/Component/SwitchSoul/assets.py

@@ -12,19 +12,19 @@ class SwitchSoulAssets:
 
 	# Click Rule Assets
 	# description 
-	C_SOU_GROUP_1 = RuleClick(roi_front=(1086,85,158,67), roi_back=(1086,85,158,67), name="sou_group_1")
+	C_SOU_GROUP_1 = RuleClick(roi_front=(1086,85,158,47), roi_back=(1086,85,158,47), name="sou_group_1")
 	# description 
-	C_SOU_GROUP_2 = RuleClick(roi_front=(1087,155,162,62), roi_back=(1087,155,162,62), name="sou_group_2")
+	C_SOU_GROUP_2 = RuleClick(roi_front=(1087,155,162,48), roi_back=(1087,155,162,48), name="sou_group_2")
 	# description 
-	C_SOU_GROUP_3 = RuleClick(roi_front=(1088,226,154,61), roi_back=(1088,226,154,61), name="sou_group_3")
+	C_SOU_GROUP_3 = RuleClick(roi_front=(1088,226,154,49), roi_back=(1088,226,154,49), name="sou_group_3")
 	# description 
-	C_SOU_GROUP_4 = RuleClick(roi_front=(1087,297,157,59), roi_back=(1087,297,157,59), name="sou_group_4")
+	C_SOU_GROUP_4 = RuleClick(roi_front=(1087,297,157,46), roi_back=(1087,297,157,46), name="sou_group_4")
 	# description 
-	C_SOU_GROUP_5 = RuleClick(roi_front=(1087,365,154,62), roi_back=(1087,365,154,62), name="sou_group_5")
+	C_SOU_GROUP_5 = RuleClick(roi_front=(1087,365,154,47), roi_back=(1087,365,154,47), name="sou_group_5")
 	# description 
-	C_SOU_GROUP_6 = RuleClick(roi_front=(1088,437,156,57), roi_back=(1088,437,156,57), name="sou_group_6")
+	C_SOU_GROUP_6 = RuleClick(roi_front=(1088,437,156,46), roi_back=(1088,437,156,46), name="sou_group_6")
 	# description 
-	C_SOU_GROUP_7 = RuleClick(roi_front=(1090,505,156,62), roi_back=(1090,505,156,62), name="sou_group_7")
+	C_SOU_GROUP_7 = RuleClick(roi_front=(1090,505,156,51), roi_back=(1090,505,156,51), name="sou_group_7")
 	# 阵容选择按钮位置 
 	C_SOU_TEAM_SELECT = RuleClick(roi_front=(977,157,21,21), roi_back=(977,157,21,21), name="sou_team_select")
 

+ 14 - 14
tasks/Component/SwitchSoul/ss/click.json

@@ -1,44 +1,44 @@
 [
   {
     "itemName": "sou_group_1",
-    "roiFront": "1086,85,158,67",
-    "roiBack": "1086,85,158,67",
+    "roiFront": "1086,85,158,47",
+    "roiBack": "1086,85,158,47",
     "description": "description"
   },
   {
     "itemName": "sou_group_2",
-    "roiFront": "1087,155,162,62",
-    "roiBack": "1087,155,162,62",
+    "roiFront": "1087,155,162,48",
+    "roiBack": "1087,155,162,48",
     "description": "description"
   },
   {
     "itemName": "sou_group_3",
-    "roiFront": "1088,226,154,61",
-    "roiBack": "1088,226,154,61",
+    "roiFront": "1088,226,154,49",
+    "roiBack": "1088,226,154,49",
     "description": "description"
   },
   {
     "itemName": "sou_group_4",
-    "roiFront": "1087,297,157,59",
-    "roiBack": "1087,297,157,59",
+    "roiFront": "1087,297,157,46",
+    "roiBack": "1087,297,157,46",
     "description": "description"
   },
   {
     "itemName": "sou_group_5",
-    "roiFront": "1087,365,154,62",
-    "roiBack": "1087,365,154,62",
+    "roiFront": "1087,365,154,47",
+    "roiBack": "1087,365,154,47",
     "description": "description"
   },
   {
     "itemName": "sou_group_6",
-    "roiFront": "1088,437,156,57",
-    "roiBack": "1088,437,156,57",
+    "roiFront": "1088,437,156,46",
+    "roiBack": "1088,437,156,46",
     "description": "description"
   },
   {
     "itemName": "sou_group_7",
-    "roiFront": "1090,505,156,62",
-    "roiBack": "1090,505,156,62",
+    "roiFront": "1090,505,156,51",
+    "roiBack": "1090,505,156,51",
     "description": "description"
   },
   {

+ 1 - 1
tasks/GameUi/assets.py

@@ -196,7 +196,7 @@ class GameUiAssets:
 	# description 
 	I_SUMMON_GOTO_MAIN = RuleImage(roi_front=(27,5,49,51), roi_back=(0,0,100,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_summon_goto_main.png")
 	# description 
-	I_CHECK_SUMMON = RuleImage(roi_front=(581,594,68,66), roi_back=(316,528,594,174), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_summon.png")
+	I_CHECK_SUMMON = RuleImage(roi_front=(750,580,30,28), roi_back=(750,580,350,120), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_summon.png")
 	# 就是一个红叉 
 	I_REALM_RAID_GOTO_EXPLORATION = RuleImage(roi_front=(1192,107,36,43), roi_back=(1192,107,36,43), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_realm_raid_goto_exploration.png")
 	# description 

BIN
tasks/GameUi/page/page_check_summon.png


+ 2 - 2
tasks/GameUi/page/page_img_supplement.json

@@ -20,8 +20,8 @@
   {
     "itemName": "check_summon",
     "imageName": "page_check_summon.png",
-    "roiFront": "581,594,68,66",
-    "roiBack": "316,528,594,174",
+    "roiFront": "750,580,30,28",
+    "roiBack": "750,580,350,120",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"

+ 12 - 0
tasks/GuildActivityMonitor/assets.py

@@ -0,0 +1,12 @@
+from module.atom.image import RuleImage
+from module.atom.click import RuleClick
+from module.atom.long_click import RuleLongClick
+from module.atom.swipe import RuleSwipe
+from module.atom.ocr import RuleOcr
+from module.atom.list import RuleList
+
+# This file was automatically generated by ./dev_tools/assets_extract.py.
+# Don't modify it manually.
+class GuildActivityMonitorAssets: 
+	pass
+

+ 27 - 0
tasks/GuildActivityMonitor/config.py

@@ -0,0 +1,27 @@
+from pydantic import Field
+
+from tasks.Component.config_scheduler import Scheduler
+from tasks.Component.config_base import ConfigBase
+from pydantic import BaseModel, Field
+
+class GuildActivityMonitorCombatTime(BaseModel):
+    # 设置检测时间
+    detection_interval: int = Field(default=30, description="通知检测间隔(秒)\n通过adb检测系统中收到的活动推送,自动拉起对应任务")
+    monitor_duration: int = Field(default=15, description="监控持续时间(分)\n请确保已开启游戏通知权限,游戏设置权限中对应活动推送")
+    recheck_interval: int = Field(default=5, description="拉起对应活动后,间隔多久再次开启检测(分)\n若监控时间内未检测到活动,则按调度器设置下次运行时间")
+
+class GuildActivity(BaseModel):
+    # 道馆
+    Dokan: bool = Field(default=True)
+    # 狭间
+    AbyssShadows: bool = Field(default=True)
+    # 宴会
+    GuildBanquet: bool = Field(default=True)
+    # 退治
+    DemonRetreat: bool = Field(default=True)
+
+
+class GuildActivityMonitor(ConfigBase):
+    scheduler: Scheduler = Field(default_factory=Scheduler)
+    guild_activity_monitor_combat_time: GuildActivityMonitorCombatTime = Field(default_factory=GuildActivityMonitorCombatTime)
+    guild_activity: GuildActivity = Field(default_factory=GuildActivity)

+ 134 - 0
tasks/GuildActivityMonitor/script_task.py

@@ -0,0 +1,134 @@
+import re
+import time
+from datetime import datetime, timedelta
+from module.base.timer import Timer
+from module.exception import TaskEnd
+from module.logger import logger
+from tasks.GameUi.game_ui import GameUi
+from tasks.GameUi.page import page_main
+
+
+class ScriptTask(GameUi):
+
+    def run(self):
+        """ 阴阳寮活动监控主函数
+
+        :return:
+        """
+        # 构建关键字映射
+        self.ui_get_current_page()
+        self.ui_goto(page_main)
+        guild_config = self.config.guild_activity_monitor.guild_activity
+        KEYWORD_MAP = {
+            '道馆': 'Dokan' if guild_config.Dokan else None,
+            '狭间': 'AbyssShadows' if guild_config.AbyssShadows else None,
+            '宴会': 'GuildBanquet' if guild_config.GuildBanquet else None,
+            '退治': 'DemonRetreat' if guild_config.DemonRetreat else None,
+        }
+        KEYWORD_MAP = {k: v for k, v in KEYWORD_MAP.items() if v}
+        monitored_activities = list(KEYWORD_MAP.keys())
+        logger.info(f"监控活动: {monitored_activities}")
+
+        # 初始化监控配置
+        monitor_config = self.config.guild_activity_monitor.guild_activity_monitor_combat_time
+        duration_minutes = monitor_config.monitor_duration
+        interval = monitor_config.detection_interval
+        logger.info(f"开始阴阳寮活动监控,持续{duration_minutes}分钟,每{interval}秒检测一次")
+
+        # 初始化定时器
+        check_timer = Timer(monitor_config.monitor_duration * 60)
+        check_timer.start()
+        log_timer = Timer(60)
+        log_timer.start()
+
+        # 获取初始通知时间
+        init_time, _ = self.get_notification_info()
+
+        # 主监控循环
+        while True:
+            if check_timer.reached():
+                logger.info("监控时间到,任务结束")
+                self.set_next_run(task='GuildActivityMonitor', success=True, finish=True)
+                raise TaskEnd('GuildActivityMonitor')
+
+            if log_timer.reached():
+                remaining = int(check_timer.remain() // 60)
+                logger.info(f"监控中... 剩余时间: {remaining}分钟")
+                log_timer.reset()
+
+            # 处理突发事件
+            self.screenshot()
+
+            # 检测新通知
+            current_time, notification_text = self.get_notification_info()
+            if current_time > init_time and notification_text:
+                logger.info(f"检测到新通知: {notification_text}")
+                for keyword, task_name in KEYWORD_MAP.items():
+                    if keyword in notification_text:
+                        logger.info(f"检测到关键字 '{keyword}',启动任务: {task_name}")
+                        self.set_next_run(task=task_name, success=False, finish=False, server=False, target=datetime.now())
+                        recheck_interval = monitor_config.recheck_interval
+                        self.set_next_run(task='GuildActivityMonitor', success=False, finish=False, server=False, target=datetime.now() + timedelta(minutes=recheck_interval))
+                        raise TaskEnd('GuildActivityMonitor')
+
+            time.sleep(interval)
+
+    def get_notification_info(self) -> tuple:
+        try:
+            output = self.device.adb_shell(['dumpsys', 'notification', '--noredact'])
+
+            # 改进的通知时间提取逻辑 - 只获取最新的通知
+            notification_time = 0
+            notification_text = ""
+            
+            # 使用更精确的正则表达式匹配每个通知块
+            # 查找所有通知块,每个块包含时间戳和文本
+            notification_blocks = re.findall(r'(when=(\d+)[\s\S]*?(?=when=|\Z))', output)
+            
+            if notification_blocks:
+                # 找到最新的通知块
+                latest_block_time = 0
+                latest_text = ""
+                
+                for block, time_str in notification_blocks:
+                    current_time = float(time_str)
+                    if current_time > latest_block_time:
+                        latest_block_time = current_time
+                        # 在当前块中查找活动类型
+                        if re.search(r'宴会[^\w]', block) or '寮宴会' in block:
+                            latest_text = '宴会'
+                        elif re.search(r'狭间[^\w]', block) or '狭间暗域' in block:
+                            latest_text = '狭间'
+                        elif re.search(r'退治[^\w]', block) or '首领退治' in block:
+                            latest_text = '退治'
+                        elif re.search(r'道馆[^\w]', block) or '道馆突破' in block:
+                            latest_text = '道馆'
+                
+                notification_time = latest_block_time
+                notification_text = latest_text
+
+            return notification_time, notification_text
+        except Exception as e:
+            logger.warning(f"获取通知失败: {e}")
+            return 0, ""
+
+    '''
+    def clear_notifications(self):
+        """清理系统通知"""
+        try:
+            # 清理所有通知
+            self.device.adb_shell(['cmd', 'notification', 'remove-all'])
+            logger.info("已清理系统通知")
+        except Exception as e:
+            logger.warning(f"清理通知失败: {e}")
+    '''
+
+
+if __name__ == '__main__':
+    from module.config.config import Config
+    from module.device.device import Device
+
+    c = Config('oas1')
+    d = Device(c)
+    t = ScriptTask(c, d)
+    t.run()

+ 1 - 1
tasks/Restart/assets.py

@@ -39,7 +39,7 @@ class RestartAssets:
 	# 999签到福袋 
 	I_HARVEST_SIGN_999 = RuleImage(roi_front=(345,494,23,29), roi_back=(51,459,888,103), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_sign_999.png")
 	# 邮件小图标 
-	I_HARVEST_MAIL = RuleImage(roi_front=(337,505,37,25), roi_back=(38,465,880,89), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_mail.png")
+	I_HARVEST_MAIL = RuleImage(roi_front=(249,504,37,25), roi_back=(38,389,1006,164), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_mail.png")
 	# 全部收取 
 	I_HARVEST_MAIL_ALL = RuleImage(roi_front=(69,579,80,67), roi_back=(28,551,142,144), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_mail_all.png")
 	# 有些邮件需要点击一次 

+ 2 - 2
tasks/Restart/harvest/image.json

@@ -38,8 +38,8 @@
   {
     "itemName": "harvest_mail",
     "imageName": "harvest_harvest_mail.png",
-    "roiFront": "337,505,37,25",
-    "roiBack": "38,465,880,89",
+    "roiFront": "249,504,37,25",
+    "roiBack": "38,389,1006,164",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "邮件小图标"

+ 2 - 2
tasks/Restart/login.py

@@ -288,7 +288,7 @@ class LoginHandler(BaseTask, RestartAssets, GameUiAssets):
         self.O_LOGIN_SPECIFIC_SERVE.keyword = character
 
     def harvest_mail(self) -> bool:
-        if not self.appear(self.I_HARVEST_MAIL) and \
+        if not self.appear_multi_scale(self.I_HARVEST_MAIL,scale_range=(0.8, 1.1)) and \
                 not self.appear(self.I_HARVEST_MAIL_COPY):
             if not self.appear(self.I_READ_ALL_MAIL):
                 return False
@@ -297,7 +297,7 @@ class LoginHandler(BaseTask, RestartAssets, GameUiAssets):
             self.screenshot()
             if self.appear(self.I_READ_ALL_MAIL):
                 break
-            if self.appear_then_click(self.I_HARVEST_MAIL, interval=1.5):
+            if self.appear_then_click_multi_scale(self.I_HARVEST_MAIL, interval=1.5, scale_range=(0.8, 1.1)):
                 continue
             if self.appear_then_click(self.I_HARVEST_MAIL_COPY, interval=1.5):
                 continue

+ 1 - 1
tasks/TalismanPass/assets.py

@@ -34,7 +34,7 @@ class TalismanPassAssets:
 	# 溢出确认 
 	I_OVERFLOW_CONFIRME = RuleImage(roi_front=(585,410,116,44), roi_back=(585,410,116,44), threshold=0.8, method="Template matching", file="./tasks/TalismanPass/tp/tp_overflow_confirme.png")
 	# 点击随机御魂 
-	I_TP_SOUL_1 = RuleImage(roi_front=(248,501,34,37), roi_back=(165,389,929,168), threshold=0.8, method="Template matching", file="./tasks/TalismanPass/tp/tp_tp_soul_1.png")
+	I_TP_SOUL_1 = RuleImage(roi_front=(248,501,34,37), roi_back=(165,389,929,168), threshold=0.7, method="Template matching", file="./tasks/TalismanPass/tp/tp_tp_soul_1.png")
 	# 选择中间第二个御魂 
 	I_TP_SOUL_2 = RuleImage(roi_front=(582,438,115,48), roi_back=(570,427,139,71), threshold=0.8, method="Template matching", file="./tasks/TalismanPass/tp/tp_tp_soul_2.png")
 	# 六星御魂标志 

+ 1 - 1
tasks/TalismanPass/tp/image.json

@@ -104,7 +104,7 @@
     "roiFront": "248,501,34,37",
     "roiBack": "165,389,929,168",
     "method": "Template matching",
-    "threshold": 0.8,
+    "threshold": 0.7,
     "description": "点击随机御魂"
   },
   {

+ 17 - 0
tasks/WantedQuests/config.py

@@ -83,6 +83,21 @@ class CooperationSelectMaskDescription(str, Enum):
     Any = 'Any'
 
 
+# 定义秘闻副本层数限制
+class LayerLimit(str, Enum):
+    LAYER_1 = '壹'
+    LAYER_2 = '贰'
+    LAYER_3 = '叁'
+    LAYER_4 = '肆'
+    LAYER_5 = '伍'
+    LAYER_6 = '陆'
+    LAYER_7 = '柒'
+    LAYER_8 = '捌'
+    LAYER_9 = '玖'
+    LAYER_10 = '拾'
+    EXTRA = '番外'
+    ALL = '无限制'       # 全都打
+
 class WantedQuestsConfig(BaseModel):
     before_end: Time = Field(default=Time(0, 0, 0), description='before_end_help')
     invite_friend_name: str = Field(default=str(""), description="invite_friend_name_help")
@@ -94,6 +109,8 @@ class WantedQuestsConfig(BaseModel):
     cooperation_only: bool = Field(default=False, description="cooperation_only_help")
     # 忽略任务的任务目标名称(“酒吞童子”等),多个用逗号“,,"分隔
     unwanted_boss_names: str = Field(default='酒吞童子,阎魔', description='unwanted_boss_name_help')
+    # 秘闻层数限制,默认值为7
+    layer_limit: LayerLimit = Field(default=LayerLimit.LAYER_7, description='X层及以上不打')
 
 
 class WantedQuests(ConfigBase):

+ 12 - 5
tasks/WantedQuests/script_task.py

@@ -325,11 +325,18 @@ class ScriptTask(WQExplore, SecretScriptTask, WantedQuestsAssets):
             (类型, 地点层级,可以打败的数量,前往按钮, func)
             类型: 挑战0, 秘闻1, 探索2
             """
-            layer_limit = {
-                # 低层不限制
-                # "壹", "贰", "叁", "肆", "伍", "陆",
-                "柒", "捌", "玖", "拾", "番外"
-            }
+            # 获取用户设置的值
+            user_limit = self.config.model.wanted_quests.wanted_quests_config.layer_limit.value            
+            # 定义完整的层数后缀顺序
+            all_layers = ["壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖", "拾", "番外"]
+            # 根据用户选择进行截取,生成 layer_limit 集合
+            if user_limit == "无限制":
+                layer_limit = set()
+            else:
+                start_idx = all_layers.index(user_limit) if user_limit in all_layers else 6
+                # 截取该层及之后的所有层
+                layer_limit = set(all_layers[start_idx:])
+
             # ,荒川之怒·壹,4,前往按钮,function
             result = [-1, '', -1, GOTO_BUTTON[index], self.challenge, '']
             type_wq = OCR_WQ_TYPE[index].ocr(self.device.image)