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

Merge pull request #374 from runhey/dev

Dev
huangrunheng 2 лет назад
Родитель
Сommit
c023f18fce
100 измененных файлов с 1177 добавлено и 88 удалено
  1. 1 1
      README.md
  2. 3 3
      dev_tools/assets_test.py
  3. 82 0
      module/atom/animate.py
  4. 1 1
      module/atom/click.py
  5. 6 2
      module/atom/image.py
  6. 1 1
      module/config/config_manual.py
  7. 1 1
      module/config/config_menu.py
  8. 2 0
      module/config/config_model.py
  9. 1 0
      module/device/device.py
  10. 2 0
      tasks/AreaBoss/assets.py
  11. BIN
      tasks/AreaBoss/res/ab_rank_none.png
  12. 10 1
      tasks/AreaBoss/res/image.json
  13. 55 18
      tasks/AreaBoss/script_task.py
  14. 3 3
      tasks/Component/Costume/assets.py
  15. 3 3
      tasks/Component/Costume/main9/image.json
  16. 1 0
      tasks/Component/GeneralBattle/general_battle.py
  17. 33 16
      tasks/Component/GeneralBuff/general_buff.py
  18. 6 0
      tasks/Component/GeneralInvite/assets.py
  19. 3 2
      tasks/Component/GeneralInvite/general_invite.py
  20. 27 0
      tasks/Component/GeneralInvite/gi/image.json
  21. 24 14
      tasks/Component/SwitchSoul/switch_soul.py
  22. 2 2
      tasks/Dokan/assets.py
  23. 4 4
      tasks/Dokan/res/ocr.json
  24. 6 5
      tasks/Dokan/script_task.py
  25. 1 1
      tasks/FloatParade/script_task.py
  26. 2 2
      tasks/GameUi/assets.py
  27. 2 2
      tasks/GameUi/game_ui.py
  28. BIN
      tasks/GameUi/page/page_check_area_boss.png
  29. BIN
      tasks/GameUi/page/page_check_six_gates.png
  30. BIN
      tasks/GameUi/page/page_exploration_goto_six_gates.png
  31. 4 4
      tasks/GameUi/page/page_img.json
  32. 4 0
      tasks/GlobalGame/assets.py
  33. 18 0
      tasks/GlobalGame/ui/image.json
  34. BIN
      tasks/GlobalGame/ui/ui_ui_check.png
  35. BIN
      tasks/GlobalGame/ui/ui_ui_uncheck.png
  36. 1 1
      tasks/Pets/assets.py
  37. 1 1
      tasks/Pets/pet/image.json
  38. BIN
      tasks/Pets/pet/pet_pet_house.png
  39. 30 0
      tasks/SixRealms/README.md
  40. 183 0
      tasks/SixRealms/assets.py
  41. 13 0
      tasks/SixRealms/common.py
  42. 34 0
      tasks/SixRealms/config.py
  43. 14 0
      tasks/SixRealms/gate1/animate.json
  44. 92 0
      tasks/SixRealms/gate1/boss.json
  45. 62 0
      tasks/SixRealms/gate1/click.json
  46. BIN
      tasks/SixRealms/gate1/gate1_back_exit.png
  47. BIN
      tasks/SixRealms/gate1/gate1_boss_battle_again.png
  48. BIN
      tasks/SixRealms/gate1/gate1_boss_battle_giveup.png
  49. BIN
      tasks/SixRealms/gate1/gate1_boss_fire.png
  50. BIN
      tasks/SixRealms/gate1/gate1_boss_get_exp.png
  51. BIN
      tasks/SixRealms/gate1/gate1_boss_share.png
  52. BIN
      tasks/SixRealms/gate1/gate1_boss_shutu.png
  53. BIN
      tasks/SixRealms/gate1/gate1_boss_skip.png
  54. BIN
      tasks/SixRealms/gate1/gate1_boss_team_lock.png
  55. BIN
      tasks/SixRealms/gate1/gate1_boss_team_unlock.png
  56. BIN
      tasks/SixRealms/gate1/gate1_boss_use_double.png
  57. BIN
      tasks/SixRealms/gate1/gate1_coin.png
  58. BIN
      tasks/SixRealms/gate1/gate1_island_tag_flag.png
  59. BIN
      tasks/SixRealms/gate1/gate1_m_store.png
  60. BIN
      tasks/SixRealms/gate1/gate1_m_store_activity.png
  61. BIN
      tasks/SixRealms/gate1/gate1_mconinue.png
  62. BIN
      tasks/SixRealms/gate1/gate1_menter.png
  63. BIN
      tasks/SixRealms/gate1/gate1_mfirst_skill.png
  64. BIN
      tasks/SixRealms/gate1/gate1_mshouzu.png
  65. BIN
      tasks/SixRealms/gate1/gate1_mshouzu_select.png
  66. BIN
      tasks/SixRealms/gate1/gate1_mshuten.png
  67. BIN
      tasks/SixRealms/gate1/gate1_mskip.png
  68. BIN
      tasks/SixRealms/gate1/gate1_mstart.png
  69. BIN
      tasks/SixRealms/gate1/gate1_mstart_check.png
  70. BIN
      tasks/SixRealms/gate1/gate1_mstart_confirm.png
  71. BIN
      tasks/SixRealms/gate1/gate1_mstart_confirm2.png
  72. BIN
      tasks/SixRealms/gate1/gate1_mstart_uncheck.png
  73. BIN
      tasks/SixRealms/gate1/gate1_prepare_battle.png
  74. BIN
      tasks/SixRealms/gate1/gate1_select_0.png
  75. BIN
      tasks/SixRealms/gate1/gate1_select_1.png
  76. BIN
      tasks/SixRealms/gate1/gate1_select_2.png
  77. BIN
      tasks/SixRealms/gate1/gate1_select_3.png
  78. BIN
      tasks/SixRealms/gate1/gate1_skill101.png
  79. BIN
      tasks/SixRealms/gate1/gate1_skill102.png
  80. BIN
      tasks/SixRealms/gate1/gate1_skill105.png
  81. BIN
      tasks/SixRealms/gate1/gate1_skill_refresh.png
  82. 155 0
      tasks/SixRealms/gate1/image.json
  83. 38 0
      tasks/SixRealms/gate1/ocr.json
  84. 110 0
      tasks/SixRealms/gate1/skills.json
  85. 38 0
      tasks/SixRealms/l101/image.json
  86. BIN
      tasks/SixRealms/l101/l101_store_exit.png
  87. BIN
      tasks/SixRealms/l101/l101_store_refresh.png
  88. BIN
      tasks/SixRealms/l101/l101_store_skill_101.png
  89. BIN
      tasks/SixRealms/l101/l101_store_stable_flag.png
  90. 11 0
      tasks/SixRealms/l101/ocr.json
  91. 38 0
      tasks/SixRealms/l102/image.json
  92. BIN
      tasks/SixRealms/l102/l102_.png
  93. BIN
      tasks/SixRealms/l102/l102_coin_right_top.png
  94. BIN
      tasks/SixRealms/l102/l102_imitate.png
  95. BIN
      tasks/SixRealms/l102/l102_imitate_1.png
  96. BIN
      tasks/SixRealms/l102/l102_imitate_success.png
  97. 11 0
      tasks/SixRealms/l103/image.json
  98. BIN
      tasks/SixRealms/l103/l103_exit.png
  99. 38 0
      tasks/SixRealms/l104/image.json
  100. BIN
      tasks/SixRealms/l104/l104_battle_team_lock.png

+ 1 - 1
README.md

@@ -87,7 +87,7 @@ OAS 在其基础上进行了如下优化:
 #### QQ交流群: 465946275
 - 你的QQ等级必须大于32级(🌞🌞),注册时间超过一年,低等级账号成分复杂,还请见谅。
 - 你必须拥有一个 Github 账户来点一个 **Star** (这并不影响你入群后取消Star),同样的要求注册时间过半年。
-- 入群验证填入你的 Github id,无需在意问题是什么,由QQ机器人审核(机器永远的对的)。
+- 入群验证填入你的 Github `username`(不是`name`),无需在意问题是什么,由QQ机器人审核(机器永远的对的)。
 
 #### QQ开发群: 207613181 (有意开发本项目请加此群, 请不要胡乱加群)
 

+ 3 - 3
dev_tools/assets_test.py

@@ -34,11 +34,11 @@ def detect_ocr(file: str, target: RuleOcr):
 
 
 # 图片文件路径 可以是相对路径
-IMAGE_FILE = r"C:\Users\萌萌哒\Desktop\349772746-36423909-af3d-4d9c-bae4-9d2597e2ecda.png"
+IMAGE_FILE = r"C:\Users\Ryland\Desktop\2024-07-31_21-14-21-574521.png"
 if __name__ == '__main__':
-    from tasks.RyouToppa.assets import RyouToppaAssets
+    from tasks.SixRealms.assets import SixRealmsAssets
     from tasks.GameUi.assets import GameUiAssets
-    targe = GameUiAssets.I_MAIN_GOTO_GUILD
+    targe = SixRealmsAssets.I_BACK_EXIT
     print(detect_image(IMAGE_FILE, targe))
 
     # ocr demo

+ 82 - 0
module/atom/animate.py

@@ -0,0 +1,82 @@
+from pathlib import Path
+from module.logger import logger
+
+from module.atom.image import RuleImage
+from module.atom.click import RuleClick
+from module.atom.long_click import RuleLongClick
+from module.atom.ocr import RuleOcr
+
+
+class RuleAnimate(RuleImage):
+
+    def __init__(self,
+                 rule: RuleImage | RuleClick | RuleLongClick | RuleOcr,
+                 threshold: float = 0.75,
+                 name: str = None):
+        if isinstance(rule, RuleImage):
+            roi_front = rule.roi_front
+            roi_back = Path(rule.file).stem.upper()
+            self._name = rule.file
+            threshold = threshold
+        elif isinstance(rule, RuleClick) or isinstance(rule, RuleLongClick):
+            roi_front = rule.roi_front
+            roi_back = rule.roi_back
+            self._name = rule.name
+        elif isinstance(rule, RuleOcr):
+            roi_front = rule.roi
+            roi_back = rule.area
+            self._name = rule.name
+        else:
+            roi_front = None
+            roi_back = None
+            self._name = 'RuleAnimate'
+
+        super().__init__(
+            roi_front=list(roi_front),
+            roi_back=list(roi_back),
+            method='Template matching',
+            threshold=threshold,
+            file=''
+        )
+
+        if name is not None:
+            self._name = name
+        self._last_image = None
+
+    @property
+    def name(self) -> str:
+        return self._name.upper()
+
+    def stable(self, image) -> bool:
+        """
+        用于判断连续的两张截图,的目标区域是否一致
+        @param image:
+        @return:
+        """
+        if self._last_image is None:
+            self._last_image = image
+            return False
+
+        self._image = self._last_image
+        matched = self.match(image)
+        self._last_image = self.corp(image, self.roi_front)
+
+        if matched:
+            logger.info(f'Animation Stable @ {self.name}')
+            return True
+        return False
+
+
+if __name__ == '__main__':
+    from module.base.utils import load_image
+    from tasks.SixRealms.assets import SixRealmsAssets
+    ttt = RuleAnimate(SixRealmsAssets.C_MAIN_ANIMATE_KEEP, threshold=0.5)
+    imga = r'C:\Users\Ryland\Desktop\Desktop\37.png'
+    imgb = r'C:\Users\Ryland\Desktop\Desktop\38.png'
+    imga = load_image(imga)
+    imgb = load_image(imgb)
+
+    print(ttt.stable(imga))
+    print(ttt.stable(imgb))
+    print(ttt.stable(imgb))
+

