assets.py 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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 RestartAssets:
  10. # Image Rule Assets
  11. # 庭院事务按钮
  12. I_NOTE = RuleImage(roi_front=(782,415,27,31), roi_back=(134,363,968,189), threshold=0.8, method="Template matching", file="./tasks/Restart/courtyard_affairs/courtyard_affairs_note.png")
  13. # 庭院事务主页
  14. I_PAGE = RuleImage(roi_front=(264,41,182,51), roi_back=(243,14,260,99), threshold=0.8, method="Template matching", file="./tasks/Restart/courtyard_affairs/courtyard_affairs_page.png")
  15. # 一键完成
  16. I_COMPLETE_TASKS = RuleImage(roi_front=(1124,599,75,78), roi_back=(1116,588,93,98), threshold=0.8, method="Template matching", file="./tasks/Restart/courtyard_affairs/courtyard_affairs_complete_tasks.png")
  17. # 领取成功
  18. I_SUCCESS_CLAIMED = RuleImage(roi_front=(302,27,184,51), roi_back=(257,10,272,84), threshold=0.8, method="Template matching", file="./tasks/Restart/courtyard_affairs/courtyard_affairs_success_claimed.png")
  19. # 日常
  20. I_DAILY = RuleImage(roi_front=(1138,139,63,45), roi_back=(1126,90,125,249), threshold=0.8, method="Template matching", file="./tasks/Restart/courtyard_affairs/courtyard_affairs_daily.png")
  21. # 暂无可完成的任务
  22. I_NO_TASKS = RuleImage(roi_front=(538,225,205,32), roi_back=(492,214,291,51), threshold=0.8, method="Template matching", file="./tasks/Restart/courtyard_affairs/courtyard_affairs_no_tasks.png")
  23. # description
  24. I_CONFIRM = RuleImage(roi_front=(674,391,131,63), roi_back=(400,199,485,320), threshold=0.8, method="Template matching", file="./tasks/Restart/courtyard_affairs/courtyard_affairs_confirm.png")
  25. # description
  26. I_SKIP = RuleImage(roi_front=(1170,36,56,28), roi_back=(1144,0,109,99), threshold=0.8, method="Template matching", file="./tasks/Restart/courtyard_affairs/courtyard_affairs_skip.png")
  27. # Image Rule Assets
  28. # 点击勾玉
  29. I_HARVEST_JADE = RuleImage(roi_front=(732,489,34,33), roi_back=(177,451,973,141), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_jade.png")
  30. # 签到小图标
  31. I_HARVEST_SIGN = RuleImage(roi_front=(397,500,24,34), roi_back=(70,471,889,89), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_sign.png")
  32. # description
  33. I_HARVEST_SIGN_2 = RuleImage(roi_front=(592,135,100,252), roi_back=(592,135,100,252), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_sign_2.png")
  34. # 999签到福袋
  35. I_HARVEST_SIGN_999 = RuleImage(roi_front=(345,494,23,29), roi_back=(51,459,888,103), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_sign_999.png")
  36. # 邮件小图标
  37. I_HARVEST_MAIL = RuleImage(roi_front=(249,504,37,25), roi_back=(38,389,1006,164), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_mail.png")
  38. # 全部收取
  39. I_HARVEST_MAIL_ALL = RuleImage(roi_front=(69,579,80,67), roi_back=(28,551,142,144), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_mail_all.png")
  40. # 有些邮件需要点击一次
  41. I_HARVEST_MAIL_OPEN = RuleImage(roi_front=(163,367,45,48), roi_back=(139,86,100,487), threshold=0.9, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_mail_open.png")
  42. # 确认收取邮件
  43. I_HARVEST_MAIL_CONFIRM = RuleImage(roi_front=(687,543,168,64), roi_back=(687,543,168,64), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_mail_confirm.png")
  44. # description
  45. I_HARVEST_SOUL = RuleImage(roi_front=(241,497,38,36), roi_back=(68,480,930,72), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_soul.png")
  46. # description
  47. I_HARVEST_MAIL_TITLE = RuleImage(roi_front=(520,48,245,41), roi_back=(520,48,245,41), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_mail_title.png")
  48. # description
  49. I_HARVEST_AP = RuleImage(roi_front=(721,486,31,38), roi_back=(206,462,970,134), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_ap.png")
  50. # 打开聊天频道会自动关闭
  51. I_HARVEST_CHAT_CLOSE = RuleImage(roi_front=(639,309,35,100), roi_back=(639,309,35,100), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_chat_close.png")
  52. # 签到
  53. I_HARVEST_SIGN_3 = RuleImage(roi_front=(291,495,33,36), roi_back=(100,473,1014,91), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_sign_3.png")
  54. # description
  55. I_HARVEST_SIGN_4 = RuleImage(roi_front=(587,151,100,228), roi_back=(547,123,185,281), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_sign_4.png")
  56. # 点击随机御魂
  57. I_HARVEST_SOUL_1 = RuleImage(roi_front=(248,501,34,37), roi_back=(165,389,929,168), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_soul_1.png")
  58. # 选择中间第二个御魂
  59. I_HARVEST_SOUL_2 = RuleImage(roi_front=(586,561,112,47), roi_back=(570,547,139,71), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_soul_2.png")
  60. # 六星御魂标志
  61. I_HARVEST_SOUL_3 = RuleImage(roi_front=(313,489,188,33), roi_back=(302,472,216,60), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_soul_3.png")
  62. # 寮包
  63. I_HARVEST_GUILD_REWARD = RuleImage(roi_front=(244,498,41,42), roi_back=(200,403,817,157), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_guild_reward.png")
  64. # 宠物小屋关闭按钮
  65. I_HARVEST_BACK_PET_HOUSE = RuleImage(roi_front=(20,15,70,70), roi_back=(20,15,70,70), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_back_pet_house.png")
  66. # 点击庭院阴阳师出现的姿度按钮
  67. I_HARVEST_ZIDU = RuleImage(roi_front=(785,475,135,135), roi_back=(785,475,135,135), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_zidu.png")
  68. # description
  69. I_HARVEST_MAIL_COPY = RuleImage(roi_front=(257,509,29,21), roi_back=(192,472,790,100), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_mail_copy.png")
  70. # description
  71. I_HARVEST_MAIL_2 = RuleImage(roi_front=(156,125,65,60), roi_back=(120,94,290,536), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_harvest_mail_2.png")
  72. # 系统邮件打开状态
  73. I_SYSTEM_MAIL_OPEN = RuleImage(roi_front=(1201,223,51,112), roi_back=(1197,219,59,118), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_system_mail_open.png")
  74. # 特殊邮件关闭状态
  75. I_SPECIAL_MAIL_CLOSE = RuleImage(roi_front=(1200,379,53,108), roi_back=(1185,342,80,178), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_special_mail_close.png")
  76. # 系统邮件关闭状态
  77. I_SYSTEM_MAIL_CLOSE = RuleImage(roi_front=(1200,222,53,112), roi_back=(1186,193,81,156), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_system_mail_close.png")
  78. # 特殊邮件打开状态
  79. I_SPECIAL_MAIL_OPEN = RuleImage(roi_front=(1201,380,55,110), roi_back=(1190,348,79,162), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_special_mail_open.png")
  80. # 一键已读所有邮件
  81. I_READ_ALL_MAIL = RuleImage(roi_front=(180,605,130,35), roi_back=(149,588,182,72), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_read_all_mail.png")
  82. # 邮件红点
  83. I_MAIL_RED_POINT = RuleImage(roi_front=(1229,200,16,21), roi_back=(1159,189,100,317), threshold=0.8, method="Template matching", file="./tasks/Restart/harvest/harvest_mail_red_point.png")
  84. # Click Rule Assets
  85. # 相同服务器多个角色选择界面,点击空白区域 确认登录
  86. C_LOGIN_ENSURE_LOGIN_CHARACTER_IN_SAME_SVR = RuleClick(roi_front=(600,240,500,400), roi_back=(600,240,500,400), name="login_ensure_login_character_in_same_svr")
  87. # 卷轴关闭区域点击(用户新增,用于点击I_LOGIN_SCROOLL_CLOSE的区域而不依赖图片识别)
  88. C_LOGIN_SCROLL_CLOSE_AREA = RuleClick(roi_front=(1181,634,28,39), roi_back=(1162,595,77,112), name="login_scroll_close_area")
  89. # 庭院卷轴收起状态标志(移植自mine)
  90. I_LOGIN_COURTYARD = RuleImage(roi_front=(40,640,100,50), roi_back=(40,640,100,50), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_courtyard.png")
  91. # Image Rule Assets
  92. # 庭院卷轴打开
  93. I_LOGIN_SCROOLL_OPEN = RuleImage(roi_front=(1208,609,33,83), roi_back=(1208,609,33,83), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_login_scrooll_open.png")
  94. # 庭院卷轴关闭
  95. I_LOGIN_SCROOLL_CLOSE = RuleImage(roi_front=(1181,634,28,39), roi_back=(1162,595,77,112), threshold=0.7, method="Template matching", file="./tasks/Restart/login/login_login_scrooll_close.png")
  96. # 卷轴关闭区域点击(用户新增,用于点击I_LOGIN_SCROOLL_CLOSE的区域而不依赖图片识别)
  97. I_LOGIN_SCROLL_CLOSE_AREA = RuleImage(roi_front=(1181,634,28,39), roi_back=(1162,595,77,112), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_scroll_close_area.png")
  98. # description
  99. I_LOGIN_RED_CLOSE = RuleImage(roi_front=(800,0,480,290), roi_back=(800,0,480,290), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_login_red_close.png")
  100. # description
  101. I_LOGIN_YELLOW_CLOSE = RuleImage(roi_front=(29,17,46,44), roi_back=(0,0,94,86), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_login_yellow_close.png")
  102. # 用于判断是否出现登录选区的
  103. I_LOGIN_8 = RuleImage(roi_front=(178,572,53,60), roi_back=(1,547,241,105), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_login_8.png")
  104. # 登录时候不观看CG视频
  105. I_WATCH_VIDEO_CANCEL = RuleImage(roi_front=(466,396,130,61), roi_back=(466,396,130,61), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_watch_video_cancel.png")
  106. # 指定角色进入游戏,默认第一个
  107. I_LOGIN_SPECIFIC_SERVE = RuleImage(roi_front=(0,0,120,120), roi_back=(0,0,120,120), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_login_specific_serve.png")
  108. # 下载插画
  109. I_LOGIN_LOAD_DOWN = RuleImage(roi_front=(711,450,153,58), roi_back=(711,450,153,58), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_login_load_down.png")
  110. # 登录界面 弹出框 前往绑定 手机
  111. I_LOGIN_LOGIN_GOTO_BIND_PHONE = RuleImage(roi_front=(940,430,170,150), roi_back=(940,430,170,150), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_login_goto_bind_phone.png")
  112. # 登录界面 弹出框 确定绑定手机
  113. I_LOGIN_LOGIN_ENSURE_BIND_PHONE = RuleImage(roi_front=(670,460,160,100), roi_back=(670,460,160,100), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_login_ensure_bind_phone.png")
  114. # 登录界面 弹出框 取消绑定手机
  115. I_LOGIN_LOGIN_CANCEL_BIND_PHONE = RuleImage(roi_front=(450,460,160,100), roi_back=(450,460,160,100), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_login_cancel_bind_phone.png")
  116. # 登录界面 弹出框 阴阳师精灵
  117. I_LOGIN_LOGIN_ONMYOJI_GENIE = RuleImage(roi_front=(80,110,280,120), roi_back=(80,110,280,120), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_login_onmyoji_genie.png")
  118. # 已有角色
  119. I_CHARACTARS = RuleImage(roi_front=(246,535,100,31), roi_back=(219,523,173,57), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_charactars.png")
  120. # description
  121. I_CREATE_ACCOUNT = RuleImage(roi_front=(555,636,169,52), roi_back=(504,614,263,100), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_create_account.png")
  122. # 进入体验服过快出现弹窗
  123. I_EARLY_SERVER = RuleImage(roi_front=(596,269,115,33), roi_back=(596,269,115,33), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_early_server.png")
  124. # 取消体验服切换弹窗
  125. I_EARLY_SERVER_CANCEL = RuleImage(roi_front=(435,404,172,56), roi_back=(435,404,172,56), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_early_server_cancel.png")
  126. # 取消继续战斗
  127. I_CANCEL_BATTLE = RuleImage(roi_front=(471,395,129,55), roi_back=(367,227,545,296), threshold=0.8, method="Template matching", file="./tasks/Restart/login/login_cancel_battle.png")
  128. # Ocr Rule Assets
  129. # 正在连接服务器
  130. O_LOGIN_NETWORK = RuleOcr(roi=(534,649,189,39), area=(210,492,100,100), mode="Single", method="Default", keyword="正在连接服务器", name="login_network")
  131. # Ocr-description
  132. O_LOGIN_ENTER_GAME = RuleOcr(roi=(589,544,101,107), area=(558,574,154,49), mode="Single", method="Default", keyword="进入", name="login_enter_game")
  133. # 兼容原先的进入游戏
  134. O_LOGIN_ENTER_GAME_ORIGIN = RuleOcr(roi=(550,567,176,56), area=(558,574,154,49), mode="Single", method="Default", keyword="进入游戏", name="login_enter_game_origin")
  135. # 点击屏幕跳过
  136. O_LOGIN_SKIP_1 = RuleOcr(roi=(1046,35,130,37), area=(1046,35,130,37), mode="Single", method="Default", keyword="点击屏幕跳过", name="login_skip_1")
  137. # 登录指定角色,默认第一个
  138. O_LOGIN_SPECIFIC_SERVE = RuleOcr(roi=(110,120,350,600), area=(110,120,350,600), mode="Full", method="Default", keyword="", name="login_specific_serve")