assets.py 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. from module.atom.image import RuleImage
  2. from module.atom.click import RuleClick
  3. from module.atom.long_click import RuleLongClick
  4. from module.atom.swipe import RuleSwipe
  5. from module.atom.ocr import RuleOcr
  6. from module.atom.list import RuleList
  7. # This file was automatically generated by ./dev_tools/assets_extract.py.
  8. # Don't modify it manually.
  9. class ExplorationAssets:
  10. # Image Rule Assets
  11. # description
  12. I_LIGHTTEST = RuleImage(roi_front=(550,288,85,82), roi_back=(97,182,1130,409), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_lighttest.png")
  13. # description
  14. I_LIGHT1 = RuleImage(roi_front=(498,297,86,87), roi_back=(97,182,1130,409), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light1.png")
  15. # description
  16. I_LIGHT2 = RuleImage(roi_front=(497,300,86,82), roi_back=(97,182,1130,409), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light2.png")
  17. # description
  18. I_LIGHT3 = RuleImage(roi_front=(495,301,85,77), roi_back=(97,182,1130,409), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light3.png")
  19. # description
  20. I_LIGHT4 = RuleImage(roi_front=(496,296,85,85), roi_back=(0,0,100,100), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light4.png")
  21. # description
  22. I_LIGHT5 = RuleImage(roi_front=(494,296,82,86), roi_back=(0,0,100,100), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light5.png")
  23. # description
  24. I_LIGHT6 = RuleImage(roi_front=(490,295,83,85), roi_back=(0,0,100,100), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light6.png")
  25. # description
  26. I_LIGHT7 = RuleImage(roi_front=(486,295,84,87), roi_back=(0,0,100,100), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light7.png")
  27. # description
  28. I_LIGHT8 = RuleImage(roi_front=(485,298,84,81), roi_back=(0,0,100,100), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light8.png")
  29. # description
  30. I_LIGHT9 = RuleImage(roi_front=(484,295,85,84), roi_back=(0,0,100,100), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light9.png")
  31. # description
  32. I_LIGHT10 = RuleImage(roi_front=(479,297,84,78), roi_back=(0,0,100,100), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light10.png")
  33. # description
  34. I_LIGHT11 = RuleImage(roi_front=(479,296,83,82), roi_back=(0,0,100,100), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light11.png")
  35. # description
  36. I_LIGHT12 = RuleImage(roi_front=(477,290,85,90), roi_back=(0,0,100,100), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light12.png")
  37. # description
  38. I_LIGHT13 = RuleImage(roi_front=(478,293,82,87), roi_back=(0,0,100,100), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light13.png")
  39. # description
  40. I_LIGHT14 = RuleImage(roi_front=(474,290,82,87), roi_back=(0,0,100,100), threshold=0.6, method="Template matching", file="./tasks/Exploration/highlight/highlight_light14.png")
  41. # 经验怪
  42. I_UP_EXP = RuleImage(roi_front=(471,518,74,71), roi_back=(1,225,1278,410), threshold=0.8, method="Sift Flann", file="./tasks/Exploration/highlight/highlight_up_exp.png")
  43. # 金币怪
  44. I_UP_COIN = RuleImage(roi_front=(330,529,74,74), roi_back=(1,317,1278,316), threshold=0.8, method="Sift Flann", file="./tasks/Exploration/highlight/highlight_up_coin.png")
  45. # 达摩怪
  46. I_UP_DARUMA = RuleImage(roi_front=(1146,510,80,80), roi_back=(1,265,1278,369), threshold=0.8, method="Sift Flann", file="./tasks/Exploration/highlight/highlight_up_daruma.png")
  47. # Click Rule Assets
  48. # 点击设置按钮
  49. C_CLICK_SETTINGS = RuleClick(roi_front=(55,662,21,21), roi_back=(55,662,21,21), name="click_settings")
  50. # 选中候补出战
  51. C_CLICK_STANDBY_TEAM = RuleClick(roi_front=(545,222,506,100), roi_back=(545,222,506,100), name="click_standby_team")
  52. # 点击全部式神按钮
  53. C_CLICK_ALL_SHIKI = RuleClick(roi_front=(31,623,65,58), roi_back=(31,623,65,58), name="click_all_shiki")
  54. # 选中n阶式神
  55. C_CLICK_N_SHIKI = RuleClick(roi_front=(146,301,45,54), roi_back=(146,301,45,54), name="click_n_shiki")
  56. # 位置1
  57. C_CLICK_ROTATE_1 = RuleClick(roi_front=(516,582,22,21), roi_back=(516,582,22,21), name="click_rotate_1")
  58. # 位置2
  59. C_CLICK_ROTATE_2 = RuleClick(roi_front=(650,587,21,21), roi_back=(650,587,21,21), name="click_rotate_2")
  60. # 位置3
  61. C_CLICK_ROTATE_3 = RuleClick(roi_front=(785,587,21,21), roi_back=(785,587,21,21), name="click_rotate_3")
  62. # 位置4
  63. C_CLICK_ROTATE_4 = RuleClick(roi_front=(921,590,21,21), roi_back=(921,590,21,21), name="click_rotate_4")
  64. # 随机点
  65. C_SAFE_RANDOM = RuleClick(roi_front=(0,0,111,12), roi_back=(0,0,111,12), name="safe_random")
  66. # 点击探索大地图主线tab标题
  67. C_CLICK_MAIN_TITLE = RuleClick(roi_front=(1070,174,77,28), roi_back=(1070,174,77,28), name="click_main_title")
  68. # 点击探索大地图玩法tab标题
  69. C_CLICK_PALY_TITLE = RuleClick(roi_front=(1178,172,77,28), roi_back=(1178,172,77,28), name="click_paly_title")
  70. # Image Rule Assets
  71. # 进入难度选择界面
  72. I_E_EXPLORATION_OPEN = RuleImage(roi_front=(1077,248,37,80), roi_back=(1072,242,47,92), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_e_exploration_open.png")
  73. # 探索按钮
  74. I_E_EXPLORATION_CLICK = RuleImage(roi_front=(1076,601,96,42), roi_back=(939,555,307,127), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_e_exploration_click.png")
  75. # 自动轮换开着
  76. I_E_AUTO_ROTATE_ON = RuleImage(roi_front=(104,649,153,44), roi_back=(104,649,153,44), threshold=0.9, method="Template matching", file="./tasks/Exploration/res/res_e_auto_rotate_on.png")
  77. # 自动轮换关闭
  78. I_E_AUTO_ROTATE_OFF = RuleImage(roi_front=(108,650,150,46), roi_back=(108,650,150,46), threshold=0.85, method="Template matching", file="./tasks/Exploration/res/res_e_auto_rotate_off.png")
  79. # 成功打开设置
  80. I_E_OPEN_SETTINGS = RuleImage(roi_front=(466,110,170,50), roi_back=(466,110,170,50), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_e_open_settings.png")
  81. # 选择式神稀有度
  82. I_E_ENTER_CHOOSE_RARITY = RuleImage(roi_front=(34,288,62,47), roi_back=(34,288,62,47), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_e_enter_choose_rarity.png")
  83. # 候补N卡
  84. I_E_N_RARITY = RuleImage(roi_front=(42,625,46,49), roi_back=(42,625,46,49), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_e_n_rarity.png")
  85. # 候补素材
  86. I_E_S_RARITY = RuleImage(roi_front=(33,620,63,59), roi_back=(33,620,63,59), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_e_s_rarity.png")
  87. # 已候补出战的狗粮
  88. I_E_RATATE_EXSIT = RuleImage(roi_front=(108,580,995,32), roi_back=(108,580,995,32), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_e_ratate_exsit.png")
  89. # 确定按钮
  90. I_E_SURE_BUTTON = RuleImage(roi_front=(1131,425,43,37), roi_back=(1077,367,165,152), threshold=0.65, method="Template matching", file="./tasks/Exploration/res/res_e_sure_button.png")
  91. # 设置按钮
  92. I_E_SETTINGS_BUTTON = RuleImage(roi_front=(37,692,53,26), roi_back=(37,692,53,26), threshold=0.65, method="Template matching", file="./tasks/Exploration/res/res_e_settings_button.png")
  93. # 普通怪
  94. I_NORMAL_BATTLE_BUTTON = RuleImage(roi_front=(636,263,42,39), roi_back=(0,0,1279,719), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_normal_battle_button.png")
  95. # boss
  96. I_BOSS_BATTLE_BUTTON = RuleImage(roi_front=(683,256,38,34), roi_back=(0,0,1276,719), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_boss_battle_button.png")
  97. # 战后奖励
  98. I_BATTLE_REWARD = RuleImage(roi_front=(647,395,31,21), roi_back=(1,1,1278,718), threshold=0.9, method="Template matching", file="./tasks/Exploration/res/res_battle_reward.png")
  99. # 妖
  100. I_EXPLORATION_TITLE = RuleImage(roi_front=(1133,124,47,43), roi_back=(1133,124,47,43), threshold=0.7, method="Template matching", file="./tasks/Exploration/res/res_exploration_title.png")
  101. # description
  102. I_BATTLE_START = RuleImage(roi_front=(555,688,39,27.5), roi_back=(221,677,561,41), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_battle_start.png")
  103. # description
  104. I_RED_CLOSE = RuleImage(roi_front=(1027,129,41,42), roi_back=(1021,121,54,55), threshold=0.6, method="Template matching", file="./tasks/Exploration/res/res_red_close.png")
  105. # description
  106. I_E_EXIT_CONFIRM = RuleImage(roi_front=(694,380,163,49), roi_back=(694,380,163,49), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_e_exit_confirm.png")
  107. # 宝箱
  108. I_TREASURE_BOX_CLICK = RuleImage(roi_front=(31,543,27,24), roi_back=(11,520,378,65), threshold=0.65, method="Template matching", file="./tasks/Exploration/res/res_treasure_box_click.png")
  109. # 困28滚动到最后
  110. I_SWIPE_END = RuleImage(roi_front=(1213,79,66,265), roi_back=(1213,79,66,265), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_swipe_end.png")
  111. # 队伍的表情标志
  112. I_TEAM_EMOJI = RuleImage(roi_front=(36,437,44,46), roi_back=(4,407,100,100), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_team_emoji.png")
  113. # 组队按钮
  114. I_EXP_CREATE_TEAM = RuleImage(roi_front=(894,599,96,50), roi_back=(855,546,189,151), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_exp_create_team.png")
  115. # 创建确认
  116. I_EXP_CREATE_ENSURE = RuleImage(roi_front=(534,486,218,59), roi_back=(516,475,244,85), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_exp_create_ensure.png")
  117. # 箭头,收纳
  118. I_EXP_ARROW_RIGHT = RuleImage(roi_front=(1240,117,24,21), roi_back=(1178,74,100,100), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_exp_arrow_right.png")
  119. # 箭头,打开
  120. I_EXP_ARROW_LEFT = RuleImage(roi_front=(1244,115,18,26), roi_back=(1178,78,100,100), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_exp_arrow_left.png")
  121. # 战斗中的队友标识
  122. I_TEAM_EMOJI_FIGHT = RuleImage(roi_front=(38,405,37,37), roi_back=(18,386,74,75), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_team_emoji_fight.png")
  123. # 探索章节切换文件夹图标(移植自mine)
  124. I_E_OPEN_FOLDER = RuleImage(roi_front=(1241,114,22,28), roi_back=(1212,88,68,123), threshold=0.8, method="Template matching", file="./tasks/Exploration/res/res_e_open_folder.png")
  125. # 探索大地图主线tab标题锚点(章字)
  126. I_CHECK_MAIN_TITLE = RuleImage(roi_front=(1150,457,32,32), roi_back=(1069,222,113,336), threshold=0.85, method="Template matching", file="./tasks/Exploration/res/res_check_main_title.png")
  127. # 探索大地图玩法tab标题锚点(御魂)
  128. I_CHECK_PLAY_TITLE = RuleImage(roi_front=(1073,214,40,32), roi_back=(1065,210,190,316), threshold=0.85, method="Template matching", file="./tasks/Exploration/res/res_check_play_title.png")
  129. # Long Click Rule Assets
  130. # description
  131. L_ROTATE_1 = RuleLongClick(roi_front=(516,582,22,21), roi_back=(516,582,22,21), duration=1500, name="rotate_1")
  132. # description
  133. L_ROTATE_2 = RuleLongClick(roi_front=(650,587,21,21), roi_back=(650,587,21,21), duration=1500, name="rotate_2")
  134. # description
  135. L_ROTATE_3 = RuleLongClick(roi_front=(785,587,21,21), roi_back=(785,587,21,21), duration=1500, name="rotate_3")
  136. # description
  137. L_ROTATE_4 = RuleLongClick(roi_front=(921,590,21,21), roi_back=(921,590,21,21), duration=1500, name="rotate_4")
  138. # Ocr Rule Assets
  139. # 识别当前显示的章节
  140. O_E_EXPLORATION_LEVEL_NUMBER = RuleOcr(roi=(1064,206,121,337), area=(1064,206,121,337), mode="Full", method="Default", keyword="", name="e_exploration_level_number")
  141. # 候补出战的数量
  142. O_E_ALTERNATE_NUMBER = RuleOcr(roi=(1092,122,69,32), area=(1092,122,69,32), mode="DigitCounter", method="Default", keyword="", name="e_alternate_number")
  143. # 探索右上角 突破卷的数量
  144. O_REALM_RAID_NUMBER = RuleOcr(roi=(739,11,78,37), area=(739,11,78,37), mode="DigitCounter", method="Default", keyword="", name="realm_raid_number")
  145. # (点出困难28时候)探索右上角 突破卷的数量
  146. O_REALM_RAID_NUMBER1 = RuleOcr(roi=(936,10,82,36), area=(936,10,82,36), mode="DigitCounter", method="Default", keyword="", name="realm_raid_number1")
  147. # Swipe Rule Assets
  148. # 向上滑动章节
  149. S_SWIPE_LEVEL_UP = RuleSwipe(roi_front=(1142,328,21,21), roi_back=(1143,444,21,21), mode="default", name="swipe_level_up")
  150. # 向下滑动章节
  151. S_SWIPE_LEVEL_DOWN = RuleSwipe(roi_front=(1143,486,21,21), roi_back=(1143,367,21,23), mode="default", name="swipe_level_down")
  152. S_SWIPE_LEVEL_DOWN_PRO = RuleSwipe(roi_front=(1143, 486, 21, 21), roi_back=(1143, 248, 21, 23), mode="default", name="swipe_level_down_pro")
  153. # 往左滑动
  154. S_SWIPE_BACKGROUND_RIGHT = RuleSwipe(roi_front=(1093,148,21,21), roi_back=(397,140,21,21), mode="default", name="swipe_background_right")
  155. # 往右滑动
  156. S_SWIPE_BACKGROUND_LEFT = RuleSwipe(roi_front=(420,142,21,21), roi_back=(1183,146,21,21), mode="default", name="swipe_background_left")
  157. # 滑动狗粮选择界面
  158. S_SWIPE_SHIKI_TO_LEFT = RuleSwipe(roi_front=(890,587,21,21), roi_back=(351,584,21,21), mode="default", name="swipe_shiki_to_left")
  159. # 滑动一个式神的宽度
  160. S_SWIPE_SHIKI_TO_LEFT_ONE = RuleSwipe(roi_front=(977,582,21,21), roi_back=(889,584,21,22), mode="default", name="swipe_shiki_to_left_one")