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

Merge pull request #1466 from runhey/dev

Automated PR 2026.03.12
huangrunheng 8 месяцев назад
Родитель
Сommit
ad8585618f
100 измененных файлов с 876 добавлено и 304 удалено
  1. 6 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. 9 142
      tasks/ActivityShikigami/README.md
  7. BIN
      tasks/ActivityShikigami/as/as_battle_main_to_records.png
  8. BIN
      tasks/ActivityShikigami/as/as_check_battle_main.png
  9. BIN
      tasks/ActivityShikigami/as/as_climb_mode_ap.png
  10. BIN
      tasks/ActivityShikigami/as/as_climb_mode_pass.png
  11. BIN
      tasks/ActivityShikigami/as/as_climb_mode_switch.png
  12. BIN
      tasks/ActivityShikigami/as/as_confirm_skip.png
  13. BIN
      tasks/ActivityShikigami/as/as_shi.png
  14. BIN
      tasks/ActivityShikigami/as/as_skip_button.png
  15. BIN
      tasks/ActivityShikigami/as/as_to_battle_boss.png
  16. BIN
      tasks/ActivityShikigami/as/as_to_battle_main.png
  17. 8 8
      tasks/ActivityShikigami/as/click.json
  18. 6 6
      tasks/ActivityShikigami/as/image.json
  19. 14 5
      tasks/ActivityShikigami/as/pages.json
  20. 15 13
      tasks/ActivityShikigami/assets.py
  21. 4 4
      tasks/ActivityShikigami/fire/ocr.json
  22. 1 1
      tasks/ActivityShikigami/page.py
  23. 17 11
      tasks/ActivityShikigami/script_task.py
  24. 13 0
      tasks/Component/Costume/assets.py
  25. 9 3
      tasks/Component/Costume/config.py
  26. 10 4
      tasks/Component/Costume/costume_base.py
  27. 47 0
      tasks/Component/Costume/main14/image.json
  28. BIN
      tasks/Component/Costume/main14/main14_check_main_14.png
  29. BIN
      tasks/Component/Costume/main14/main14_main_goto_exploration_14.png
  30. BIN
      tasks/Component/Costume/main14/main14_main_goto_summon_14.png
  31. BIN
      tasks/Component/Costume/main14/main14_main_goto_town_14.png
  32. BIN
      tasks/Component/Costume/main14/main14_pet_house_14.png
  33. 15 0
      tasks/Component/CostumeBattle/assets.py
  34. BIN
      tasks/Component/CostumeBattle/battle12/battle12_de_win_12.png
  35. BIN
      tasks/Component/CostumeBattle/battle12/battle12_exit_12.png
  36. BIN
      tasks/Component/CostumeBattle/battle12/battle12_false_12.png
  37. BIN
      tasks/Component/CostumeBattle/battle12/battle12_friends_12.png
  38. BIN
      tasks/Component/CostumeBattle/battle12/battle12_local_12.png
  39. BIN
      tasks/Component/CostumeBattle/battle12/battle12_win_12.png
  40. 56 0
      tasks/Component/CostumeBattle/battle12/image.json
  41. 9 0
      tasks/Component/CostumeCarpBanner/assets.py
  42. BIN
      tasks/Component/CostumeCarpBanner/cb3/cb3_shi_card_3.png
  43. BIN
      tasks/Component/CostumeCarpBanner/cb3/cb3_shi_defense_3.png
  44. BIN
      tasks/Component/CostumeCarpBanner/cb3/cb3_shi_grown_3.png
  45. 29 0
      tasks/Component/CostumeCarpBanner/cb3/image.json
  46. 50 7
      tasks/Component/CostumeShikigami/assets.py
  47. 14 14
      tasks/Component/CostumeShikigami/sk6/image.json
  48. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_1_6.png
  49. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_2_6.png
  50. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_3_6.png
  51. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_4_6.png
  52. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_5_6.png
  53. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_6_6.png
  54. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_check_group_7_6.png
  55. 182 0
      tasks/Component/CostumeShikigami/sk8/image.json
  56. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_check_records_8.png
  57. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_record_soul_back_8.png
  58. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_1_8.png
  59. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_2_8.png
  60. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_3_8.png
  61. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_4_8.png
  62. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_5_8.png
  63. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_6_8.png
  64. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_group_7_8.png
  65. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_check_in_8.png
  66. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_click_present_8.png
  67. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_1_8.png
  68. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_2_8.png
  69. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_3_8.png
  70. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_4_8.png
  71. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_sure_8.png
  72. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_team_preset_8.png
  73. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_soul_preset_8.png
  74. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_st_replace_8.png
  75. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_st_souls_8.png
  76. 3 1
      tasks/Component/GeneralInvite/assets.py
  77. BIN
      tasks/Component/GeneralInvite/gi/gi_flag_2_on.png
  78. 3 3
      tasks/Component/GeneralInvite/gi/image.json
  79. 7 7
      tasks/Component/SwitchSoul/assets.py
  80. 14 14
      tasks/Component/SwitchSoul/ss/click.json
  81. 57 10
      tasks/DemonEncounter/data/answer.py
  82. 12 1
      tasks/DemonEncounter/data/data.csv
  83. BIN
      tasks/DemonEncounter/data/鬼灭联动活动·题库.xlsx
  84. 1 1
      tasks/GameUi/assets.py
  85. BIN
      tasks/GameUi/page/page_check_summon.png
  86. 2 2
      tasks/GameUi/page/page_img_supplement.json
  87. 12 0
      tasks/GuildActivityMonitor/assets.py
  88. 27 0
      tasks/GuildActivityMonitor/config.py
  89. 134 0
      tasks/GuildActivityMonitor/script_task.py
  90. 23 10
      tasks/Quiz/assets.py
  91. BIN
      tasks/Quiz/quiz/alone_ensure.png
  92. 26 0
      tasks/Quiz/quiz/click.json
  93. BIN
      tasks/Quiz/quiz/entry.png
  94. BIN
      tasks/Quiz/quiz/fail_quit.png
  95. 18 9
      tasks/Quiz/quiz/image.json
  96. BIN
      tasks/Quiz/quiz/message.png
  97. 13 13
      tasks/Quiz/quiz/ocr.json
  98. BIN
      tasks/Quiz/quiz/quiz_entry.png
  99. BIN
      tasks/Quiz/quiz/quiz_fail_quit.png
  100. BIN
      tasks/Quiz/quiz/quiz_message.png

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

@@ -11,15 +11,20 @@
   "costume_carpbanner_default": "吉鲤游风",
   "costume_carpbanner_default": "吉鲤游风",
   "costume_carpbanner_1": "无垢莲台",
   "costume_carpbanner_1": "无垢莲台",
   "costume_carpbanner_2": "萤灯月夜",
   "costume_carpbanner_2": "萤灯月夜",
+  "costume_carpbanner_3": "鸢戏游鲤",
   "costume_carpbanner_type_help": "多数结界通用",
   "costume_carpbanner_type_help": "多数结界通用",
   "costume_battle_10": "流焰蝶舞",
   "costume_battle_10": "流焰蝶舞",
   "costume_battle_11": "辰烁奇夜",
   "costume_battle_11": "辰烁奇夜",
   "enable_courtyard_affairs": "庭院事务",
   "enable_courtyard_affairs": "庭院事务",
+  "GuildActivityMonitor": "寮活动监控",
+  "guild_activity_monitor_combat_time": "监控时间设置",
+  "guild_activity": "监控活动",
   "AutoCheckinBigGod": "大神签到",
   "AutoCheckinBigGod": "大神签到",
   "auto_checkin_big_god": "大神签到",
   "auto_checkin_big_god": "大神签到",
   "checkin_config": "签到配置",
   "checkin_config": "签到配置",
   "Usage": "使用说明",
   "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
         Restart > SoulsTidy
         > KekkaiUtilize > KekkaiActivation > DemonEncounter
         > KekkaiUtilize > KekkaiActivation > DemonEncounter
         > AreaBoss > GoldYoukai > ExperienceYoukai > Nian > Tako > AutoCheckinBigGod > RealmRaid > RyouToppa > DailyTrifles > Exploration
         > 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
         > Orochi > OrochiMoans > OrochiJudgement > Sougenbi > FallenSun > EternitySea > SixRealms
         > ActivityShikigami > WantedQuests
         > ActivityShikigami > WantedQuests
         > BondlingFairyland > EvoZone > GoryouRealm > HeroTest
         > 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',
         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']
         self.menu["Weekly Task"] = ['TrueOrochi', 'RichMan', 'Secret', 'WeeklyTrifles', 'MysteryShop', 'Duel']
         # 活动的任务
         # 活动的任务
@@ -65,4 +65,4 @@ if __name__ == "__main__":
         m = ConfigMenu()
         m = ConfigMenu()
         print(m.gui_menu)
         print(m.gui_menu)
     except:
     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
 # This Python file uses the following encoding: utf-8
 # @author runhey
 # @author runhey
 # github https://github.com/runhey
 # github https://github.com/runhey