+ 1 - 1
module/atom/click.py

@@ -8,7 +8,7 @@ from module.logger import logger
 
 class RuleClick:
 
-    def __init__(self, roi_front: tuple, roi_back: tuple, name: str=None) -> None:
+    def __init__(self, roi_front: tuple, roi_back: tuple, name: str = None) -> None:
         """
         初始化
         :param roi_front:

+ 6 - 2
module/atom/image.py

@@ -119,13 +119,17 @@ class RuleImage:
             self.load_kp_des()
         return self._des
 
-    def corp(self, image: np.array) -> np.array:
+    def corp(self, image: np.array, roi: list = None) -> np.array:
         """
         截取图片
         :param image:
+        :param roi
         :return:
         """
-        x, y, w, h = self.roi_back
+        if roi is None:
+            x, y, w, h = self.roi_back
+        else:
+            x, y, w, h = roi
         x, y, w, h = int(x), int(y), int(w), int(h)
         return image[y:y + h, x:x + w]
 

+ 1 - 1
module/config/config_manual.py

@@ -12,7 +12,7 @@ class ConfigManual:
         > KekkaiUtilize > KekkaiActivation > DemonEncounter
         > AreaBoss > GoldYoukai > ExperienceYoukai > Nian > Tako > RealmRaid > RyouToppa > DailyTrifles > Exploration
         > Dokan > Hunt 
-        > Orochi > OrochiMoans > OrochiJudgement > Sougenbi > FallenSun > EternitySea
+        > Orochi > OrochiMoans > OrochiJudgement > Sougenbi > FallenSun > EternitySea > SixRealms
         > ActivityShikigami > WantedQuests
         > BondlingFairyland > EvoZone > GoryouRealm
         > TrueOrochi > RichMan

+ 1 - 1
module/config/config_menu.py

@@ -19,7 +19,7 @@ class ConfigMenu:
         # 脚本设置
         self.menu['Script'] = ['Script', 'Restart', 'GlobalGame']
         # 刷御魂
-        self.menu["Soul Zones"] = ['Orochi', 'Sougenbi', 'FallenSun', 'EternitySea']
+        self.menu["Soul Zones"] = ['Orochi', 'Sougenbi', 'FallenSun', 'EternitySea', 'SixRealms']
         # 日常的任务
         self.menu["Daily Task"] = ['DailyTrifles', 'AreaBoss', 'GoldYoukai', 'ExperienceYoukai', 'Nian',
                                    'TalismanPass', 'DemonEncounter', 'Pets', 'SoulsTidy', 'Delegation', 'WantedQuests',

+ 2 - 0
module/config/config_model.py

@@ -41,6 +41,7 @@ from tasks.OrochiMoans.config import OrochiMoans
 from tasks.Sougenbi.config import Sougenbi
 from tasks.FallenSun.config import FallenSun
 from tasks.EternitySea.config import EternitySea
+from tasks.SixRealms.config import SixRealms
 from tasks.RealmRaid.config import RealmRaid
 from tasks.CollectiveMissions.config import CollectiveMissions
 from tasks.Hunt.config import Hunt
@@ -99,6 +100,7 @@ class ConfigModel(ConfigBase):
     sougenbi: Sougenbi = Field(default_factory=Sougenbi)
     fallen_sun: FallenSun = Field(default_factory=FallenSun)
     eternity_sea: EternitySea = Field(default_factory=EternitySea)
+    six_realms: SixRealms = Field(default_factory=SixRealms)
 
     # 这些是活动的
     activity_shikigami: ActivityShikigami = Field(default_factory=ActivityShikigami)

+ 1 - 0
module/device/device.py

@@ -110,6 +110,7 @@ class Device(Screenshot, Control, AppControl, EmulatorManager):
         :return:
         """
         self.detect_record.add(str(button))
+        logger.info(f'Add stuck record: {button}')
 
     def stuck_record_clear(self):
         self.detect_record = set()

+ 2 - 0
tasks/AreaBoss/assets.py

@@ -97,6 +97,8 @@ class AreaBossAssets:
 	I_AB_JI_FLOOR_LIST_CHECK = RuleImage(roi_front=(390,150,60,290), roi_back=(390,150,60,290), threshold=0.8, method="Template matching", file="./tasks/AreaBoss/res/ab_ji_floor_list_check.png")
 	# 极地鬼 一层 
 	I_AB_JI_FLOOR_ONE = RuleImage(roi_front=(390,150,60,290), roi_back=(390,150,60,290), threshold=0.8, method="Template matching", file="./tasks/AreaBoss/res/ab_ji_floor_one.png")
+	# 小组内未取得名次 
+	I_AB_GROUP_RANK_NONE = RuleImage(roi_front=(890,415,95,85), roi_back=(890,415,95,85), threshold=0.8, method="Template matching", file="./tasks/AreaBoss/res/ab_rank_none.png")
 
 
 	# Ocr Rule Assets

BIN
tasks/AreaBoss/res/ab_rank_none.png


+ 10 - 1
tasks/AreaBoss/res/image.json

@@ -170,7 +170,7 @@
     "threshold": 0.8,
     "description": "极地鬼 层数列表打开 标志"
   },
-    {
+  {
     "itemName": "ab_ji_floor_one",
     "imageName": "ab_ji_floor_one.png",
     "roiFront": "390,150,60,290",
@@ -178,5 +178,14 @@
     "method": "Template matching",
     "threshold": 0.8,
     "description": "极地鬼 一层"
+  },
+  {
+    "itemName": "ab_group_rank_none",
+    "imageName": "ab_rank_none.png",
+    "roiFront": "890,415,95,85",
+    "roiBack": "890,415,95,85",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "小组内未取得名次"
   }
 ]

+ 55 - 18
tasks/AreaBoss/script_task.py

@@ -140,7 +140,15 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, AreaBossAssets):
         """
         if not self.appear(self.I_AB_FILTER_OPENED):
             self.open_filter()
-        self.ui_click(battle, self.I_AB_CLOSE_RED)
+
+        # 如果打不开鬼王详情界面,直接退出
+        if not self.open_boss_detail(battle, 3):
+            return False
+
+        # 如果已经打过该BOSS,直接跳过不打了
+        if self.is_group_ranked():
+            self.ui_click_until_disappear(self.I_AB_CLOSE_RED, interval=3)
+            return True
 
         if ultra:
             if not self.get_difficulty():
@@ -150,7 +158,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, AreaBossAssets):
                     if not self.start_fight():
                         logger.warning("you are so weakness!")
                         self.wait_until_appear(self.I_AB_CLOSE_RED)
-                        self.ui_click_until_disappear(self.I_AB_CLOSE_RED, interval=1)
+                        self.ui_click_until_disappear(self.I_AB_CLOSE_RED, interval=3)
                         return False
                 # 切换到 极地鬼
                 self.switch_difficulty(True)
@@ -208,22 +216,24 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, AreaBossAssets):
             if self.appear(_to):
                 break
             if self.appear(_from):
-                self.click(_from, interval=1)
+                self.click(_from, interval=3)
                 continue
 
     def switch_to_floor_1(self):
         """
             更改层数为一层
         """
-        _Floor = ["壹星", "贰星", "叁星", "肆星", "伍星", "陆星", "柒星", "捌星", "玖星", "拾星"]
+        # _Floor = ["壹星", "贰星", "叁星", "肆星", "伍星", "陆星", "柒星", "捌星", "玖星", "拾星"]
         # 打开选择列表
-        self.ui_click(self.C_AB_JI_FLOOR_SELECTED, self.I_AB_JI_FLOOR_LIST_CHECK, interval=1)
+        self.ui_click(self.C_AB_JI_FLOOR_SELECTED, self.I_AB_JI_FLOOR_LIST_CHECK, interval=3)
         while 1:
             self.screenshot()
             if self.appear(self.I_AB_JI_FLOOR_ONE):
                 self.click(self.I_AB_JI_FLOOR_ONE)
                 break
             self.swipe(self.S_AB_FLOOR_DOWN, interval=1)
+            # 等待滑动动画
+            self.wait_until_appear(self.I_AB_JI_FLOOR_ONE, False, 1)
 
     def fight_reward_boss(self):
         index = self.get_hot_in_reward()
@@ -231,7 +241,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, AreaBossAssets):
         # 滑动到最顶层
         if index < 3:
             logger.info("swipe to top")
-            for i in range(3):
+            for i in range(random.randint(1, 3)):
                 self.swipe(self.S_AB_FILTER_DOWN)
         #
         if index == 0:
@@ -241,7 +251,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, AreaBossAssets):
         elif index == 2:
             return self.boss_fight(self.C_AB_BOSS_REWARD_PHOTO_3, True)
         # 保证滑动到最底部
-        for i in range(3):
+        for i in range(random.randint(1, 3)):
             self.swipe(self.S_AB_FILTER_UP)
         if index == 3:
             return self.boss_fight(self.C_AB_BOSS_REWARD_PHOTO_MINUS_2, True)
@@ -273,6 +283,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, AreaBossAssets):
         self.open_filter()
         for i in range(random.randint(1, 3)):
             self.swipe(self.S_AB_FILTER_UP)
+        self.wait_until_appear(self.C_AB_BOSS_REWARD_PHOTO_MINUS_2, wait_time=1)
         num = self.get_num_challenge(self.C_AB_BOSS_REWARD_PHOTO_MINUS_2)
         lst.append(num)
         self.ui_click_until_disappear(self.I_AB_CLOSE_RED)
@@ -280,6 +291,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, AreaBossAssets):
         self.open_filter()
         for i in range(random.randint(1, 3)):
             self.swipe(self.S_AB_FILTER_UP)
+        self.wait_until_appear(self.C_AB_BOSS_REWARD_PHOTO_MINUS_1, wait_time=1)
         num = self.get_num_challenge(self.C_AB_BOSS_REWARD_PHOTO_MINUS_1)
         lst.append(num)
         self.ui_click_until_disappear(self.I_AB_CLOSE_RED)
@@ -301,20 +313,45 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, AreaBossAssets):
         @rtype:
         """
         # 如果鬼王不可挑战(未解锁),限制3次尝试打开鬼王详情界面