+from tasks.GuildActivityMonitor.config import GuildActivityMonitor
 from typing import Dict, Any
 from typing import Dict, Any
 
 
 import re
 import re
@@ -49,6 +50,7 @@ from tasks.Hunt.config import Hunt
 from tasks.AbyssShadows.config import AbyssShadows
 from tasks.AbyssShadows.config import AbyssShadows
 from tasks.GuildBanquet.config import GuildBanquet
 from tasks.GuildBanquet.config import GuildBanquet
 from tasks.DemonRetreat.config import DemonRetreat
 from tasks.DemonRetreat.config import DemonRetreat
+from tasks.GuildActivityMonitor.config import GuildActivityMonitor
 
 
 # 这一部分是活动的配置-----------------------------------------------------------------------------------------------------
 # 这一部分是活动的配置-----------------------------------------------------------------------------------------------------
 from tasks.ActivityShikigami.config import ActivityShikigami
 from tasks.ActivityShikigami.config import ActivityShikigami
@@ -147,6 +149,7 @@ class ConfigModel(ConfigBase):
     abyss_shadows: AbyssShadows = Field(default_factory=AbyssShadows)
     abyss_shadows: AbyssShadows = Field(default_factory=AbyssShadows)
     guild_banquet: GuildBanquet = Field(default_factory=GuildBanquet)
     guild_banquet: GuildBanquet = Field(default_factory=GuildBanquet)
     demon_retreat: DemonRetreat = Field(default_factory=DemonRetreat)
     demon_retreat: DemonRetreat = Field(default_factory=DemonRetreat)
+    guild_activity_monitor: GuildActivityMonitor = Field(default_factory=GuildActivityMonitor)
 
 
     def __init__(self, config_name: str=None) -> None:
     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:
         while 1:
             self.screenshot()
             self.screenshot()
-            if self.appear_then_click(self.I_EXIT, interval=1.5):
+            if self.appear_then_click(self.I_EXIT, interval=2):
                 continue
                 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
                 continue
-            if self.appear_then_click(self.I_WIN, interval=1.5):
+            if self.appear_then_click(self.I_WIN, interval=2):
                 continue
                 continue
             if self.appear(self.I_ABYSS_NAVIGATION):
             if self.appear(self.I_ABYSS_NAVIGATION):
                 break
                 break
@@ -573,4 +566,4 @@ if __name__ == "__main__":
     config = Config('zhu')
     config = Config('zhu')
     device = Device(config)
     device = Device(config)
     t = ScriptTask(config, device)
     t = ScriptTask(config, device)
-    t.run()
+    t.run()

+ 9 - 142
tasks/ActivityShikigami/README.md