-        numTry = 0
-        while numTry < 3:
-            self.screenshot()
-            if self.appear(self.I_AB_CLOSE_RED):
-                break
-            if self.click(click_area, interval=2):
-                numTry += 1
-        if numTry >= 3:
+        if not self.open_boss_detail(click_area, 3):
+            logger.info("%s unavailable", str(click_area))
             return 0
         return self.O_AB_NUM_OF_CHALLENGE.ocr_digit(self.device.image)
 
+    def open_boss_detail(self, battle: RuleImage, try_num: int = 3) -> bool:
+        """
+            打开鬼王详情界面
+        @param battle:
+        @type battle:
+        @param try_num: 重试次数
+        @type try_num:
+        @return:    True        打开成功
+                    False       打开失败
+        @rtype:
+        """
+        try_num = 3 if try_num <= 0 else try_num
+
+        while try_num > 0:
+            self.click(battle, interval=3)
+            if self.wait_until_appear(self.I_AB_CLOSE_RED, wait_time=3):
+                break
+            try_num -= 1
+        # 打开鬼王详情界面失败,直接返回
+        self.screenshot()
+        if self.appear(self.I_AB_CLOSE_RED):
+            return True
+        return False
+
+    def is_group_ranked(self):
+        """
+            判断该鬼王是否已经获取到小组排名
+        """
+        return not self.appear(self.I_AB_GROUP_RANK_NONE)
+        pass
+
     def open_filter(self):
         logger.info("openFilter")
-        self.ui_click(self.I_FILTER, self.I_AB_FILTER_OPENED, interval=1)
+        self.ui_click(self.I_FILTER, self.I_AB_FILTER_OPENED, interval=3)
 
     def switch_to_collect(self):
         while 1:
@@ -348,10 +385,10 @@ if __name__ == '__main__':
     from module.config.config import Config
     from module.device.device import Device
 
-    c = Config('oas2')
+    c = Config('oas1')
     d = Device(c)
     t = ScriptTask(c, d)
-    time.sleep(3)
+    # time.sleep(3)
     # t.switchFloor2One()
     # t.switch2Level60()
     t.run()

+ 3 - 3
tasks/Component/Costume/assets.py

@@ -118,11 +118,11 @@ class CostumeAssets:
 	# description 
 	I_CHECK_MAIN_9 = RuleImage(roi_front=(764,117,134,42), roi_back=(149,109,1099,100), threshold=0.8, method="Template matching", file="./tasks/Component/Costume/main9/main9_check_main_9.png")
 	# description 
-	I_MAIN_GOTO_EXPLORATION_9 = RuleImage(roi_front=(553,107,31,30), roi_back=(234,98,904,68), threshold=0.7, method="Template matching", file="./tasks/Component/Costume/main9/main9_main_goto_exploration_9.png")
+	I_MAIN_GOTO_EXPLORATION_9 = RuleImage(roi_front=(553,107,31,30), roi_back=(234,98,904,68), threshold=0.3, method="Template matching", file="./tasks/Component/Costume/main9/main9_main_goto_exploration_9.png")
 	#  
-	I_MAIN_GOTO_SUMMON_9 = RuleImage(roi_front=(970,210,35,29), roi_back=(609,194,623,68), threshold=0.7, method="Template matching", file="./tasks/Component/Costume/main9/main9_main_goto_summon_9.png")
+	I_MAIN_GOTO_SUMMON_9 = RuleImage(roi_front=(970,210,35,29), roi_back=(609,194,623,68), threshold=0.25, method="Template matching", file="./tasks/Component/Costume/main9/main9_main_goto_summon_9.png")
 	# description 
-	I_MAIN_GOTO_TOWN_9 = RuleImage(roi_front=(684,342,41,42), roi_back=(276,321,999,78), threshold=0.8, method="Template matching", file="./tasks/Component/Costume/main9/main9_main_goto_town_9.png")
+	I_MAIN_GOTO_TOWN_9 = RuleImage(roi_front=(684,342,41,42), roi_back=(276,321,999,78), threshold=0.7, method="Template matching", file="./tasks/Component/Costume/main9/main9_main_goto_town_9.png")
 	# description 
 	I_PET_HOUSE_9 = RuleImage(roi_front=(888,327,40,35), roi_back=(730,316,440,57), threshold=0.8, method="Template matching", file="./tasks/Component/Costume/main9/main9_pet_house_9.png")
 

+ 3 - 3
tasks/Component/Costume/main9/image.json

@@ -14,7 +14,7 @@
     "roiFront": "553,107,31,30",
     "roiBack": "234,98,904,68",
     "method": "Template matching",