@@ -24,6 +24,15 @@
 
 
 ![image-20251220104718877](https://runhey-img-stg1.oss-cn-chengdu.aliyuncs.com/img3/202512201047907.png)
 ![image-20251220104718877](https://runhey-img-stg1.oss-cn-chengdu.aliyuncs.com/img3/202512201047907.png)
 
 
+## 关于活动切换(`./as/image.json`文件)
+
+#### 图片 `climb_mode_pass` 门票爬塔标志 | `climb_mode_ap` 体力爬塔标志 | `climb_mode_switch` 切换门票爬塔和体力爬塔按钮
+
+![climb_mode_pass](https://raw.githubusercontent.com/AzurTian/ImgBed/master/blog/climb_mode_pass.png)
+
+![climb_mode_ap](https://raw.githubusercontent.com/AzurTian/ImgBed/master/blog/1.png)
+
+![climb_mode_switch](https://raw.githubusercontent.com/AzurTian/ImgBed/master/blog/2.png)
 
 
 
 
 ## 关于战斗更新 (`./fire/ocr.json`文件)
 ## 关于战斗更新 (`./fire/ocr.json`文件)
@@ -36,145 +45,3 @@
 
 
 ![image-20251220111505769](https://runhey-img-stg1.oss-cn-chengdu.aliyuncs.com/img3/202512201115927.png)
 ![image-20251220111505769](https://runhey-img-stg1.oss-cn-chengdu.aliyuncs.com/img3/202512201115927.png)
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

BIN
tasks/ActivityShikigami/as/as_battle_main_to_records.png


BIN
tasks/ActivityShikigami/as/as_check_battle_main.png


BIN
tasks/ActivityShikigami/as/as_climb_mode_ap.png


BIN
tasks/ActivityShikigami/as/as_climb_mode_pass.png


BIN
tasks/ActivityShikigami/as/as_climb_mode_switch.png


BIN
tasks/ActivityShikigami/as/as_confirm_skip.png


BIN
tasks/ActivityShikigami/as/as_shi.png


BIN
tasks/ActivityShikigami/as/as_skip_button.png


BIN
tasks/ActivityShikigami/as/as_to_battle_boss.png


BIN
tasks/ActivityShikigami/as/as_to_battle_main.png


+ 8 - 8
tasks/ActivityShikigami/as/click.json

@@ -1,26 +1,26 @@
 [
 [
   {
   {
     "itemName": "random_left",
     "itemName": "random_left",
-    "roiFront": "17,69,132,599",
-    "roiBack": "17,70,137,599",
+    "roiFront": "17,107,104,378",
+    "roiBack": "17,103,106,385",
     "description": "description"
     "description": "description"
   },
   },
   {
   {
     "itemName": "random_right",
     "itemName": "random_right",
-    "roiFront": "1133,55,131,638",
-    "roiBack": "1131,55,133,638",
+    "roiFront": "1133,110,131,408",
+    "roiBack": "1131,108,133,412",
     "description": "description"
     "description": "description"
   },
   },
   {
   {
     "itemName": "random_top",
     "itemName": "random_top",
-    "roiFront": "84,49,1159,93",
-    "roiBack": "85,46,1159,101",
+    "roiFront": "126,49,904,75",
+    "roiBack": "123,47,911,77",
     "description": "description"
     "description": "description"
   },
   },
   {
   {
     "itemName": "random_bottom",
     "itemName": "random_bottom",
-    "roiFront": "179,598,972,78",
-    "roiBack": "179,597,972,81",
+    "roiFront": "179,598,932,78",
+    "roiBack": "179,597,932,81",
     "description": "description"
     "description": "description"
   },
   },
   {
   {

+ 6 - 6
tasks/ActivityShikigami/as/image.json

@@ -20,8 +20,8 @@
   {
   {
     "itemName": "climb_mode_pass",
     "itemName": "climb_mode_pass",
     "imageName": "as_climb_mode_pass.png",
     "imageName": "as_climb_mode_pass.png",
-    "roiFront": "1142,546,21,21",
-    "roiBack": "1118,500,62,100",
+    "roiFront": "1151,534,21,21",
+    "roiBack": "1118,510,70,69",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "活动爬塔标志"
     "description": "活动爬塔标志"
@@ -29,8 +29,8 @@
   {
   {
     "itemName": "climb_mode_ap",
     "itemName": "climb_mode_ap",
     "imageName": "as_climb_mode_ap.png",
     "imageName": "as_climb_mode_ap.png",
-    "roiFront": "1091,545,22,25",
-    "roiBack": "1049,504,100,100",
+    "roiFront": "1101,532,22,25",
+    "roiBack": "1055,495,100,100",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "体力爬塔标志"
     "description": "体力爬塔标志"
@@ -38,8 +38,8 @@
   {
   {
     "itemName": "climb_mode_switch",
     "itemName": "climb_mode_switch",
     "imageName": "as_climb_mode_switch.png",
     "imageName": "as_climb_mode_switch.png",
-    "roiFront": "1233,543,29,26",
-    "roiBack": "1179,494,100,100",
+    "roiFront": "1237,532,29,26",
+    "roiBack": "1174,511,104,82",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "切换按键"
     "description": "切换按键"

+ 14 - 5
tasks/ActivityShikigami/as/pages.json

@@ -2,7 +2,7 @@
   {
   {
     "itemName": "shi",
     "itemName": "shi",
     "imageName": "as_shi.png",
     "imageName": "as_shi.png",
-    "roiFront": "1184,460,47,29",
+    "roiFront": "1184,384,47,29",
     "roiBack": "1164,134,83,393",
     "roiBack": "1164,134,83,393",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.7,
     "threshold": 0.7,
@@ -38,7 +38,7 @@
   {
   {
     "itemName": "to_battle_main",
     "itemName": "to_battle_main",
     "imageName": "as_to_battle_main.png",
     "imageName": "as_to_battle_main.png",
-    "roiFront": "141,310,39,176",
+    "roiFront": "223,287,39,176",
     "roiBack": "100,242,238,269",
     "roiBack": "100,242,238,269",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
@@ -47,7 +47,7 @@
   {
   {
     "itemName": "to_battle_boss",
     "itemName": "to_battle_boss",
     "imageName": "as_to_battle_boss.png",
     "imageName": "as_to_battle_boss.png",
-    "roiFront": "1093,293,37,136",
+    "roiFront": "1076,241,37,136",
     "roiBack": "934,209,234,327",
     "roiBack": "934,209,234,327",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
@@ -56,8 +56,8 @@
   {
   {
     "itemName": "check_battle_main",
     "itemName": "check_battle_main",
     "imageName": "as_check_battle_main.png",
     "imageName": "as_check_battle_main.png",
-    "roiFront": "34,639,39,46",
-    "roiBack": "12,597,264,105",
+    "roiFront": "842,565,39,45",
+    "roiBack": "688,499,415,203",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
@@ -88,5 +88,14 @@
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.65,
     "threshold": 0.65,
     "description": "description"
     "description": "description"
+  },
+  {
+    "itemName": "confirm_skip",
+    "imageName": "as_confirm_skip.png",
+    "roiFront": "707,442,137,38",
+    "roiBack": "656,397,231,124",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "确认跳过"
   }
   }
 ]
 ]

+ 15 - 13
tasks/ActivityShikigami/assets.py

@@ -12,13 +12,13 @@ class ActivityShikigamiAssets:
 
 
 	# Click Rule Assets
 	# Click Rule Assets
 	# description 
 	# description 
-	C_RANDOM_LEFT = RuleClick(roi_front=(17,69,132,599), roi_back=(17,70,137,599), name="random_left")
+	C_RANDOM_LEFT = RuleClick(roi_front=(17,107,104,378), roi_back=(17,103,106,385), name="random_left")
 	# description 
 	# description 
-	C_RANDOM_RIGHT = RuleClick(roi_front=(1133,55,131,638), roi_back=(1131,55,133,638), name="random_right")
+	C_RANDOM_RIGHT = RuleClick(roi_front=(1133,110,131,408), roi_back=(1131,108,133,412), name="random_right")
 	# description 
 	# description 
-	C_RANDOM_TOP = RuleClick(roi_front=(84,49,1159,93), roi_back=(85,46,1159,101), name="random_top")
+	C_RANDOM_TOP = RuleClick(roi_front=(126,49,904,75), roi_back=(123,47,911,77), name="random_top")
 	# description 
 	# description 
-	C_RANDOM_BOTTOM = RuleClick(roi_front=(179,598,972,78), roi_back=(179,597,972,81), name="random_bottom")
+	C_RANDOM_BOTTOM = RuleClick(roi_front=(179,598,932,78), roi_back=(179,597,932,81), name="random_bottom")
 	# description 
 	# description 
 	C_RANDOM_ALL = RuleClick(roi_front=(42,94,1207,543), roi_back=(42,94,1207,543), name="random_all")
 	C_RANDOM_ALL = RuleClick(roi_front=(42,94,1207,543), roi_back=(42,94,1207,543), name="random_all")
 
 
@@ -29,16 +29,16 @@ class ActivityShikigamiAssets:
 	# 还未上锁图片 
 	# 还未上锁图片 
 	I_UNLOCK = RuleImage(roi_front=(884,648,28,25), roi_back=(733,607,266,95), threshold=0.5, method="Template matching", file="./tasks/ActivityShikigami/as/as_unlock.png")
 	I_UNLOCK = RuleImage(roi_front=(884,648,28,25), roi_back=(733,607,266,95), threshold=0.5, method="Template matching", file="./tasks/ActivityShikigami/as/as_unlock.png")
 	# 活动爬塔标志 
 	# 活动爬塔标志 
-	I_CLIMB_MODE_PASS = RuleImage(roi_front=(1142,546,21,21), roi_back=(1118,500,62,100), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_climb_mode_pass.png")
+	I_CLIMB_MODE_PASS = RuleImage(roi_front=(1151,534,21,21), roi_back=(1118,510,70,69), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_climb_mode_pass.png")
 	# 体力爬塔标志 
 	# 体力爬塔标志 
-	I_CLIMB_MODE_AP = RuleImage(roi_front=(1091,545,22,25), roi_back=(1049,504,100,100), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_climb_mode_ap.png")
+	I_CLIMB_MODE_AP = RuleImage(roi_front=(1101,532,22,25), roi_back=(1055,495,100,100), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_climb_mode_ap.png")
 	# 切换按键 
 	# 切换按键 
-	I_CLIMB_MODE_SWITCH = RuleImage(roi_front=(1233,543,29,26), roi_back=(1179,494,100,100), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_climb_mode_switch.png")
+	I_CLIMB_MODE_SWITCH = RuleImage(roi_front=(1237,532,29,26), roi_back=(1174,511,104,82), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_climb_mode_switch.png")
 
 
 
 
 	# Image Rule Assets
 	# Image Rule Assets
 	# 进入活动 
 	# 进入活动 
-	I_SHI = RuleImage(roi_front=(1184,460,47,29), roi_back=(1164,134,83,393), threshold=0.7, method="Template matching", file="./tasks/ActivityShikigami/as/as_shi.png")
+	I_SHI = RuleImage(roi_front=(1184,384,47,29), roi_back=(1164,134,83,393), threshold=0.7, method="Template matching", file="./tasks/ActivityShikigami/as/as_shi.png")
 	# 左上角返回 
 	# 左上角返回 
 	I_BACK_GREEN = RuleImage(roi_front=(27,19,34,38), roi_back=(2,1,170,75), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_back_green.png")
 	I_BACK_GREEN = RuleImage(roi_front=(27,19,34,38), roi_back=(2,1,170,75), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_back_green.png")
 	# 右上跳过按钮 
 	# 右上跳过按钮 
@@ -46,17 +46,19 @@ class ActivityShikigamiAssets:
 	# 红色退出 
 	# 红色退出 
 	I_RED_EXIT = RuleImage(roi_front=(1162,96,39,38), roi_back=(1120,49,110,135), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_red_exit.png")
 	I_RED_EXIT = RuleImage(roi_front=(1162,96,39,38), roi_back=(1120,49,110,135), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_red_exit.png")
 	# 进入主要的战斗界面 
 	# 进入主要的战斗界面 
-	I_TO_BATTLE_MAIN = RuleImage(roi_front=(141,310,39,176), roi_back=(100,242,238,269), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_to_battle_main.png")
+	I_TO_BATTLE_MAIN = RuleImage(roi_front=(223,287,39,176), roi_back=(100,242,238,269), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_to_battle_main.png")
 	# 点击进入boss战斗页面 
 	# 点击进入boss战斗页面 
-	I_TO_BATTLE_BOSS = RuleImage(roi_front=(1093,293,37,136), roi_back=(934,209,234,327), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_to_battle_boss.png")
+	I_TO_BATTLE_BOSS = RuleImage(roi_front=(1076,241,37,136), roi_back=(934,209,234,327), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_to_battle_boss.png")
 	# description 
 	# description 
-	I_CHECK_BATTLE_MAIN = RuleImage(roi_front=(34,639,39,46), roi_back=(12,597,264,105), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_check_battle_main.png")
+	I_CHECK_BATTLE_MAIN = RuleImage(roi_front=(842,565,39,45), roi_back=(688,499,415,203), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_check_battle_main.png")
 	# description 
 	# description 
 	I_CHECK_BATTLE_BOSS = RuleImage(roi_front=(34,365,45,35), roi_back=(20,328,100,100), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_check_battle_boss.png")
 	I_CHECK_BATTLE_BOSS = RuleImage(roi_front=(34,365,45,35), roi_back=(20,328,100,100), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_check_battle_boss.png")
 	# 从main进入到式神录 
 	# 从main进入到式神录 
 	I_BATTLE_MAIN_TO_RECORDS = RuleImage(roi_front=(1017,572,39,42), roi_back=(976,539,146,100), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_battle_main_to_records.png")
 	I_BATTLE_MAIN_TO_RECORDS = RuleImage(roi_front=(1017,572,39,42), roi_back=(976,539,146,100), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_battle_main_to_records.png")
 	# description 
 	# description 
 	I_TO_BATTLE_MAIN_2 = RuleImage(roi_front=(15,94,247,38), roi_back=(2,68,311,100), threshold=0.65, method="Template matching", file="./tasks/ActivityShikigami/as/as_to_battle_main_2.png")
 	I_TO_BATTLE_MAIN_2 = RuleImage(roi_front=(15,94,247,38), roi_back=(2,68,311,100), threshold=0.65, method="Template matching", file="./tasks/ActivityShikigami/as/as_to_battle_main_2.png")
+	# 确认跳过 
+	I_CONFIRM_SKIP = RuleImage(roi_front=(707,442,137,38), roi_back=(656,397,231,124), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_confirm_skip.png")
 
 
 
 
 	# Image Rule Assets
 	# Image Rule Assets
@@ -92,9 +94,9 @@ class ActivityShikigamiAssets:
 	# 挑战 
 	# 挑战 
 	O_FIRE = RuleOcr(roi=(1137,599,83,44), area=(1129,570,100,100), mode="Single", method="Default", keyword="挑战", name="fire")
 	O_FIRE = RuleOcr(roi=(1137,599,83,44), area=(1129,570,100,100), mode="Single", method="Default", keyword="挑战", name="fire")
 	# 体力的数量检测 
 	# 体力的数量检测 
-	O_REMAIN_AP = RuleOcr(roi=(575,16,73,29), area=(575,16,73,29), mode="DigitCounter", method="Default", keyword="", name="remain_ap")
+	O_REMAIN_AP = RuleOcr(roi=(930,18,98,29), area=(925,12,109,40), mode="DigitCounter", method="Default", keyword="", name="remain_ap")
 	# 活动体力的剩余检测 
 	# 活动体力的剩余检测 
-	O_REMAIN_PASS = RuleOcr(roi=(783,18,57,28), area=(783,18,57,28), mode="DigitCounter", method="Default", keyword="", name="remain_pass")
+	O_REMAIN_PASS = RuleOcr(roi=(518,18,88,28), area=(514,12,97,38), mode="DigitCounter", method="Default", keyword="", name="remain_pass")
 	# 还有多少次购买体力的机会 
 	# 还有多少次购买体力的机会 
 	O_REMAIN_BUY = RuleOcr(roi=(808,531,39,42), area=(808,531,39,42), mode="DigitCounter", method="Default", keyword="", name="remain_buy")
 	O_REMAIN_BUY = RuleOcr(roi=(808,531,39,42), area=(808,531,39,42), mode="DigitCounter", method="Default", keyword="", name="remain_buy")
 	# 活动票数(没有百分比) 
 	# 活动票数(没有百分比) 

+ 4 - 4
tasks/ActivityShikigami/fire/ocr.json

@@ -10,8 +10,8 @@
   },
   },
   {
   {
     "itemName": "remain_ap",
     "itemName": "remain_ap",
-    "roiFront": "575,16,73,29",
-    "roiBack": "575,16,73,29",
+    "roiFront": "930,18,98,29",
+    "roiBack": "925,12,109,40",
     "mode": "DigitCounter",
     "mode": "DigitCounter",
     "method": "Default",
     "method": "Default",
     "keyword": "",
     "keyword": "",
@@ -19,8 +19,8 @@
   },
   },
   {
   {
     "itemName": "remain_pass",
     "itemName": "remain_pass",
-    "roiFront": "783,18,57,28",
-    "roiBack": "783,18,57,28",
+    "roiFront": "518,18,88,28",
+    "roiBack": "514,12,97,38",
     "mode": "DigitCounter",
     "mode": "DigitCounter",
     "method": "Default",
     "method": "Default",
     "keyword": "",
     "keyword": "",

+ 1 - 1
tasks/ActivityShikigami/page.py

@@ -19,7 +19,7 @@ from tasks.base_task import BaseTask as BT
 
 
 # 爬塔活动主要界面
 # 爬塔活动主要界面
 page_climb_act = Page(asa.I_TO_BATTLE_MAIN)
 page_climb_act = Page(asa.I_TO_BATTLE_MAIN)
-page_climb_act.additional = [gga.I_UI_REWARD, asa.I_SKIP_BUTTON, asa.I_RED_EXIT]
+page_climb_act.additional = [gga.I_UI_REWARD, asa.I_SKIP_BUTTON, asa.I_CONFIRM_SKIP, asa.I_RED_EXIT]
 page_climb_act.link(button=G.I_BACK_Y, destination=page_main)
 page_climb_act.link(button=G.I_BACK_Y, destination=page_main)
 page_main.link(button=[asa.I_SHI, RAA.I_TOGGLE_BUTTON], destination=page_climb_act)
 page_main.link(button=[asa.I_SHI, RAA.I_TOGGLE_BUTTON], destination=page_climb_act)
 
 

+ 17 - 11
tasks/ActivityShikigami/script_task.py

@@ -297,6 +297,13 @@ class ScriptTask(StateMachine, GameUi, BaseActivity, SwitchSoul, ActivityShikiga
             if self.appear_then_click(self.I_WIN, interval=2):
             if self.appear_then_click(self.I_WIN, interval=2):
                 continue
                 continue
             #  出现 “魂” 和 紫蛇皮
             #  出现 “魂” 和 紫蛇皮
+<<<<<<< dev
+            if self.appear(self.I_REWARD) or self.appear(self.I_REWARD_PURPLE_SNAKE_SKIN) or \
+                    self.appear(self.I_REWARD_GOLD) or self.appear(self.I_REWARD_GOLD_SNAKE_SKIN):
+                self.random_reward_click(exclude_click=[self.C_RANDOM_RIGHT])
+                ok_cnt += 1
+                continue
+=======
             if self.appear(self.I_REWARD) or self.appear(self.I_REWARD_PURPLE_SNAKE_SKIN):
             if self.appear(self.I_REWARD) or self.appear(self.I_REWARD_PURPLE_SNAKE_SKIN):
                 logger.info('Win battle')
                 logger.info('Win battle')
                 while 1:
                 while 1:
@@ -314,11 +321,12 @@ class ScriptTask(StateMachine, GameUi, BaseActivity, SwitchSoul, ActivityShikiga
                         self.click(reward_click, interval=1.8)
                         self.click(reward_click, interval=1.8)
                         continue
                         continue
                 return True
                 return True
+>>>>>>> master
             # 已经不在战斗中了, 且奖励也识别过了, 则随机点击
             # 已经不在战斗中了, 且奖励也识别过了, 则随机点击
-            # if ok_cnt > 0 and not self.is_in_battle(False):
-            #     self.random_reward_click(exclude_click=[self.C_RANDOM_BOTTOM])
-            #     ok_cnt += 1
-            #     continue
+            if ok_cnt > 0 and not self.is_in_battle(False):
+                self.random_reward_click(exclude_click=[self.C_RANDOM_RIGHT])
+                ok_cnt += 1
+                continue
             # 战斗中随机滑动
             # 战斗中随机滑动
             if ok_cnt == 0 and random_click_swipt_enable:
             if ok_cnt == 0 and random_click_swipt_enable:
                 self.random_click_swipt()
                 self.random_click_swipt()
@@ -326,11 +334,12 @@ class ScriptTask(StateMachine, GameUi, BaseActivity, SwitchSoul, ActivityShikiga
 
 
     def switch_soul(self, enter_button: RuleImage, cur_img: RuleImage):
     def switch_soul(self, enter_button: RuleImage, cur_img: RuleImage):
         conf = self.conf.switch_soul_config
         conf = self.conf.switch_soul_config
-        conf.validate_switch_soul()
         enable_switch = getattr(conf, f"enable_switch_{self.climb_type}", False)
         enable_switch = getattr(conf, f"enable_switch_{self.climb_type}", False)
         enable_by_name = getattr(conf, f"enable_switch_{self.climb_type}_by_name", False)
         enable_by_name = getattr(conf, f"enable_switch_{self.climb_type}_by_name", False)
         if not enable_switch and not enable_by_name:
         if not enable_switch and not enable_by_name:
             return
             return
+        logger.hr('Start switch soul', 2)
+        conf.validate_switch_soul()
         self.ui_click(enter_button, stop=self.I_CHECK_RECORDS, interval=1)
         self.ui_click(enter_button, stop=self.I_CHECK_RECORDS, interval=1)
         if enable_by_name:
         if enable_by_name:
             group, team = getattr(conf, f"{self.climb_type}_group_team_name").split(",")
             group, team = getattr(conf, f"{self.climb_type}_group_team_name").split(",")
@@ -372,16 +381,13 @@ class ScriptTask(StateMachine, GameUi, BaseActivity, SwitchSoul, ActivityShikiga
         self.screenshot()
         self.screenshot()
         remain_times = 0
         remain_times = 0
         if self.climb_type == 'pass':
         if self.climb_type == 'pass':
-            remain_times = self.O_REMAIN_PASS.ocr_digit(
-                _prepare_image_for_ocr(self.device.image, asset=self.O_REMAIN_PASS))
+            remain_times = self.O_REMAIN_PASS.ocr_digit(self.device.image)
         if self.climb_type == 'ap':
         if self.climb_type == 'ap':
-            remain_times = self.O_REMAIN_AP.ocr_digit(
-                _prepare_image_for_ocr(self.device.image, asset=self.O_REMAIN_AP))
+            remain_times = self.O_REMAIN_AP.ocr_digit(self.device.image)
         if self.climb_type == 'boss':
         if self.climb_type == 'boss':
             _, remain_times, _ = self.O_REMAIN_BOSS.ocr_digit_counter(self.device.image)
             _, remain_times, _ = self.O_REMAIN_BOSS.ocr_digit_counter(self.device.image)
         if self.climb_type == 'ap100':
         if self.climb_type == 'ap100':
-            remain_times = self.O_REMAIN_AP100.ocr_digit(
-                _prepare_image_for_ocr(self.device.image, asset=self.O_REMAIN_AP100))
+            remain_times = self.O_REMAIN_AP100.ocr_digit(self.device.image)
         return remain_times > 0
         return remain_times > 0
 
 
     def get_general_battle_conf(self) -> tasks.Component.GeneralBattle.config_general_battle.GeneralBattleConfig:
     def get_general_battle_conf(self) -> tasks.Component.GeneralBattle.config_general_battle.GeneralBattleConfig:

+ 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")
 	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
 	# Image Rule Assets
 	# description 
 	# 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")
 	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")

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

@@ -20,6 +20,7 @@ class MainType(str, Enum):
     COSTUME_MAIN_11 = 'costume_main_11'  # 鏖刀禁府
     COSTUME_MAIN_11 = 'costume_main_11'  # 鏖刀禁府
     COSTUME_MAIN_12 = 'costume_main_12'  # 龙吟溯玉
     COSTUME_MAIN_12 = 'costume_main_12'  # 龙吟溯玉
     COSTUME_MAIN_13 = 'costume_main_13'  # 云景阆苑
     COSTUME_MAIN_13 = 'costume_main_13'  # 云景阆苑
+    COSTUME_MAIN_14 = 'costume_main_14'  # 雪月华庭
 
 
 # 结界皮肤
 # 结界皮肤
 class RealmType(str, Enum):
 class RealmType(str, Enum):
@@ -30,6 +31,7 @@ class CarpBannerType(str, Enum):
     COSTUME_CARPBANNER_DEFAULT = 'costume_carpbanner_default'  # 吉鲤游风
     COSTUME_CARPBANNER_DEFAULT = 'costume_carpbanner_default'  # 吉鲤游风
     COSTUME_CARPBANNER_1 = 'costume_carpbanner_1'  # 无垢莲台
     COSTUME_CARPBANNER_1 = 'costume_carpbanner_1'  # 无垢莲台
     COSTUME_CARPBANNER_2 = 'costume_carpbanner_2'  # 萤灯月夜
     COSTUME_CARPBANNER_2 = 'costume_carpbanner_2'  # 萤灯月夜
+    COSTUME_CARPBANNER_3 = 'costume_carpbanner_3'  # 鸢戏游鲤
 
 
 # 主题,就是庭院最右下角的展开按钮
 # 主题,就是庭院最右下角的展开按钮
 class ThemeType(str, Enum):
 class ThemeType(str, Enum):
@@ -45,6 +47,7 @@ class ShikigamiType(str, Enum):
     COSTUME_SHIKIGAMI_5 = 'costume_shikigami_5'  # 契光水境
     COSTUME_SHIKIGAMI_5 = 'costume_shikigami_5'  # 契光水境
     COSTUME_SHIKIGAMI_6 = 'costume_shikigami_6'  # 月下火舞
     COSTUME_SHIKIGAMI_6 = 'costume_shikigami_6'  # 月下火舞
     COSTUME_SHIKIGAMI_7 = 'costume_shikigami_7'  # 赤溟幽界
     COSTUME_SHIKIGAMI_7 = 'costume_shikigami_7'  # 赤溟幽界
+    COSTUME_SHIKIGAMI_8 = 'costume_shikigami_8'  # 童梦基地
 
 
 # 签到主题
 # 签到主题
 class SignType(str, Enum):
 class SignType(str, Enum):
@@ -64,6 +67,7 @@ class BattleType(str, Enum):
     COSTUME_BATTLE_9 = 'costume_battle_9'  # 莲华圣域
     COSTUME_BATTLE_9 = 'costume_battle_9'  # 莲华圣域
     COSTUME_BATTLE_10 = 'costume_battle_10'  # 流焰蝶舞
     COSTUME_BATTLE_10 = 'costume_battle_10'  # 流焰蝶舞
     COSTUME_BATTLE_11 = 'costume_battle_11'  # 辰烁奇夜
     COSTUME_BATTLE_11 = 'costume_battle_11'  # 辰烁奇夜
+    COSTUME_BATTLE_12 = 'costume_battle_12'  # 招财纳福
 
 
 
 
 
 
@@ -77,10 +81,12 @@ class CostumeConfig(BaseModel):
     costume_sign_type: SignType = Field(default=SignType.COSTUME_SIGN_DEFAULT, description='costume_sign_type_help')
     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')
     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
     @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
 
 
 
 
 
 

+ 10 - 4
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_SUMMON': f'I_MAIN_GOTO_SUMMON_{i}',
         'I_MAIN_GOTO_TOWN': f'I_MAIN_GOTO_TOWN_{i}',
         'I_MAIN_GOTO_TOWN': f'I_MAIN_GOTO_TOWN_{i}',
         'I_PET_HOUSE': f'I_PET_HOUSE_{i}'
         'I_PET_HOUSE': f'I_PET_HOUSE_{i}'
-    } for i in range(1, 14)
+    } for i in range(1, 15)
 }
 }
 
 
 
 
@@ -31,13 +31,13 @@ carpbanner_costume_model = {
         'I_SHI_CARD': f'I_SHI_CARD_{i}',
         'I_SHI_CARD': f'I_SHI_CARD_{i}',
         'I_SHI_DEFENSE': f'I_SHI_DEFENSE_{i}',
         'I_SHI_DEFENSE': f'I_SHI_DEFENSE_{i}',
         'I_SHI_GROWN': f'I_SHI_GROWN_{i}',
         'I_SHI_GROWN': f'I_SHI_GROWN_{i}',
-    } for i in range(1, 3)
+    } for i in range(1, 4)
 }
 }
 
 
 
 
 # 战斗主题(使用循环处理常规情况 + 特例处理)
 # 战斗主题(使用循环处理常规情况 + 特例处理)
 battle_theme_model = {}
 battle_theme_model = {}
-for i in range(1, 12):
+for i in range(1, 13):
     entry = {
     entry = {
         'I_LOCAL': f'I_LOCAL_{i}',
         'I_LOCAL': f'I_LOCAL_{i}',
         'I_EXIT': f'I_EXIT_{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_DE_WIN': 'I_DE_WIN_8',
             'I_FALSE': 'I_FALSE_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
     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_SOULS': f'I_ST_SOULS_{i}',
         'I_ST_REPLACE': f'I_ST_REPLACE_{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:
 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")
 	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": "失败"
+  }
+]

+ 9 - 0
tasks/Component/CostumeCarpBanner/assets.py

@@ -28,3 +28,12 @@ class CostumeCarpBannerAssets:
 	I_SHI_DEFENSE_2 = RuleImage(roi_front=(287,343,19,38), roi_back=(178,209,261,274), threshold=0.5, method="Template matching", file="./tasks/Component/CostumeCarpBanner/cb2/cb2_shi_defense_2.png")
 	I_SHI_DEFENSE_2 = RuleImage(roi_front=(287,343,19,38), roi_back=(178,209,261,274), threshold=0.5, method="Template matching", file="./tasks/Component/CostumeCarpBanner/cb2/cb2_shi_defense_2.png")
 
 
 
 
+	# Image Rule Assets
+	# 育成 
+	I_SHI_GROWN_3 = RuleImage(roi_front=(600,277,19,34), roi_back=(519,212,220,281), threshold=0.5, method="Template matching", file="./tasks/Component/CostumeCarpBanner/cb3/cb3_shi_grown_3.png")
+	# 结界卡 
+	I_SHI_CARD_3 = RuleImage(roi_front=(899,281,21,40), roi_back=(823,210,252,297), threshold=0.5, method="Template matching", file="./tasks/Component/CostumeCarpBanner/cb3/cb3_shi_card_3.png")
+	# 防守 
+	I_SHI_DEFENSE_3 = RuleImage(roi_front=(298,279,19,38), roi_back=(178,209,261,274), threshold=0.5, method="Template matching", file="./tasks/Component/CostumeCarpBanner/cb3/cb3_shi_defense_3.png")
+
+

BIN
tasks/Component/CostumeCarpBanner/cb3/cb3_shi_card_3.png


BIN
tasks/Component/CostumeCarpBanner/cb3/cb3_shi_defense_3.png


BIN
tasks/Component/CostumeCarpBanner/cb3/cb3_shi_grown_3.png


+ 29 - 0
tasks/Component/CostumeCarpBanner/cb3/image.json

@@ -0,0 +1,29 @@
+[
+  {
+    "itemName": "shi_grown_3",
+    "imageName": "cb3_shi_grown_3.png",
+    "roiFront": "600,277,19,34",
+    "roiBack": "519,212,220,281",
+    "method": "Template matching",
+    "threshold": 0.5,
+    "description": "育成"
+  },
+  {
+    "itemName": "shi_card_3",
+    "imageName": "cb3_shi_card_3.png",
+    "roiFront": "899,281,21,40",
+    "roiBack": "823,210,252,297",
+    "method": "Template matching",
+    "threshold": 0.5,
+    "description": "结界卡"
+  },
+  {
+    "itemName": "shi_defense_3",
+    "imageName": "cb3_shi_defense_3.png",
+    "roiFront": "298,279,19,38",
+    "roiBack": "178,209,261,274",
+    "method": "Template matching",
+    "threshold": 0.5,
+    "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_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 
 	# 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 
 	# 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 
 	# 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 
 	# 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 
 	# 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 
 	# 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")
 	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")
 	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",
     "itemName": "sou_check_group_1_6",
     "imageName": "sk6_sou_check_group_1_6.png",
     "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",
     "method": "Template matching",
     "threshold": 0.9,
     "threshold": 0.9,
     "description": "检查是否为第一组"
     "description": "检查是否为第一组"
@@ -92,8 +92,8 @@
   {
   {
     "itemName": "sou_check_group_2_6",
     "itemName": "sou_check_group_2_6",
     "imageName": "sk6_sou_check_group_2_6.png",
     "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",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
@@ -101,8 +101,8 @@
   {
   {
     "itemName": "sou_check_group_3_6",
     "itemName": "sou_check_group_3_6",
     "imageName": "sk6_sou_check_group_3_6.png",
     "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",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
@@ -110,8 +110,8 @@
   {
   {
     "itemName": "sou_check_group_4_6",
     "itemName": "sou_check_group_4_6",
     "imageName": "sk6_sou_check_group_4_6.png",
     "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",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
@@ -119,8 +119,8 @@
   {
   {
     "itemName": "sou_check_group_5_6",
     "itemName": "sou_check_group_5_6",
     "imageName": "sk6_sou_check_group_5_6.png",
     "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",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
@@ -128,8 +128,8 @@
   {
   {
     "itemName": "sou_check_group_6_6",
     "itemName": "sou_check_group_6_6",
     "imageName": "sk6_sou_check_group_6_6.png",
     "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",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
@@ -137,8 +137,8 @@
   {
   {
     "itemName": "sou_check_group_7_6",
     "itemName": "sou_check_group_7_6",
     "imageName": "sk6_sou_check_group_7_6.png",
     "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",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "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 
 	# 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")
 	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 
 	# 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 
 	# 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")
 	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 
 	# 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")
 	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 
 	# Ocr-description 
 	O_ONLINE = RuleOcr(roi=(790,102,124,42), area=(0,0,100,100), mode="Single", method="Default", keyword="", name="online")
 	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",
     "itemName": "flag_2_on",
     "imageName": "gi_flag_2_on.png",
     "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",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
@@ -377,4 +377,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "识别到寄养邀请"
     "description": "识别到寄养邀请"
   }
   }
-]
+]

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

@@ -12,19 +12,19 @@ class SwitchSoulAssets:
 
 
 	# Click Rule Assets
 	# Click Rule Assets
 	# description 
 	# 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 
 	# 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 
 	# 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 
 	# 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 
 	# 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 
 	# 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 
 	# 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")
 	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",
     "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"
     "description": "description"
   },
   },
   {
   {
     "itemName": "sou_group_2",
     "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"
     "description": "description"
   },
   },
   {
   {
     "itemName": "sou_group_3",
     "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"
     "description": "description"
   },
   },
   {
   {
     "itemName": "sou_group_4",
     "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"
     "description": "description"
   },
   },
   {
   {
     "itemName": "sou_group_5",
     "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"
     "description": "description"
   },
   },
   {
   {
     "itemName": "sou_group_6",
     "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"
     "description": "description"
   },
   },
   {
   {
     "itemName": "sou_group_7",
     "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"
     "description": "description"
   },
   },
   {
   {

+ 57 - 10
tasks/DemonEncounter/data/answer.py

@@ -23,6 +23,9 @@ class Answer:
     def __init__(self):
     def __init__(self):
         self.data: dict[str, list] = {}
         self.data: dict[str, list] = {}
         self.data_options: dict[str, list] = {}
         self.data_options: dict[str, list] = {}
+        # 添加缓存以确保相同问题的答案一致性
+        # 修改:缓存存储答案字符串而不是索引,避免选项顺序变化的影响
+        self.question_cache: dict[str, str] = {}
         file = str(Path(__file__).parent / 'data.csv')
         file = str(Path(__file__).parent / 'data.csv')
         with open(file, newline='', encoding='utf-8-sig') as csvfile:
         with open(file, newline='', encoding='utf-8-sig') as csvfile:
             reader = csv.reader(csvfile)
             reader = csv.reader(csvfile)
@@ -39,12 +42,26 @@ class Answer:
 
 
     def answer_one(self, question: str, options: list[str]) -> int|None:
     def answer_one(self, question: str, options: list[str]) -> int|None:
         """
         """
-
         每一个问题有三个选项, 返回选项的序号(1、2、3)
         每一个问题有三个选项, 返回选项的序号(1、2、3)
         :param question:
         :param question:
         :param options:
         :param options:
         :return:
         :return:
         """
         """
+        
+        # 检查缓存,如果已经处理过类似问题,直接返回结果
+        # 修改:现在缓存的是答案字符串,需要在选项中查找对应的索引
+        for cached_q, cached_answer_str in self.question_cache.items():
+            similarity = difflib.SequenceMatcher(None, question, cached_q).ratio()
+            if similarity >= 0.9:  # 如果问题相似度超过90%,直接返回缓存的答案
+                # 在当前选项中查找缓存的答案字符串
+                for idx, option in enumerate(options):
+                    if option == cached_answer_str:
+                        return idx + 1  # 返回选项索引(从1开始)
+                # 如果缓存的答案在当前选项中不存在,则尝试模糊匹配
+                for idx, option in enumerate(options):
+                    if difflib.SequenceMatcher(None, option, cached_answer_str).ratio() >= 0.9:
+                        logger.info(f"Fuzzy match cache: '{cached_answer_str}' ~ '{option}'")
+                        return idx + 1
         def decide_by_question_foreach(ques: str, ops: list[str]):
         def decide_by_question_foreach(ques: str, ops: list[str]):
             # 这个是最耗时的操作,遍历数据库中的所有题目,找到最相识的题目和选项
             # 这个是最耗时的操作,遍历数据库中的所有题目,找到最相识的题目和选项
             for key, values in self.data.items():
             for key, values in self.data.items():
@@ -58,7 +75,10 @@ class Answer:
                             logger.warning('The worst case: no match found for question and option')
                             logger.warning('The worst case: no match found for question and option')
                             logger.warning('Now traversing the entire database to find the most similar question and option')
                             logger.warning('Now traversing the entire database to find the most similar question and option')
                             logger.warning(f'Most similar question: {key} and most similar option: {value}')
                             logger.warning(f'Most similar question: {key} and most similar option: {value}')
-                            return index + 1
+                            result_index = index + 1
+                            # 修改:缓存问题和答案字符串
+                            self.question_cache[ques] = ops[index]
+                            return result_index
             return None
             return None
 
 
         def decide_by_options(question: str, ops: list[str]):
         def decide_by_options(question: str, ops: list[str]):
@@ -75,7 +95,10 @@ class Answer:
                 opts = sorted(matches.items(), key=lambda x: x[1], reverse=True)
                 opts = sorted(matches.items(), key=lambda x: x[1], reverse=True)
                 logger.warning('No match found for question,\n Now traversing the entire database to find the most similar question')
                 logger.warning('No match found for question,\n Now traversing the entire database to find the most similar question')
                 logger.warning(f'Most similar answer: {opts[0][0]}, and similarity char number is {opts[0][1]}')
                 logger.warning(f'Most similar answer: {opts[0][0]}, and similarity char number is {opts[0][1]}')
-                return opts[0][0]
+                result_index = opts[0][0]
+                # 修改:缓存问题和答案字符串
+                self.question_cache[question] = ops[result_index - 1]
+                return result_index
             index = decide_by_question_foreach(question, ops)
             index = decide_by_question_foreach(question, ops)
             return index if index else None
             return index if index else None
 
 
@@ -86,7 +109,11 @@ class Answer:
 
 
         for index, option in enumerate(options):
         for index, option in enumerate(options):
             if option == '其余选项皆对':
             if option == '其余选项皆对':
-                return index + 1
+                result_index = index + 1
+                # 特殊选项才缓存
+                # 修改:缓存问题和答案字符串
+                self.question_cache[question] = option
+                return result_index
 
 
         question_matches: list = []
         question_matches: list = []
         try:
         try:
@@ -94,12 +121,17 @@ class Answer:
         except Exception as e:
         except Exception as e:
             # 没有出现题目,从选项反入手
             # 没有出现题目,从选项反入手
             logger.error('Exception: %s', e)
             logger.error('Exception: %s', e)
-            return decide_by_options(question=question, ops=options)
+            result = decide_by_options(question=question, ops=options)
+            if result is not None:
+                # 只有在使用模糊匹配的情况下才缓存结果
+                # 修改:缓存问题和答案字符串
+                self.question_cache[question] = options[result - 1]
+            return result
         # 出现了题目,开始对答案
         # 出现了题目,开始对答案
         for index, option in enumerate(options):
         for index, option in enumerate(options):
             for match in question_matches:
             for match in question_matches:
                 if match == option:
                 if match == option:
-                    return index + 1
+                    return index + 1  # 精确匹配,不缓存,直接返回
         # 可能选项识别某一个字错误
         # 可能选项识别某一个字错误
         if all(options):
         if all(options):
             for index, option in enumerate(options):
             for index, option in enumerate(options):
@@ -108,7 +140,7 @@ class Answer:
                         continue
                         continue
                     if len(match) - count_intersection(match, option) <= 1 :
                     if len(match) - count_intersection(match, option) <= 1 :
                         logger.warning('Option is not match: %s, %s', match, option)
                         logger.warning('Option is not match: %s, %s', match, option)
-                        return index + 1
+                        return index + 1  # 这也是精确匹配的一种,不缓存,直接返回
         # 最保守策略,答案匹配度最高
         # 最保守策略,答案匹配度最高
         opts = {}
         opts = {}
         for index, option in enumerate(options):
         for index, option in enumerate(options):
@@ -122,14 +154,29 @@ class Answer:
         if opts:
         if opts:
             opts = sorted(opts.items(), key=lambda x: x[1], reverse=True)
             opts = sorted(opts.items(), key=lambda x: x[1], reverse=True)
             logger.warning(f'Use SequenceMatcher and get answers: {opts[0][0]}, score: {opts[0][1]}')
             logger.warning(f'Use SequenceMatcher and get answers: {opts[0][0]}, score: {opts[0][1]}')
-            return opts[0][0]
+            result_index = opts[0][0]
+            # 只有在这种情况下才缓存
+            # 修改:缓存问题和答案字符串
+            self.question_cache[question] = options[result_index - 1]
+            return result_index
 
 
         # 选项一个都对不上可能是,正确答案检测为空
         # 选项一个都对不上可能是,正确答案检测为空
         for index, option in enumerate(options):
         for index, option in enumerate(options):
             if option == '':
             if option == '':
                 logger.error('Option is empty: %s', options)
                 logger.error('Option is empty: %s', options)
-                return index + 1
-        return None
+                result_index = index + 1
+                # 只有在这种情况下才缓存
+                # 修改:缓存问题和答案字符串
+                self.question_cache[question] = option
+                return result_index
+                
+        # 如果所有方法都失败,尝试使用decide_by_options
+        result = decide_by_options(question=question, ops=options)
+        if result is not None:
+            # 只有在使用模糊匹配的情况下才缓存结果
+            # 修改:缓存问题和答案字符串
+            self.question_cache[question] = options[result - 1]
+        return result
 
 
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":

+ 12 - 1
tasks/DemonEncounter/data/data.csv

@@ -1646,4 +1646,15 @@ SP阶式神可以通过多少个对应的式神碎片召喚获得,60
 妖刀姬施放满级杀戮时每次转换攻击目标攻击次数会增加几次,2
 妖刀姬施放满级杀戮时每次转换攻击目标攻击次数会增加几次,2
 以下哪位式神的稀有度与其他选项的式神不同,巫蛊师
 以下哪位式神的稀有度与其他选项的式神不同,巫蛊师
 剧情中凤凰火请求晴明将谁从孔雀林中帶走,八百比丘尼
 剧情中凤凰火请求晴明将谁从孔雀林中帶走,八百比丘尼
-通过小动物三花猫可以获得的加成效果是,御魂材料加成
+通过小动物三花猫可以获得的加成效果是,御魂材料加成
+挑战日轮之陨可以获得几种不同种类的御魂,6
+式神觉醒需要什么材料,觉醒材料
+百鬼夜行可以获得什么,式神碎片
+吸血姬的乳名是什么,幸子
+吸血姬讨厌下列哪些东西,阳光
+吸血姬最喜欢的食物是,紫苏牛肉
+蝙蝠是什么种类的动物,哺乳动物
+蝙蝠依靠什么在飞行时定位,超声波
+烬天玉藻前施放焚天九尾进行多少次攻击,12
+跳跳妹妹的特长是,和小动物交流
+以下哪个不是跳跳一家的成员,炒蛋

BIN
tasks/DemonEncounter/data/鬼灭联动活动·题库.xlsx


+ 1 - 1
tasks/GameUi/assets.py

@@ -196,7 +196,7 @@ class GameUiAssets:
 	# description 
 	# 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")
 	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 
 	# 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")
 	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 
 	# 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",
     "itemName": "check_summon",
     "imageName": "page_check_summon.png",
     "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",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "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()

+ 23 - 10
tasks/Quiz/assets.py

@@ -10,35 +10,48 @@ from module.atom.list import RuleList
 class QuizAssets: 
 class QuizAssets: 
 
 
 
 
+	# Click Rule Assets
+	# description 
+	C_ANSWER_ENSURE_1 = RuleClick(roi_front=(1219,185,21,34), roi_back=(1218,184,23,37), name="answer_ensure_1")
+	# description 
+	C_ANSWER_ENSURE_2 = RuleClick(roi_front=(1223,298,19,26), roi_back=(1222,297,22,29), name="answer_ensure_2")
+	# description 
+	C_ANSWER_ENSURE_3 = RuleClick(roi_front=(1224,414,18,23), roi_back=(1223,413,21,26), name="answer_ensure_3")
+	# description 
+	C_ANSWER_ENSURE_4 = RuleClick(roi_front=(1226,524,13,29), roi_back=(1224,523,15,31), name="answer_ensure_4")
+
+
 	# Image Rule Assets
 	# Image Rule Assets
 	# description 
 	# description 
-	I_ENTRY = RuleImage(roi_front=(143,363,40,128), roi_back=(119,246,100,326), threshold=0.8, method="Template matching", file="./tasks/Quiz/quiz/quiz_entry.png")
+	I_ENTRY = RuleImage(roi_front=(770,373,33,139), roi_back=(745,281,142,329), threshold=0.8, method="Template matching", file="./tasks/Quiz/quiz/entry.png")
 	# 开始 
 	# 开始 
 	I_START = RuleImage(roi_front=(1149,608,66,41), roi_back=(1136,574,100,100), threshold=0.8, method="Template matching", file="./tasks/Quiz/quiz/quiz_start.png")
 	I_START = RuleImage(roi_front=(1149,608,66,41), roi_back=(1136,574,100,100), threshold=0.8, method="Template matching", file="./tasks/Quiz/quiz/quiz_start.png")
 	# 标志 
 	# 标志 
-	I_MESSAGE = RuleImage(roi_front=(75,488,58,41), roi_back=(50,460,100,100), threshold=0.8, method="Template matching", file="./tasks/Quiz/quiz/quiz_message.png")
+	I_MESSAGE = RuleImage(roi_front=(73,483,53,46), roi_back=(51,450,170,136), threshold=0.8, method="Template matching", file="./tasks/Quiz/quiz/message.png")
 	# 失败然后离开 
 	# 失败然后离开 
-	I_FAIL_QUIT = RuleImage(roi_front=(416,529,183,45), roi_back=(354,502,275,100), threshold=0.8, method="Template matching", file="./tasks/Quiz/quiz/quiz_fail_quit.png")
+	I_FAIL_QUIT = RuleImage(roi_front=(612,534,67,31), roi_back=(375,484,524,163), threshold=0.8, method="Template matching", file="./tasks/Quiz/quiz/fail_quit.png")
 	# 结算分享 
 	# 结算分享 
 	I_SHARE = RuleImage(roi_front=(1171,625,53,44), roi_back=(1152,592,100,100), threshold=0.8, method="Template matching", file="./tasks/Quiz/quiz/quiz_share.png")
 	I_SHARE = RuleImage(roi_front=(1171,625,53,44), roi_back=(1152,592,100,100), threshold=0.8, method="Template matching", file="./tasks/Quiz/quiz/quiz_share.png")
+	# description 
+	I_ALONE_ENSURE = RuleImage(roi_front=(1216,405,30,41), roi_back=(1138,148,140,435), threshold=0.7, method="Template matching", file="./tasks/Quiz/quiz/alone_ensure.png")
 
 
 
 
 	# Ocr Rule Assets
 	# Ocr Rule Assets
 	# Ocr-description 
 	# Ocr-description 
-	O_QUESTION = RuleOcr(roi=(903,32,322,101), area=(903,32,322,101), mode="Single", method="Default", keyword="", name="question")
+	O_QUESTION = RuleOcr(roi=(903,32,322,101), area=(0,0,100,100), mode="Full", method="Default", keyword="", name="question")
 	# Ocr-description 
 	# Ocr-description 
-	O_ANSWER1 = RuleOcr(roi=(906,178,320,53), area=(906,178,320,53), mode="Single", method="Default", keyword="", name="answer1")
+	O_ANSWER1 = RuleOcr(roi=(951,188,228,31), area=(949,187,231,34), mode="Single", method="Default", keyword="", name="answer1")
 	# Ocr-description 
 	# Ocr-description 
-	O_ANSWER2 = RuleOcr(roi=(905,289,319,51), area=(905,289,319,51), mode="Single", method="Default", keyword="", name="answer2")
+	O_ANSWER2 = RuleOcr(roi=(960,301,208,26), area=(959,300,211,29), mode="Single", method="Default", keyword="", name="answer2")
 	# Ocr-description 
 	# Ocr-description 
-	O_ANSWER3 = RuleOcr(roi=(906,399,320,55), area=(906,399,320,55), mode="Single", method="Default", keyword="", name="answer3")
+	O_ANSWER3 = RuleOcr(roi=(955,417,228,26), area=(953,415,231,29), mode="Single", method="Default", keyword="", name="answer3")
 	# Ocr-description 
 	# Ocr-description 
-	O_ANSWER4 = RuleOcr(roi=(909,511,316,54), area=(909,511,316,54), mode="Single", method="Default", keyword="", name="answer4")
+	O_ANSWER4 = RuleOcr(roi=(964,527,208,23), area=(963,526,211,26), mode="Single", method="Default", keyword="", name="answer4")
 	# 倒计时 
 	# 倒计时 
-	O_COUNTDOWN = RuleOcr(roi=(1045,6,27,30), area=(1045,6,27,30), mode="Digit", method="Default", keyword="4", name="countdown")
+	O_COUNTDOWN = RuleOcr(roi=(1030,9,61,25), area=(1029,7,63,27), mode="Digit", method="Default", keyword="4", name="countdown")
 	# 倒计时 
 	# 倒计时 
 	O_COUNTDOWN3 = RuleOcr(roi=(1045,6,27,30), area=(1045,6,27,30), mode="Digit", method="Default", keyword="3", name="countdown3")
 	O_COUNTDOWN3 = RuleOcr(roi=(1045,6,27,30), area=(1045,6,27,30), mode="Digit", method="Default", keyword="3", name="countdown3")
 	# Ocr-description 
 	# Ocr-description 
-	O_QUESTION_AND_ANSWER = RuleOcr(roi=(902,34,325,534), area=(902,34,325,534), mode="Full", method="Default", keyword="", name="question_and_answer")
+	O_QUESTION_AND_ANSWER = RuleOcr(roi=(902,34,325,534), area=(0,0,100,100), mode="Full", method="Default", keyword="", name="question_and_answer")
 
 
 
 

BIN
tasks/Quiz/quiz/alone_ensure.png


+ 26 - 0
tasks/Quiz/quiz/click.json

@@ -0,0 +1,26 @@
+[
+  {
+    "itemName": "answer_ensure_1",
+    "roiFront": "1219,185,21,34",
+    "roiBack": "1218,184,23,37",
+    "description": "description"
+  },
+  {
+    "itemName": "answer_ensure_2",
+    "roiFront": "1223,298,19,26",
+    "roiBack": "1222,297,22,29",
+    "description": "description"
+  },
+  {
+    "itemName": "answer_ensure_3",
+    "roiFront": "1224,414,18,23",
+    "roiBack": "1223,413,21,26",
+    "description": "description"
+  },
+  {
+    "itemName": "answer_ensure_4",
+    "roiFront": "1226,524,13,29",
+    "roiBack": "1224,523,15,31",
+    "description": "description"
+  }
+]

BIN
tasks/Quiz/quiz/entry.png


BIN
tasks/Quiz/quiz/fail_quit.png


+ 18 - 9
tasks/Quiz/quiz/image.json

@@ -1,9 +1,9 @@
 [
 [
   {
   {
     "itemName": "entry",
     "itemName": "entry",
-    "imageName": "quiz_entry.png",
-    "roiFront": "143,363,40,128",
-    "roiBack": "119,246,100,326",
+    "imageName": "entry.png",
+    "roiFront": "770,373,33,139",
+    "roiBack": "745,281,142,329",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
@@ -19,18 +19,18 @@
   },
   },
   {
   {
     "itemName": "message",
     "itemName": "message",
-    "imageName": "quiz_message.png",
-    "roiFront": "75,488,58,41",
-    "roiBack": "50,460,100,100",
+    "imageName": "message.png",
+    "roiFront": "73,483,53,46",
+    "roiBack": "51,450,170,136",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "标志"
     "description": "标志"
   },
   },
   {
   {
     "itemName": "fail_quit",
     "itemName": "fail_quit",
-    "imageName": "quiz_fail_quit.png",
-    "roiFront": "416,529,183,45",
-    "roiBack": "354,502,275,100",
+    "imageName": "fail_quit.png",
+    "roiFront": "612,534,67,31",
+    "roiBack": "375,484,524,163",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "失败然后离开"
     "description": "失败然后离开"
@@ -43,5 +43,14 @@
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "结算分享"
     "description": "结算分享"
+  },
+  {
+    "itemName": "alone_ensure",
+    "roiFront": "1216,405,30,41",
+    "roiBack": "1138,148,140,435",
+    "description": "description",
+    "imageName": "alone_ensure.png",
+    "method": "Template matching",
+    "threshold": "0.7"
   }
   }
 ]
 ]

BIN
tasks/Quiz/quiz/message.png


+ 13 - 13
tasks/Quiz/quiz/ocr.json

@@ -2,16 +2,16 @@
   {
   {
     "itemName": "question",
     "itemName": "question",
     "roiFront": "903,32,322,101",
     "roiFront": "903,32,322,101",
-    "roiBack": "903,32,322,101",
-    "mode": "Single",
+    "roiBack": "0,0,100,100",
+    "mode": "Full",
     "method": "Default",
     "method": "Default",
     "keyword": "",
     "keyword": "",
     "description": "Ocr-description"
     "description": "Ocr-description"
   },
   },
   {
   {
     "itemName": "answer1",
     "itemName": "answer1",
-    "roiFront": "906,178,320,53",
-    "roiBack": "906,178,320,53",
+    "roiFront": "951,188,228,31",
+    "roiBack": "949,187,231,34",
     "mode": "Single",
     "mode": "Single",
     "method": "Default",
     "method": "Default",
     "keyword": "",
     "keyword": "",
@@ -19,8 +19,8 @@
   },
   },
   {
   {
     "itemName": "answer2",
     "itemName": "answer2",
-    "roiFront": "905,289,319,51",
-    "roiBack": "905,289,319,51",
+    "roiFront": "960,301,208,26",
+    "roiBack": "959,300,211,29",
     "mode": "Single",
     "mode": "Single",
     "method": "Default",
     "method": "Default",
     "keyword": "",
     "keyword": "",
@@ -28,8 +28,8 @@
   },
   },
   {
   {
     "itemName": "answer3",
     "itemName": "answer3",
-    "roiFront": "906,399,320,55",
-    "roiBack": "906,399,320,55",
+    "roiFront": "955,417,228,26",
+    "roiBack": "953,415,231,29",
     "mode": "Single",
     "mode": "Single",
     "method": "Default",
     "method": "Default",
     "keyword": "",
     "keyword": "",
@@ -37,8 +37,8 @@
   },
   },
   {
   {
     "itemName": "answer4",
     "itemName": "answer4",
-    "roiFront": "909,511,316,54",
-    "roiBack": "909,511,316,54",
+    "roiFront": "964,527,208,23",
+    "roiBack": "963,526,211,26",
     "mode": "Single",
     "mode": "Single",
     "method": "Default",
     "method": "Default",
     "keyword": "",
     "keyword": "",
@@ -46,8 +46,8 @@
   },
   },
   {
   {
     "itemName": "countdown",
     "itemName": "countdown",
-    "roiFront": "1045,6,27,30",
-    "roiBack": "1045,6,27,30",
+    "roiFront": "1030,9,61,25",
+    "roiBack": "1029,7,63,27",
     "mode": "Digit",
     "mode": "Digit",
     "method": "Default",
     "method": "Default",
     "keyword": "4",
     "keyword": "4",
@@ -65,7 +65,7 @@
   {
   {
     "itemName": "question_and_answer",
     "itemName": "question_and_answer",
     "roiFront": "902,34,325,534",
     "roiFront": "902,34,325,534",
-    "roiBack": "902,34,325,534",
+    "roiBack": "0,0,100,100",
     "mode": "Full",
     "mode": "Full",
     "method": "Default",
     "method": "Default",
     "keyword": "",
     "keyword": "",

BIN
tasks/Quiz/quiz/quiz_entry.png


BIN
tasks/Quiz/quiz/quiz_fail_quit.png


BIN
tasks/Quiz/quiz/quiz_message.png


Некоторые файлы не были показаны из-за большого количества измененных файлов