-    "threshold": 0.7,
+    "threshold": 0.3,
     "description": "description"
   },
   {
@@ -23,7 +23,7 @@
     "roiFront": "970,210,35,29",
     "roiBack": "609,194,623,68",
     "method": "Template matching",
-    "threshold": 0.7,
+    "threshold": 0.25,
     "description": ""
   },
   {
@@ -32,7 +32,7 @@
     "roiFront": "684,342,41,42",
     "roiBack": "276,321,999,78",
     "method": "Template matching",
-    "threshold": 0.8,
+    "threshold": 0.7,
     "description": "description"
   },
   {

+ 1 - 0
tasks/Component/GeneralBattle/general_battle.py

@@ -334,6 +334,7 @@ class GeneralBattle(GeneralBuff, GeneralBattleAssets):
         logger.info("Select preset team")
 
         # 点击预设确认
+        self.wait_until_appear(self.I_PRESET_ENSURE, wait_time=1)
         while 1:
             self.screenshot()
             if self.appear_then_click(self.I_PRESET_ENSURE, threshold=0.8):

+ 33 - 16
tasks/Component/GeneralBuff/general_buff.py

@@ -49,8 +49,7 @@ class GeneralBuff(BaseTask, GeneralBuffAssets):
             if self.appear_then_click(self.I_BUFF_1, interval=2):
                 continue
 
-    @staticmethod
-    def get_area(image: np.array, buff: RuleOcr) -> tuple:
+    def get_area(self, buff: RuleOcr) -> tuple:
         """
         获取要点击的开关buff的区域
         :param cls:
@@ -58,7 +57,10 @@ class GeneralBuff(BaseTask, GeneralBuffAssets):
         :param buff:
         :return:  如果没有就返回None
         """
-        area = buff.ocr(image)
+        # 防止邀请框挡住BUFF框架
+        self.reject_invite()
+        self.screenshot()
+        area = buff.ocr(self.device.image)
         if area == tuple([0, 0, 0, 0]):
             logger.info('No gold 50 buff')
             return None
@@ -79,7 +81,6 @@ class GeneralBuff(BaseTask, GeneralBuffAssets):
         self.I_OPEN_YELLOW.roi_back = list(area)  # 动态设置roi
         self.I_CLOSE_RED.roi_back = list(area)
 
-
     def gold_50(self, is_open: bool = True):
         """
         金币50buff
@@ -88,7 +89,7 @@ class GeneralBuff(BaseTask, GeneralBuffAssets):
         """
         logger.info('Gold 50 buff')
         self.screenshot()
-        area = self.get_area(self.device.image, self.O_GOLD_50)
+        area = self.get_area(self.O_GOLD_50)
         if not area:
             logger.warning('No gold 50 buff')
             return None
@@ -117,7 +118,7 @@ class GeneralBuff(BaseTask, GeneralBuffAssets):
         """
         logger.info('Gold 100 buff')
         self.screenshot()
-        area = self.get_area(self.device.image, self.O_GOLD_100)
+        area = self.get_area(self.O_GOLD_100)
         if not area:
             logger.warning('No gold 100 buff')
             return None
@@ -147,7 +148,7 @@ class GeneralBuff(BaseTask, GeneralBuffAssets):
         logger.info('Exp 50 buff')
         while 1:
             self.screenshot()
-            area = self.get_area(self.device.image, self.O_EXP_50)
+            area = self.get_area(self.O_EXP_50)
             if not area:
                 logger.warning('No exp 50 buff')
                 continue
@@ -184,7 +185,7 @@ class GeneralBuff(BaseTask, GeneralBuffAssets):
         logger.info('Exp 100 buff')
         while 1:
             self.screenshot()
-            area = self.get_area(self.device.image, self.O_EXP_100)
+            area = self.get_area(self.O_EXP_100)
             if not area:
                 logger.warning('No exp 100 buff')
                 continue
@@ -212,8 +213,7 @@ class GeneralBuff(BaseTask, GeneralBuffAssets):
                 if self.appear_then_click(self.I_OPEN_YELLOW, interval=1):
                     continue
 
-    @staticmethod
-    def get_area_image(image: np.array, target: RuleImage) -> list:
+    def get_area_image(self, target: RuleImage) -> list:
         """
         获取觉醒加成或者是御魂加成所要点击的区域
         因为实在的图片比ocr快
@@ -221,7 +221,10 @@ class GeneralBuff(BaseTask, GeneralBuffAssets):
         :param target:
         :return:
         """
-        if not target.match(image):
+        self.reject_invite()
+        self.screenshot()
+
+        if not target.match(self.device.image):
             logger.warning(f'No {target.name} buff')
             return None
             # logger.info(f'front area: {target.roi_front}')
@@ -240,7 +243,7 @@ class GeneralBuff(BaseTask, GeneralBuffAssets):
         """
         logger.info('Awake buff')
         self.screenshot()
-        area = self.get_area_image(self.device.image, self.I_AWAKE)
+        area = self.get_area_image(self.I_AWAKE)
         if not area:
             logger.warning('No awake buff')
             return None
@@ -268,7 +271,7 @@ class GeneralBuff(BaseTask, GeneralBuffAssets):
         """
         logger.info('Soul buff')
         self.screenshot()
-        area = self.get_area_image(self.device.image, self.I_SOUL)
+        area = self.get_area_image(self.I_SOUL)
         if not area:
             logger.warning('No soul buff')
             return None
@@ -288,10 +291,27 @@ class GeneralBuff(BaseTask, GeneralBuffAssets):
                 if self.appear_then_click(self.I_OPEN_YELLOW, interval=1):
                     continue
 
+    def reject_invite(self):
+        from tasks.Component.GeneralInvite.assets import GeneralInviteAssets as gia
+        while 1:
+            self.screenshot()
+            if not (self.appear(gia.I_I_REJECT_1) or self.appear(gia.I_I_REJECT_2) or self.appear(gia.I_I_REJECT_3)):
+                break
+            if self.appear(gia.I_I_REJECT_3):
+                self.click(gia.I_I_REJECT_3, 6)
+                continue
+            if self.appear(gia.I_I_REJECT_2):
+                self.click(gia.I_I_REJECT_2, 6)
+                continue
+            if self.appear(gia.I_I_REJECT_1):
+                self.click(gia.I_I_REJECT_1, 6)
+                continue
+
 
 if __name__ == '__main__':
     from module.config.config import Config
     from module.device.device import Device
+
     c = Config('oas1')
     d = Device(c)
     t = GeneralBuff(c, d)
@@ -305,6 +325,3 @@ if __name__ == '__main__':
     t.gold_100(is_open=True)
     t.exp_50(is_open=True)
     t.exp_100(is_open=True)
-
-
-

+ 6 - 0
tasks/Component/GeneralInvite/assets.py

@@ -69,6 +69,12 @@ class GeneralInviteAssets:
 	I_ADD_SEA = RuleImage(roi_front=(836,231,100,100), roi_back=(836,231,100,100), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_add_sea.png")
 	# 队员不接受邀请 
 	I_I_REJECT = RuleImage(roi_front=(12,226,64,61), roi_back=(12,226,64,275), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_i_reject.png")
+	# 队员不接受邀请 
+	I_I_REJECT_1 = RuleImage(roi_front=(5,210,110,95), roi_back=(5,210,110,95), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_i_reject.png")
+	# 队员不接受邀请 
+	I_I_REJECT_2 = RuleImage(roi_front=(5,320,110,95), roi_back=(5,320,110,95), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_i_reject.png")
+	# 队员不接受邀请 
+	I_I_REJECT_3 = RuleImage(roi_front=(5,430,110,95), roi_back=(5,430,110,95), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_i_reject.png")
 	# 队员接受邀请 
 	I_I_ACCEPT = RuleImage(roi_front=(113,225,63,72), roi_back=(113,225,63,280), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralInvite/gi/gi_i_accept.png")
 	# 队员默认接受邀请 

+ 3 - 2
tasks/Component/GeneralInvite/general_invite.py

@@ -180,12 +180,13 @@ class GeneralInvite(BaseTask, GeneralInviteAssets):
         while 1:
             self.screenshot()
             if not self.is_in_room() and \
-                    not self.appear_then_click(self.I_GI_SURE, interval=0.5) and \
+                    not self.appear_then_click(self.I_GI_SURE, interval=0.8) and \
                     not self.appear(self.I_BACK_YELLOW):
                 break
             if self.appear_then_click(self.I_GI_SURE, interval=0.5):
                 continue
-            if not self.appear(self.I_GI_SURE) and self.appear_then_click(self.I_BACK_YELLOW, interval=0.5):
+            if not self.appear(self.I_GI_SURE) and self.appear_then_click(self.I_BACK_YELLOW, interval=0.8):
+                self.wait_until_appear(self.I_GI_SURE, wait_time=0.8)
                 continue
         return True
 

+ 27 - 0
tasks/Component/GeneralInvite/gi/image.json

@@ -260,6 +260,33 @@
     "threshold": 0.8,
     "description": "队员不接受邀请"
   },
+  {
+    "itemName": "i_reject_1",
+    "imageName": "gi_i_reject.png",
+    "roiFront": "5,210,110,95",
+    "roiBack": "5,210,110,95",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "队员不接受邀请"
+  },
+  {
+    "itemName": "i_reject_2",
+    "imageName": "gi_i_reject.png",
+    "roiFront": "5,320,110,95",
+    "roiBack": "5,320,110,95",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "队员不接受邀请"
+  },
+  {
+    "itemName": "i_reject_3",
+    "imageName": "gi_i_reject.png",
+    "roiFront": "5,430,110,95",
+    "roiBack": "5,430,110,95",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "队员不接受邀请"
+  },
   {
     "itemName": "i_accept",
     "imageName": "gi_i_accept.png",

+ 24 - 14
tasks/Component/SwitchSoul/switch_soul.py

@@ -21,6 +21,7 @@ def switch_parser(switch_str: str) -> tuple:
         raise ValueError('Switch_str must be 2 length')
     return int(switch_list[0]), int(switch_list[1])
 
+
 class SwitchSoul(BaseTask, SwitchSoulAssets):
 
     def run_switch_soul(self, target: tuple or list[tuple]):
@@ -54,7 +55,8 @@ class SwitchSoul(BaseTask, SwitchSoulAssets):
                 break
             if self.appear(self.I_SOU_TEAM_PRESENT):
                 break
-            if self.appear_then_click(self.I_SOUL_PRESET, interval=1):
+            if self.appear(self.I_SOUL_PRESET):
+                self.click(self.I_SOUL_PRESET, interval=3)
                 continue
         logger.info('Click preset in switch soul')
 
@@ -88,18 +90,19 @@ class SwitchSoul(BaseTask, SwitchSoulAssets):
             return match[team]
 
         # 滑动至分组最上层(分組過多, 导致第一个分组显示不全)
+        cur_text = ""
         while 1:
             self.screenshot()
             compare1 = self.O_SS_GROUP_NAME.detect_and_ocr(self.device.image)
-            text1 = str([result.ocr_text for result in compare1])
-            # 向上滑动
-            self.swipe(self.S_SS_GROUP_SWIPE_UP, 6)
-            self.screenshot()
-            compare2 = self.O_SS_GROUP_NAME.detect_and_ocr(self.device.image)
-            text2 = str([result.ocr_text for result in compare2])
+            ocr_text = str([result.ocr_text for result in compare1])
             # 相等时 滑动到最上层
-            if text1 == text2:
+            if cur_text == ocr_text:
                 break
+            cur_text = ocr_text
+            # 向上滑动
+            self.swipe(self.S_SS_GROUP_SWIPE_UP, 0.5)
+            # 等待滑动动画
+            sleep(0.5)
 
         if group < 1 or group > 7:
             raise ValueError('Switch soul_one group must be in [1-7]')
@@ -122,10 +125,16 @@ class SwitchSoul(BaseTask, SwitchSoulAssets):
         for i in range(3):
             sleep(0.8)
             self.screenshot()
-            if self.appear_then_click(self.I_SOU_SWITCH_SURE, interval=1):
+            if self.appear(self.I_SOU_SWITCH_SURE):
+                while 1:
+                    self.click(self.I_SOU_SWITCH_SURE, 3)
+                    self.screenshot()
+                    if not self.appear(self.I_SOU_SWITCH_SURE):
+                        break
                 continue
             if not self.appear_then_click(target_team, interval=1):
                 logger.warning(f'Click team {team} failed in group {group}')
+
         logger.info(f'Switch soul_one group {group} team {team}')
 
     def switch_souls(self, target: tuple or list[tuple]) -> None:
@@ -251,12 +260,11 @@ class SwitchSoul(BaseTask, SwitchSoulAssets):
                 break
         logger.info(f'Switch soul_one group {groupName} team {teamName}')
 
-
     def ocr_appear_click_by_rule(self,
-                         target: RuleOcr,
-                         action: Union[RuleClick, RuleLongClick] = None,
-                         interval: float = None,
-                         duration: float = None) -> bool:
+                                 target: RuleOcr,
+                                 action: Union[RuleClick, RuleLongClick] = None,
+                                 interval: float = None,
+                                 duration: float = None) -> bool:
         """
         ocr识别目标,如果目标存在,则触发动作
         :param target:
@@ -276,9 +284,11 @@ class SwitchSoul(BaseTask, SwitchSoulAssets):
         self.device.click(x=x, y=y1, control_name=target.name)
         return True
 
+
 if __name__ == '__main__':
     from module.config.config import Config
     from module.device.device import Device
+
     c = Config('oas1')
     d = Device(c)
     s = SwitchSoul(c, d)

+ 2 - 2
tasks/Dokan/assets.py

@@ -90,7 +90,7 @@ class DokanAssets:
 
 	# Ocr Rule Assets
 	# 道馆地图里找文字:万 
-	O_DOKAN_MAP = RuleOcr(roi=(1122,546,92,51), area=(1122,546,92,51), mode="Full", method="Default", keyword="万", name="dokan_map")
+	O_DOKAN_MAP = RuleOcr(roi=(270,130,740,460), area=(270,130,740,460), mode="Full", method="Default", keyword="万", name="dokan_map")
 	# 道馆里找文字:后开战 
 	O_DOKAN_GATHERING = RuleOcr(roi=(535,75,211,29), area=(535,75,211,29), mode="Single", method="Default", keyword="开战", name="dokan_gathering")
 	# 道馆里找文字:剩余突破时间 
@@ -98,6 +98,6 @@ class DokanAssets:
 	# 道馆里找文字:后挑战馆主 
 	O_DOKAN_BOSS_WAITING = RuleOcr(roi=(603,148,130,32), area=(603,148,130,32), mode="Single", method="Default", keyword="馆主", name="dokan_boss_waiting")
 	# 道馆里找文字:后关闭 
-	O_DOKAN_SUCCEEDED = RuleOcr(roi=(1122,546,92,51), area=(1122,546,92,51), mode="Full", method="Default", keyword="关闭", name="dokan_succeeded")
+	O_DOKAN_SUCCEEDED = RuleOcr(roi=(655,76,49,28), area=(655,76,49,28), mode="Full", method="Default", keyword="关闭", name="dokan_succeeded")
 
 

+ 4 - 4
tasks/Dokan/res/ocr.json

@@ -1,8 +1,8 @@
 [
   {
     "itemName": "dokan_map",
-    "roiFront": "1122,546,92,51",
-    "roiBack": "1122,546,92,51",
+    "roiFront": "270,130,740,460",
+    "roiBack": "270,130,740,460",
     "mode": "Full",
     "method": "Default",
     "keyword": "万",
@@ -37,8 +37,8 @@
   },
   {
     "itemName": "dokan_succeeded",
-    "roiFront": "1122,546,92,51",
-    "roiBack": "1122,546,92,51",
+    "roiFront": "655,76,49,28",
+    "roiBack": "655,76,49,28",
     "mode": "Full",
     "method": "Default",
     "keyword": "关闭",

+ 6 - 5
tasks/Dokan/script_task.py

@@ -314,10 +314,11 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, DokanAssets):
                 break
 
             if self.appear_then_click(target_attack, interval=1.8):
+                self.attack_priority_selected = True
                 logger.info(f"selected attack priority: {attack_priority}")
-                max_try -= 1
+                break
 
-            self.attack_priority_selected = True
+            max_try -= 1
 
         return True
 
@@ -489,9 +490,9 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, DokanAssets):
         # if self.appear(self.I_RYOU_DOKAN_FAILED_VOTE_NO):
         #     return True, DokanScene.RYOU_DOKAN_SCENE_FAILED_VOTE_NO
 
-        # 状态:道馆已经结束
-        # if self.ocr_appear(self.O_DOKAN_SUCCEEDED):
-        if self.appear(self.I_RYOU_DOKAN_FINISHED, threshold=0.8):
+        # 状态:道馆已经结束,图片位置会偏移,换OCR
+        if self.ocr_appear(self.O_DOKAN_SUCCEEDED):
+        # if self.appear(self.I_RYOU_DOKAN_FINISHED, threshold=0.8):
             return True, DokanScene.RYOU_DOKAN_SCENE_FINISHED
 
         return False, DokanScene.RYOU_DOKAN_SCENE_UNKNOWN

+ 1 - 1
tasks/FloatParade/script_task.py

@@ -18,7 +18,7 @@ class ScriptTask(GameUi, FloatParadeAssets, TalismanPassAssets):
     def run(self):
         self.ui_get_current_page()
         self.ui_goto(page_main)
-        con: FloatParadeConfig = self.config.talisman_pass.talisman
+        con: FloatParadeConfig = self.config.float_parade.float_parade
 
         # 收取全部奖励
         self.get_all()

+ 2 - 2
tasks/GameUi/assets.py

@@ -53,7 +53,7 @@ class GameUiAssets:
 	# 平安奇谭 
 	I_EXPLORATION_GOTO_HEIAN_KITAN = RuleImage(roi_front=(739,643,52,44), roi_back=(739,643,52,44), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_heian_kitan.png")
 	# 六道之门 
-	I_EXPLORATION_GOTO_SIX_GATES = RuleImage(roi_front=(834,641,60,49), roi_back=(834,641,60,49), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_six_gates.png")
+	I_EXPLORATION_GOTO_SIX_GATES = RuleImage(roi_front=(838,640,60,49), roi_back=(793,632,143,66), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_six_gates.png")
 	# 器灵 
 	I_EXPLORATION_GOTO_BONDLING_FAIRYLAND = RuleImage(roi_front=(937,639,61,54), roi_back=(937,639,61,54), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_bondling_fairyland.png")
 	# description 
@@ -71,7 +71,7 @@ class GameUiAssets:
 	# description 
 	I_CHECK_SECRET_ZONES = RuleImage(roi_front=(1145,592,110,119), roi_back=(1145,592,110,119), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_secret_zones.png")
 	# description 
-	I_CHECK_AREA_BOSS = RuleImage(roi_front=(1176,505,65,62), roi_back=(1159,487,101,106), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_area_boss.png")
+	I_CHECK_AREA_BOSS = RuleImage(roi_front=(20,320,150,130), roi_back=(20,320,150,130), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_area_boss.png")
 	# description 
 	I_CHECK_HEIAN_KITAN = RuleImage(roi_front=(27,48,47,39), roi_back=(27,48,47,39), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_heian_kitan.png")
 	# description 

+ 2 - 2
tasks/GameUi/game_ui.py

@@ -130,6 +130,8 @@ class GameUi(BaseTask, GameUiAssets):
                 if self.ui_page_appear(page=page):
                     logger.attr("UI", page.name)
                     self.ui_current = page
+                    if page == page_main and self.ensure_scroll_open():
+                        self.ui_click_until_disappear(RestartAssets.I_LOGIN_SCROOLL_CLOSE)
                     return page
             # Try to close unknown page
             for close in self.ui_close:
@@ -146,8 +148,6 @@ class GameUi(BaseTask, GameUiAssets):
             minicap_check()
             rotation_check()
 
-        if self.ensure_scroll_open():
-            self.ui_click_until_disappear(RestartAssets.I_LOGIN_SCROOLL_CLOSE)
 
         # Unknown page, need manual switching
         logger.warning("Unknown ui page")

BIN
tasks/GameUi/page/page_check_area_boss.png


BIN
tasks/GameUi/page/page_check_six_gates.png


BIN
tasks/GameUi/page/page_exploration_goto_six_gates.png


+ 4 - 4
tasks/GameUi/page/page_img.json

@@ -101,8 +101,8 @@
   {
     "itemName": "exploration_goto_six_gates",
     "imageName": "page_exploration_goto_six_gates.png",
-    "roiFront": "834,641,60,49",
-    "roiBack": "834,641,60,49",
+    "roiFront": "838,640,60,49",
+    "roiBack": "793,632,143,66",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "六道之门"
@@ -182,8 +182,8 @@
   {
     "itemName": "check_area_boss",
     "imageName": "page_check_area_boss.png",
-    "roiFront": "1176,505,65,62",
-    "roiBack": "1159,487,101,106",
+    "roiFront": "20,320,150,130",
+    "roiBack": "20,320,150,130",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"

+ 4 - 0
tasks/GlobalGame/assets.py

@@ -57,5 +57,9 @@ class GlobalGameAssets:
 	I_UI_CONFIRM_SAMLL = RuleImage(roi_front=(677,390,130,62), roi_back=(677,390,130,62), threshold=0.8, method="Template matching", file="./tasks/GlobalGame/ui/ui_ui_confirm_samll.png")
 	# 短一点的取消 
 	I_UI_CANCEL_SAMLL = RuleImage(roi_front=(472,389,128,62), roi_back=(472,389,128,62), threshold=0.8, method="Template matching", file="./tasks/GlobalGame/ui/ui_ui_cancel_samll.png")
+	# description 
+	I_UI_UNCHECK = RuleImage(roi_front=(567,343,33,36), roi_back=(497,303,216,100), threshold=0.8, method="Template matching", file="./tasks/GlobalGame/ui/ui_ui_uncheck.png")
+	# 勾选 
+	I_UI_CHECK = RuleImage(roi_front=(564,341,40,38), roi_back=(512,329,164,78), threshold=0.8, method="Template matching", file="./tasks/GlobalGame/ui/ui_ui_check.png")
 
 

+ 18 - 0
tasks/GlobalGame/ui/image.json

@@ -79,5 +79,23 @@
     "method": "Template matching",
     "threshold": 0.8,
     "description": "短一点的取消"
+  },
+  {
+    "itemName": "ui_uncheck",
+    "imageName": "ui_ui_uncheck.png",
+    "roiFront": "567,343,33,36",
+    "roiBack": "497,303,216,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "ui_check",
+    "imageName": "ui_ui_check.png",
+    "roiFront": "564,341,40,38",
+    "roiBack": "512,329,164,78",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "勾选"
   }
 ]

BIN
tasks/GlobalGame/ui/ui_ui_check.png


BIN
tasks/GlobalGame/ui/ui_ui_uncheck.png


+ 1 - 1
tasks/Pets/assets.py

@@ -12,7 +12,7 @@ class PetsAssets:
 
 	# Image Rule Assets
 	# 宠物小屋 
-	I_PET_HOUSE = RuleImage(roi_front=(1055,434,27,31), roi_back=(952,412,144,60), threshold=0.7, method="Template matching", file="./tasks/Pets/pet/pet_pet_house.png")
+	I_PET_HOUSE = RuleImage(roi_front=(1012,414,56,25), roi_back=(952,412,144,60), threshold=0.7, method="Template matching", file="./tasks/Pets/pet/pet_pet_house.png")
 	# 爪印 
 	I_PET_CLAW = RuleImage(roi_front=(1171,625,55,56), roi_back=(1171,625,55,56), threshold=0.8, method="Template matching", file="./tasks/Pets/pet/pet_pet_claw.png")
 	# 其乐融融 

+ 1 - 1
tasks/Pets/pet/image.json

@@ -2,7 +2,7 @@
   {
     "itemName": "pet_house",
     "imageName": "pet_pet_house.png",
-    "roiFront": "1055,434,27,31",
+    "roiFront": "1012,414,56,25",
     "roiBack": "952,412,144,60",
     "method": "Template matching",
     "threshold": 0.7,

BIN
tasks/Pets/pet/pet_pet_house.png


+ 30 - 0
tasks/SixRealms/README.md

@@ -0,0 +1,30 @@
+
+moon sea 月之海
+Marks (印记
+
+
+Empowering Flow 柔风
+
+
+skill101 柔风
+skill102 细雨
+skill103 暴虐
+skill104 妖力化身
+skill105 洞察之力
+
+island101 宁息 l101
+island102 神秘 l102
+island103 混沌 
+island104 鏖战
+island105 星之屿
+
+event101 宝箱
+event
+
+
+2国合
+回混范
+蜜屡战
+远宁息
+蜜馨战
+神/秘

+ 183 - 0
tasks/SixRealms/assets.py

@@ -0,0 +1,183 @@
+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 SixRealmsAssets: 
+
+
+	# Click Rule Assets
+	# description 
+	C_MAIN_ANIMATE_KEEP = RuleClick(roi_front=(565,7,100,215), roi_back=(565,7,100,215), name="main_animate_keep")
+	# description 
+	C_STORE_ANIMATE_KEEP = RuleClick(roi_front=(825,87,317,466), roi_back=(825,87,317,466), name="store_animate_keep")
+
+
+	# Image Rule Assets
+	# 大boss挑战 
+	I_BOSS_FIRE = RuleImage(roi_front=(1128,576,100,100), roi_back=(1091,557,156,147), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_boss_fire.png")
+	# description 
+	I_BOSS_TEAM_LOCK = RuleImage(roi_front=(1139,493,21,21), roi_back=(1130,487,38,43), threshold=0.95, method="Template matching", file="./tasks/SixRealms/gate1/gate1_boss_team_lock.png")
+	# description 
+	I_BOSS_TEAM_UNLOCK = RuleImage(roi_front=(1138,497,22,21), roi_back=(1127,491,40,41), threshold=0.95, method="Template matching", file="./tasks/SixRealms/gate1/gate1_boss_team_unlock.png")
+	# description 
+	I_BOSS_SKIP = RuleImage(roi_front=(1131,13,100,42), roi_back=(1113,5,136,62), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_boss_skip.png")
+	# description 
+	I_BOSS_USE_DOUBLE = RuleImage(roi_front=(669,417,126,53), roi_back=(651,407,164,71), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_boss_use_double.png")
+	# 御神获得经验 
+	I_BOSS_GET_EXP = RuleImage(roi_front=(561,109,171,45), roi_back=(492,86,281,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_boss_get_exp.png")
+	# description 
+	I_BOSS_SHARE = RuleImage(roi_front=(1090,604,70,74), roi_back=(1074,587,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_boss_share.png")
+	# 结算的椒图 
+	I_BOSS_SHUTU = RuleImage(roi_front=(435,46,388,46), roi_back=(338,1,573,166), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_boss_shutu.png")
+	# description 
+	I_BOSS_BATTLE_AGAIN = RuleImage(roi_front=(435,403,173,64), roi_back=(409,390,212,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_boss_battle_again.png")
+	# description 
+	I_BOSS_BATTLE_GIVEUP = RuleImage(roi_front=(671,399,175,59), roi_back=(649,381,219,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_boss_battle_giveup.png")
+
+
+	# Click Rule Assets
+	# 左边的 
+	C_NPC_FIRE_LEFT = RuleClick(roi_front=(423,203,153,193), roi_back=(423,203,153,193), name="npc_fire_left")
+	# description 
+	C_NPC_FIRE_RIGHT = RuleClick(roi_front=(740,248,181,180), roi_back=(740,248,181,180), name="npc_fire_right")
+	# 中间的精英 
+	C_NPC_FIRE_CENTER = RuleClick(roi_front=(620,188,174,217), roi_back=(620,188,174,217), name="npc_fire_center")
+	# 默认的 
+	C_ISLAND_ENTER = RuleClick(roi_front=(0,0,100,100), roi_back=(0,0,100,100), name="island_enter")
+	# 右数第一个 
+	C_ISLAND_ENTER_1 = RuleClick(roi_front=(1012,349,136,221), roi_back=(1012,349,136,221), name="island_enter_1")
+	# description 
+	C_ISLAND_ENTER_2 = RuleClick(roi_front=(825,341,143,224), roi_back=(825,341,143,224), name="island_enter_2")
+	# description 
+	C_ISLAND_ENTER_3 = RuleClick(roi_front=(694,338,115,222), roi_back=(694,338,115,222), name="island_enter_3")
+	# description 
+	C_ISLAND_ENTER_4 = RuleClick(roi_front=(501,323,141,243), roi_back=(501,323,141,243), name="island_enter_4")
+	# description 
+	C_ISLAND_ENTER_5 = RuleClick(roi_front=(319,332,149,237), roi_back=(319,332,149,237), name="island_enter_5")
+	# description 
+	C_ISLAND_ENTER_6 = RuleClick(roi_front=(162,265,136,302), roi_back=(162,265,136,302), name="island_enter_6")
+
+
+	# Image Rule Assets
+	# description 
+	I_MENTER = RuleImage(roi_front=(346,167,30,100), roi_back=(346,167,30,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_menter.png")
+	# 酒吞 
+	I_MSHUTEN = RuleImage(roi_front=(46,609,70,65), roi_back=(46,609,70,65), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_mshuten.png")
+	# 椒图选中 
+	I_MSHOUZU_SELECT = RuleImage(roi_front=(544,179,199,438), roi_back=(544,179,199,438), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_mshouzu_select.png")
+	# 椒图 
+	I_MSHOUZU = RuleImage(roi_front=(43,608,73,67), roi_back=(43,608,73,67), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_mshouzu.png")
+	# 开启 
+	I_MSTART = RuleImage(roi_front=(1136,575,100,100), roi_back=(1043,527,215,167), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_mstart.png")
+	# description 
+	I_MSTART_CONFIRM = RuleImage(roi_front=(1136,575,100,100), roi_back=(1080,548,182,150), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_mstart_confirm.png")
+	# description 
+	I_MSTART_UNCHECK = RuleImage(roi_front=(543,340,38,40), roi_back=(543,340,38,40), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_mstart_uncheck.png")
+	# description 
+	I_MSTART_CHECK = RuleImage(roi_front=(542,340,39,41), roi_back=(542,340,39,41), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_mstart_check.png")
+	#  
+	I_MSKIP = RuleImage(roi_front=(1117,28,58,36), roi_back=(1117,28,58,36), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_mskip.png")
+	# 左下角备战 
+	I_PREPARE_BATTLE = RuleImage(roi_front=(33,640,48,54), roi_back=(33,640,48,54), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_prepare_battle.png")
+	# 继续执行 
+	I_MCONINUE = RuleImage(roi_front=(1121,578,100,100), roi_back=(1121,578,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_mconinue.png")
+	# 选第一个柔风 
+	I_MFIRST_SKILL = RuleImage(roi_front=(255,577,141,39), roi_back=(206,550,227,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_mfirst_skill.png")
+	# 唤息 
+	I_M_STORE = RuleImage(roi_front=(1124,594,61,57), roi_back=(1103,576,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_m_store.png")
+	# 左上角退出 
+	I_BACK_EXIT = RuleImage(roi_front=(11,18,51,47), roi_back=(0,0,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_back_exit.png")
+	# 可以购买的幻息 
+	I_M_STORE_ACTIVITY = RuleImage(roi_front=(1121,596,72,57), roi_back=(1107,573,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_m_store_activity.png")
+	# description 
+	I_MSTART_CONFIRM2 = RuleImage(roi_front=(1154,581,74,85), roi_back=(1079,535,196,177), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_mstart_confirm2.png")
+	# 动画完了就有这个东西 
+	I_ISLAND_TAG_FLAG = RuleImage(roi_front=(543,601,100,100), roi_back=(543,601,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_island_tag_flag.png")
+
+
+	# Ocr Rule Assets
+	# Ocr-description 
+	O_OCR_MAP = RuleOcr(roi=(144,227,989,376), area=(144,227,989,376), mode="Full", method="Default", keyword="", name="ocr_map")
+	# Ocr-description 
+	O_ISLAND_NAME = RuleOcr(roi=(88,17,148,49), area=(88,17,148,49), mode="Single", method="Default", keyword="", name="island_name")
+	# 有多少钱 
+	O_COIN_NUM = RuleOcr(roi=(1171,23,59,31), area=(1171,23,59,31), mode="Digit", method="Default", keyword="", name="coin_num")
+	# Ocr-description 
+	O_SKILL_REFRESH = RuleOcr(roi=(1172,684,100,31), area=(1172,684,100,31), mode="Single", method="Default", keyword="", name="skill_refresh")
+
+
+	# Image Rule Assets
+	# 柔风 
+	I_SKILL101 = RuleImage(roi_front=(440,181,100,69), roi_back=(139,167,722,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_skill101.png")
+	# description 
+	I_SKILL102 = RuleImage(roi_front=(456,186,76,63), roi_back=(136,151,709,128), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_skill102.png")
+	# description 
+	I_SKILL103 = RuleImage(roi_front=(0,0,100,100), roi_back=(0,0,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_skill103.png")
+	# description 
+	I_SKILL104 = RuleImage(roi_front=(0,0,100,100), roi_back=(0,0,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_skill104.png")
+	# description 
+	I_SKILL_REFRESH = RuleImage(roi_front=(1196,625,44,39), roi_back=(1171,586,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_skill_refresh.png")
+	# description 
+	I_SELECT_0 = RuleImage(roi_front=(152,572,132,44), roi_back=(140,542,163,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_select_0.png")
+	# description 
+	I_SELECT_1 = RuleImage(roi_front=(424,573,137,46), roi_back=(382,544,196,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_select_1.png")
+	# description 
+	I_SELECT_2 = RuleImage(roi_front=(696,572,140,47), roi_back=(666,546,196,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_select_2.png")
+	# 最右边的恢复生命 
+	I_SELECT_3 = RuleImage(roi_front=(1016,581,145,43), roi_back=(1000,550,173,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_select_3.png")
+	# 六道的金币 
+	I_COIN = RuleImage(roi_front=(612,345,66,53), roi_back=(405,229,561,270), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_coin.png")
+	# 六道的金币 
+	I_COIN2 = RuleImage(roi_front=(612,345,66,53), roi_back=(405,229,561,270), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_coin.png")
+	# 洞察之力 
+	I_SKILL105 = RuleImage(roi_front=(178,187,80,69), roi_back=(112,149,779,151), threshold=0.8, method="Template matching", file="./tasks/SixRealms/gate1/gate1_skill105.png")
+
+
+	# Image Rule Assets
+	# 宁息刷新 
+	I_STORE_REFRESH = RuleImage(roi_front=(545,596,46,47), roi_back=(519,568,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/l101/l101_store_refresh.png")
+	# 购买柔风 
+	I_STORE_SKILL_101 = RuleImage(roi_front=(876,121,47,41), roi_back=(682,100,455,571), threshold=0.9, method="Template matching", file="./tasks/SixRealms/l101/l101_store_skill_101.png")
+	# description 
+	I_STORE_EXIT = RuleImage(roi_front=(1179,586,59,56), roi_back=(1161,561,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/l101/l101_store_exit.png")
+	# 稳定标志 
+	I_STORE_STABLE_FLAG = RuleImage(roi_front=(1028,251,28,27), roi_back=(1011,241,63,47), threshold=0.8, method="Template matching", file="./tasks/SixRealms/l101/l101_store_stable_flag.png")
+
+
+	# Ocr Rule Assets
+	# 刷新次数 
+	O_STORE_REFRESH_TIME = RuleOcr(roi=(538,661,110,27), area=(538,661,110,27), mode="Single", method="Default", keyword="", name="store_refresh_time")
+
+
+	# Image Rule Assets
+	# 要花钱的界面购买 
+	I_COIN_RIGHT_TOP = RuleImage(roi_front=(1065,21,40,30), roi_back=(942,10,177,112), threshold=0.8, method="Template matching", file="./tasks/SixRealms/l102/l102_coin_right_top.png")
+	# description 
+	I_IMITATE = RuleImage(roi_front=(1157,598,100,100), roi_back=(1143,577,127,132), threshold=0.8, method="Template matching", file="./tasks/SixRealms/l102/l102_imitate.png")
+	# 仿造的技能 
+	I_IMITATE_1 = RuleImage(roi_front=(839,194,59,44), roi_back=(794,174,358,268), threshold=0.8, method="Template matching", file="./tasks/SixRealms/l102/l102_imitate_1.png")
+	# description 
+	I_IMITATE_SUCCESS = RuleImage(roi_front=(535,143,209,54), roi_back=(429,122,414,100), threshold=0.7, method="Template matching", file="./tasks/SixRealms/l102/l102_imitate_success.png")
+
+
+	# Image Rule Assets
+	# description 
+	I_L103_EXIT = RuleImage(roi_front=(1171,587,69,70), roi_back=(1078,538,195,180), threshold=0.8, method="Template matching", file="./tasks/SixRealms/l103/l103_exit.png")
+
+
+	# Image Rule Assets
+	# description 
+	I_NPC_COMMON = RuleImage(roi_front=(718,232,36,40), roi_back=(684,208,100,100), threshold=0.8, method="Template matching", file="./tasks/SixRealms/l104/l104_npc_common.png")
+	# 点击挑战 
+	I_NPC_FIRE = RuleImage(roi_front=(1129,585,100,100), roi_back=(1080,551,174,144), threshold=0.8, method="Template matching", file="./tasks/SixRealms/l104/l104_npc_fire.png")
+	# description 
+	I_BATTLE_TEAM_UNLOCK = RuleImage(roi_front=(962,676,21,21), roi_back=(943,655,64,60), threshold=0.8, method="Template matching", file="./tasks/SixRealms/l104/l104_battle_team_unlock.png")
+	# description 
+	I_BATTLE_TEAM_LOCK = RuleImage(roi_front=(961,675,21,23), roi_back=(949,662,48,50), threshold=0.8, method="Template matching", file="./tasks/SixRealms/l104/l104_battle_team_lock.png")
+
+

+ 13 - 0
tasks/SixRealms/common.py

@@ -0,0 +1,13 @@
+from enum import Enum
+
+
+class MoonSeaType(Enum):
+    island100 = 100  # 未知
+    island101 = 101
+    island102 = 102
+    island103 = 103
+    island104 = 104  #
+    island105 = 105
+    island106 = 106  # boss
+
+

+ 34 - 0
tasks/SixRealms/config.py

@@ -0,0 +1,34 @@
+# This Python file uses the following encoding: utf-8
+# @author runhey
+# github https://github.com/runhey
+from pydantic import BaseModel, Field
+
+from tasks.Component.config_scheduler import Scheduler
+from tasks.Component.config_base import ConfigBase, Time
+from tasks.Component.SwitchSoul.switch_soul_config import SwitchSoulConfig
+
+
+class SixRealmsGate(BaseModel):
+    # 限制时间
+    limit_time: Time = Field(default=Time(minute=30), description='limit_time_help')
+    # 限制次数
+    limit_count: int = Field(default=1, description='limit_count_help')
+
+
+class SixRealms(ConfigBase):
+    scheduler: Scheduler = Field(default_factory=Scheduler)
+    switch_soul_config: SwitchSoulConfig = Field(default_factory=SwitchSoulConfig)
+    six_realms_gate: SixRealmsGate = Field(default_factory=SixRealmsGate)
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 14 - 0
tasks/SixRealms/gate1/animate.json

@@ -0,0 +1,14 @@
+[
+  {
+    "itemName": "main_animate_keep",
+    "roiFront": "565,7,100,215",
+    "roiBack": "565,7,100,215",
+    "description": "description"
+  },
+  {
+    "itemName": "store_animate_keep",
+    "roiFront": "825,87,317,466",
+    "roiBack": "825,87,317,466",
+    "description": "description"
+  }
+]

+ 92 - 0
tasks/SixRealms/gate1/boss.json

@@ -0,0 +1,92 @@
+[
+  {
+    "itemName": "boss_fire",
+    "imageName": "gate1_boss_fire.png",
+    "roiFront": "1128,576,100,100",
+    "roiBack": "1091,557,156,147",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "大boss挑战"
+  },
+  {
+    "itemName": "boss_team_lock",
+    "imageName": "gate1_boss_team_lock.png",
+    "roiFront": "1139,493,21,21",
+    "roiBack": "1130,487,38,43",
+    "method": "Template matching",
+    "threshold": 0.95,
+    "description": "description"
+  },
+  {
+    "itemName": "boss_team_unlock",
+    "imageName": "gate1_boss_team_unlock.png",
+    "roiFront": "1138,497,22,21",
+    "roiBack": "1127,491,40,41",
+    "method": "Template matching",
+    "threshold": 0.95,
+    "description": "description"
+  },
+  {
+    "itemName": "boss_skip",
+    "imageName": "gate1_boss_skip.png",
+    "roiFront": "1131,13,100,42",
+    "roiBack": "1113,5,136,62",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "boss_use_double",
+    "imageName": "gate1_boss_use_double.png",
+    "roiFront": "669,417,126,53",
+    "roiBack": "651,407,164,71",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "boss_get_exp",
+    "imageName": "gate1_boss_get_exp.png",
+    "roiFront": "561,109,171,45",
+    "roiBack": "492,86,281,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "御神获得经验"
+  },
+  {
+    "itemName": "boss_share",
+    "imageName": "gate1_boss_share.png",
+    "roiFront": "1090,604,70,74",
+    "roiBack": "1074,587,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "boss_shutu",
+    "imageName": "gate1_boss_shutu.png",
+    "roiFront": "435,46,388,46",
+    "roiBack": "338,1,573,166",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "结算的椒图"
+  },
+  {
+    "itemName": "boss_battle_again",
+    "imageName": "gate1_boss_battle_again.png",
+    "roiFront": "435,403,173,64",
+    "roiBack": "409,390,212,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "boss_battle_giveup",
+    "imageName": "gate1_boss_battle_giveup.png",
+    "roiFront": "671,399,175,59",
+    "roiBack": "649,381,219,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  }
+]

+ 62 - 0
tasks/SixRealms/gate1/click.json

@@ -0,0 +1,62 @@
+[
+  {
+    "itemName": "npc_fire_left",
+    "roiFront": "423,203,153,193",
+    "roiBack": "423,203,153,193",
+    "description": "左边的"
+  },
+  {
+    "itemName": "npc_fire_right",
+    "roiFront": "740,248,181,180",
+    "roiBack": "740,248,181,180",
+    "description": "description"
+  },
+  {
+    "itemName": "npc_fire_center",
+    "roiFront": "620,188,174,217",
+    "roiBack": "620,188,174,217",
+    "description": "中间的精英"
+  },
+  {
+    "itemName": "island_enter",
+    "roiFront": "0,0,100,100",
+    "roiBack": "0,0,100,100",
+    "description": "默认的"
+  },
+  {
+    "itemName": "island_enter_1",
+    "roiFront": "1012,349,136,221",
+    "roiBack": "1012,349,136,221",
+    "description": "右数第一个"
+  },
+  {
+    "itemName": "island_enter_2",
+    "roiFront": "825,341,143,224",
+    "roiBack": "825,341,143,224",
+    "description": "description"
+  },
+  {
+    "itemName": "island_enter_3",
+    "roiFront": "694,338,115,222",
+    "roiBack": "694,338,115,222",
+    "description": "description"
+  },
+  {
+    "itemName": "island_enter_4",
+    "roiFront": "501,323,141,243",
+    "roiBack": "501,323,141,243",
+    "description": "description"
+  },
+  {
+    "itemName": "island_enter_5",
+    "roiFront": "319,332,149,237",
+    "roiBack": "319,332,149,237",
+    "description": "description"
+  },
+  {
+    "itemName": "island_enter_6",
+    "roiFront": "162,265,136,302",
+    "roiBack": "162,265,136,302",
+    "description": "description"
+  }
+]

BIN
tasks/SixRealms/gate1/gate1_back_exit.png


BIN
tasks/SixRealms/gate1/gate1_boss_battle_again.png


BIN
tasks/SixRealms/gate1/gate1_boss_battle_giveup.png


BIN
tasks/SixRealms/gate1/gate1_boss_fire.png


BIN
tasks/SixRealms/gate1/gate1_boss_get_exp.png


BIN
tasks/SixRealms/gate1/gate1_boss_share.png


BIN
tasks/SixRealms/gate1/gate1_boss_shutu.png


BIN
tasks/SixRealms/gate1/gate1_boss_skip.png


BIN
tasks/SixRealms/gate1/gate1_boss_team_lock.png


BIN
tasks/SixRealms/gate1/gate1_boss_team_unlock.png


BIN
tasks/SixRealms/gate1/gate1_boss_use_double.png


BIN
tasks/SixRealms/gate1/gate1_coin.png


BIN
tasks/SixRealms/gate1/gate1_island_tag_flag.png


BIN
tasks/SixRealms/gate1/gate1_m_store.png


BIN
tasks/SixRealms/gate1/gate1_m_store_activity.png


BIN
tasks/SixRealms/gate1/gate1_mconinue.png


BIN
tasks/SixRealms/gate1/gate1_menter.png


BIN
tasks/SixRealms/gate1/gate1_mfirst_skill.png


BIN
tasks/SixRealms/gate1/gate1_mshouzu.png


BIN
tasks/SixRealms/gate1/gate1_mshouzu_select.png


BIN
tasks/SixRealms/gate1/gate1_mshuten.png


BIN
tasks/SixRealms/gate1/gate1_mskip.png


BIN
tasks/SixRealms/gate1/gate1_mstart.png


BIN
tasks/SixRealms/gate1/gate1_mstart_check.png


BIN
tasks/SixRealms/gate1/gate1_mstart_confirm.png


BIN
tasks/SixRealms/gate1/gate1_mstart_confirm2.png


BIN
tasks/SixRealms/gate1/gate1_mstart_uncheck.png


BIN
tasks/SixRealms/gate1/gate1_prepare_battle.png


BIN
tasks/SixRealms/gate1/gate1_select_0.png


BIN
tasks/SixRealms/gate1/gate1_select_1.png


BIN
tasks/SixRealms/gate1/gate1_select_2.png


BIN
tasks/SixRealms/gate1/gate1_select_3.png


BIN
tasks/SixRealms/gate1/gate1_skill101.png


BIN
tasks/SixRealms/gate1/gate1_skill102.png


BIN
tasks/SixRealms/gate1/gate1_skill105.png


BIN
tasks/SixRealms/gate1/gate1_skill_refresh.png


+ 155 - 0
tasks/SixRealms/gate1/image.json

@@ -0,0 +1,155 @@
+[
+  {
+    "itemName": "menter",
+    "imageName": "gate1_menter.png",
+    "roiFront": "346,167,30,100",
+    "roiBack": "346,167,30,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "mshuten",
+    "imageName": "gate1_mshuten.png",
+    "roiFront": "46,609,70,65",
+    "roiBack": "46,609,70,65",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "酒吞"
+  },
+  {
+    "itemName": "mshouzu_select",
+    "imageName": "gate1_mshouzu_select.png",
+    "roiFront": "544,179,199,438",
+    "roiBack": "544,179,199,438",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "椒图选中"
+  },
+  {
+    "itemName": "mshouzu",
+    "imageName": "gate1_mshouzu.png",
+    "roiFront": "43,608,73,67",
+    "roiBack": "43,608,73,67",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "椒图"
+  },
+  {
+    "itemName": "mstart",
+    "imageName": "gate1_mstart.png",
+    "roiFront": "1136,575,100,100",
+    "roiBack": "1043,527,215,167",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "开启"
+  },
+  {
+    "itemName": "mstart_confirm",
+    "imageName": "gate1_mstart_confirm.png",
+    "roiFront": "1136,575,100,100",
+    "roiBack": "1080,548,182,150",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "mstart_uncheck",
+    "imageName": "gate1_mstart_uncheck.png",
+    "roiFront": "543,340,38,40",
+    "roiBack": "543,340,38,40",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "mstart_check",
+    "imageName": "gate1_mstart_check.png",
+    "roiFront": "542,340,39,41",
+    "roiBack": "542,340,39,41",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "mskip",
+    "imageName": "gate1_mskip.png",
+    "roiFront": "1117,28,58,36",
+    "roiBack": "1117,28,58,36",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": ""
+  },
+  {
+    "itemName": "prepare_battle",
+    "imageName": "gate1_prepare_battle.png",
+    "roiFront": "33,640,48,54",
+    "roiBack": "33,640,48,54",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "左下角备战"
+  },
+  {
+    "itemName": "mconinue",
+    "imageName": "gate1_mconinue.png",
+    "roiFront": "1121,578,100,100",
+    "roiBack": "1121,578,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "继续执行"
+  },
+  {
+    "itemName": "mfirst_skill",
+    "imageName": "gate1_mfirst_skill.png",
+    "roiFront": "255,577,141,39",
+    "roiBack": "206,550,227,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "选第一个柔风"
+  },
+  {
+    "itemName": "m_store",
+    "imageName": "gate1_m_store.png",
+    "roiFront": "1124,594,61,57",
+    "roiBack": "1103,576,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "唤息"
+  },
+  {
+    "itemName": "back_exit",
+    "imageName": "gate1_back_exit.png",
+    "roiFront": "11,18,51,47",
+    "roiBack": "0,0,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "左上角退出"
+  },
+  {
+    "itemName": "m_store_activity",
+    "imageName": "gate1_m_store_activity.png",
+    "roiFront": "1121,596,72,57",
+    "roiBack": "1107,573,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "可以购买的幻息"
+  },
+  {
+    "itemName": "mstart_confirm2",
+    "imageName": "gate1_mstart_confirm2.png",
+    "roiFront": "1154,581,74,85",
+    "roiBack": "1079,535,196,177",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "island_tag_flag",
+    "imageName": "gate1_island_tag_flag.png",
+    "roiFront": "543,601,100,100",
+    "roiBack": "543,601,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "动画完了就有这个东西"
+  }
+]

+ 38 - 0
tasks/SixRealms/gate1/ocr.json

@@ -0,0 +1,38 @@
+[
+  {
+    "itemName": "ocr_map",
+    "roiFront": "144,227,989,376",
+    "roiBack": "144,227,989,376",
+    "mode": "Full",
+    "method": "Default",
+    "keyword": "",
+    "description": "Ocr-description"
+  },
+  {
+    "itemName": "island_name",
+    "roiFront": "88,17,148,49",
+    "roiBack": "88,17,148,49",
+    "mode": "Single",
+    "method": "Default",
+    "keyword": "",
+    "description": "Ocr-description"
+  },
+  {
+    "itemName": "coin_num",
+    "roiFront": "1171,23,59,31",
+    "roiBack": "1171,23,59,31",
+    "mode": "Digit",
+    "method": "Default",
+    "keyword": "",
+    "description": "有多少钱"
+  },
+  {
+    "itemName": "skill_refresh",
+    "roiFront": "1172,684,100,31",
+    "roiBack": "1172,684,100,31",
+    "mode": "Single",
+    "method": "Default",
+    "keyword": "",
+    "description": "Ocr-description"
+  }
+]

+ 110 - 0
tasks/SixRealms/gate1/skills.json

@@ -0,0 +1,110 @@
+[
+  {
+    "itemName": "skill101",
+    "imageName": "gate1_skill101.png",
+    "roiFront": "440,181,100,69",
+    "roiBack": "139,167,722,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "柔风"
+  },
+  {
+    "itemName": "skill102",
+    "imageName": "gate1_skill102.png",
+    "roiFront": "456,186,76,63",
+    "roiBack": "136,151,709,128",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "skill103",
+    "imageName": "gate1_skill103.png",
+    "roiFront": "0,0,100,100",
+    "roiBack": "0,0,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "skill104",
+    "imageName": "gate1_skill104.png",
+    "roiFront": "0,0,100,100",
+    "roiBack": "0,0,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "skill_refresh",
+    "imageName": "gate1_skill_refresh.png",
+    "roiFront": "1196,625,44,39",
+    "roiBack": "1171,586,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "select_0",
+    "imageName": "gate1_select_0.png",
+    "roiFront": "152,572,132,44",
+    "roiBack": "140,542,163,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "select_1",
+    "imageName": "gate1_select_1.png",
+    "roiFront": "424,573,137,46",
+    "roiBack": "382,544,196,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "select_2",
+    "imageName": "gate1_select_2.png",
+    "roiFront": "696,572,140,47",
+    "roiBack": "666,546,196,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "select_3",
+    "imageName": "gate1_select_3.png",
+    "roiFront": "1016,581,145,43",
+    "roiBack": "1000,550,173,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "最右边的恢复生命"
+  },
+  {
+    "itemName": "coin",
+    "imageName": "gate1_coin.png",
+    "roiFront": "612,345,66,53",
+    "roiBack": "405,229,561,270",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "六道的金币"
+  },
+  {
+    "itemName": "coin2",
+    "imageName": "gate1_coin.png",
+    "roiFront": "612,345,66,53",
+    "roiBack": "405,229,561,270",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "六道的金币"
+  },
+  {
+    "itemName": "skill105",
+    "imageName": "gate1_skill105.png",
+    "roiFront": "178,187,80,69",
+    "roiBack": "112,149,779,151",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "洞察之力"
+  }
+]

+ 38 - 0
tasks/SixRealms/l101/image.json

@@ -0,0 +1,38 @@
+[
+  {
+    "itemName": "store_refresh",
+    "imageName": "l101_store_refresh.png",
+    "roiFront": "545,596,46,47",
+    "roiBack": "519,568,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "宁息刷新"
+  },
+  {
+    "itemName": "store_skill_101",
+    "imageName": "l101_store_skill_101.png",
+    "roiFront": "876,121,47,41",
+    "roiBack": "682,100,455,571",
+    "method": "Template matching",
+    "threshold": 0.9,
+    "description": "购买柔风"
+  },
+  {
+    "itemName": "store_exit",
+    "imageName": "l101_store_exit.png",
+    "roiFront": "1179,586,59,56",
+    "roiBack": "1161,561,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "store_stable_flag",
+    "imageName": "l101_store_stable_flag.png",
+    "roiFront": "1028,251,28,27",
+    "roiBack": "1011,241,63,47",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "稳定标志"
+  }
+]

BIN
tasks/SixRealms/l101/l101_store_exit.png


BIN
tasks/SixRealms/l101/l101_store_refresh.png


BIN
tasks/SixRealms/l101/l101_store_skill_101.png


BIN
tasks/SixRealms/l101/l101_store_stable_flag.png


+ 11 - 0
tasks/SixRealms/l101/ocr.json

@@ -0,0 +1,11 @@
+[
+  {
+    "itemName": "store_refresh_time",
+    "roiFront": "538,661,110,27",
+    "roiBack": "538,661,110,27",
+    "mode": "Single",
+    "method": "Default",
+    "keyword": "",
+    "description": "刷新次数"
+  }
+]

+ 38 - 0
tasks/SixRealms/l102/image.json

@@ -0,0 +1,38 @@
+[
+  {
+    "itemName": "coin_right_top",
+    "imageName": "l102_coin_right_top.png",
+    "roiFront": "1065,21,40,30",
+    "roiBack": "942,10,177,112",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "要花钱的界面购买"
+  },
+  {
+    "itemName": "imitate",
+    "imageName": "l102_imitate.png",
+    "roiFront": "1157,598,100,100",
+    "roiBack": "1143,577,127,132",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "imitate_1",
+    "imageName": "l102_imitate_1.png",
+    "roiFront": "839,194,59,44",
+    "roiBack": "794,174,358,268",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "仿造的技能"
+  },
+  {
+    "itemName": "imitate_success",
+    "imageName": "l102_imitate_success.png",
+    "roiFront": "535,143,209,54",
+    "roiBack": "429,122,414,100",
+    "method": "Template matching",
+    "threshold": 0.7,
+    "description": "description"
+  }
+]

BIN
tasks/SixRealms/l102/l102_.png


BIN
tasks/SixRealms/l102/l102_coin_right_top.png


BIN
tasks/SixRealms/l102/l102_imitate.png


BIN
tasks/SixRealms/l102/l102_imitate_1.png


BIN
tasks/SixRealms/l102/l102_imitate_success.png


+ 11 - 0
tasks/SixRealms/l103/image.json

@@ -0,0 +1,11 @@
+[
+  {
+    "itemName": "l103_exit",
+    "imageName": "l103_exit.png",
+    "roiFront": "1171,587,69,70",
+    "roiBack": "1078,538,195,180",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  }
+]

BIN
tasks/SixRealms/l103/l103_exit.png


+ 38 - 0
tasks/SixRealms/l104/image.json

@@ -0,0 +1,38 @@
+[
+  {
+    "itemName": "npc_common",
+    "imageName": "l104_npc_common.png",
+    "roiFront": "718,232,36,40",
+    "roiBack": "684,208,100,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "npc_fire",
+    "imageName": "l104_npc_fire.png",
+    "roiFront": "1129,585,100,100",
+    "roiBack": "1080,551,174,144",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "点击挑战"
+  },
+  {
+    "itemName": "battle_team_unlock",
+    "imageName": "l104_battle_team_unlock.png",
+    "roiFront": "962,676,21,21",
+    "roiBack": "943,655,64,60",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "battle_team_lock",
+    "imageName": "l104_battle_team_lock.png",
+    "roiFront": "961,675,21,23",
+    "roiBack": "949,662,48,50",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  }
+]

BIN
tasks/SixRealms/l104/l104_battle_team_lock.png


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