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

Merge pull request #1519 from lhye/dev

梦虚秘境支持PVP
huangrunheng 6 месяцев назад
Родитель
Сommit
a9f3537768
34 измененных файлов с 195 добавлено и 55 удалено
  1. 69 0
      .trae/skills/image-updater/SKILL.md
  2. 13 13
      tasks/GameUi/assets.py
  3. BIN
      tasks/GameUi/page/page_check_exploration.png
  4. BIN
      tasks/GameUi/page/page_check_soul_zones.png
  5. BIN
      tasks/GameUi/page/page_demon_encounter_goto_town.png
  6. BIN
      tasks/GameUi/page/page_exploration_goto_area_boss.png
  7. BIN
      tasks/GameUi/page/page_exploration_goto_awake_zone.png
  8. BIN
      tasks/GameUi/page/page_exploration_goto_bondling_fairyland.png
  9. BIN
      tasks/GameUi/page/page_exploration_goto_delegation.png
  10. BIN
      tasks/GameUi/page/page_exploration_goto_goryou_realm.png
  11. BIN
      tasks/GameUi/page/page_exploration_goto_hero_test.png
  12. BIN
      tasks/GameUi/page/page_exploration_goto_main.png
  13. BIN
      tasks/GameUi/page/page_exploration_goto_realm_raid.png
  14. BIN
      tasks/GameUi/page/page_exploration_goto_secret_zones.png
  15. BIN
      tasks/GameUi/page/page_exploration_goto_six_gates.png
  16. BIN
      tasks/GameUi/page/page_exploration_goto_soul_zone.png
  17. 22 22
      tasks/GameUi/page/page_img.json
  18. 2 2
      tasks/GameUi/page/page_img_2.json
  19. 2 2
      tasks/GameUi/page/page_img_supplement.json
  20. BIN
      tasks/HeroTest/as/as_hero2_skill6.png
  21. BIN
      tasks/HeroTest/as/as_hero2_skill7.png
  22. 63 0
      tasks/HeroTest/as/image.json
  23. 4 2
      tasks/HeroTest/assets.py
  24. 7 3
      tasks/HeroTest/script_task.py
  25. 7 7
      tasks/Orochi/assets.py
  26. BIN
      tasks/Orochi/o/o_form_team.png
  27. BIN
      tasks/Orochi/o/o_orochi.png
  28. BIN
      tasks/Orochi/o/o_orochi_fire.png
  29. BIN
      tasks/Orochi/o/o_orochi_lock.png
  30. BIN
      tasks/Orochi/o/o_orochi_unlock.png
  31. BIN
      tasks/Orochi/o/o_shi_records.png
  32. 3 2
      tasks/WantedQuests/assets.py
  33. 3 2
      tasks/WantedQuests/script_task.py
  34. BIN
      tasks/WantedQuests/wq/wq_list_top_bottom_check.png

+ 69 - 0
.trae/skills/image-updater/SKILL.md

@@ -0,0 +1,69 @@
+---
+name: "image-updater"
+description: "Updates game image assets and their coordinates in assets.py and JSON config files. Invoke when user provides new images with coordinate parameters in the filename (format: original_name_xY_wZ_hW.png)."
+---
+
+# Image Updater Skill
+
+## Purpose
+Updates game image assets in the OnmyojiAutoScript project, including:
+1. Replacing old image files with new ones
+2. Updating coordinate parameters (roi_front, roi_back) in assets.py
+3. Updating JSON configuration files (page_img.json, etc.)
+
+## Workflow
+
+### 1. Identify Files to Update
+User provides new images with naming convention:
+```
+original_filename_x{X}_y{Y}_w{W}_h{H}.png
+```
+Example: `page_demon_encounter_goto_town_x22_y19_w41_h37.png`
+This replaces: `page_demon_encounter_goto_town.png`
+With coordinates: `(22, 19, 41, 37)`
+
+### 2. File Operations
+```bash
+# Remove old image
+Remove-Item -Force <path>/<original_name>.png
+
+# Rename new image
+Rename-Item -Path "<path>/<original_name>_x{X}_y{Y}_w{W}_h{H}.png" -NewName "<original_name>.png"
+```
+
+### 3. Update assets.py
+Find and replace the RuleImage definition:
+```python
+# Old:
+I_<NAME> = RuleImage(roi_front=(OLD_X,OLD_Y,OLD_W,OLD_H), roi_back=(OLD_X2,OLD_Y2,OLD_W2,OLD_H2), ...)
+
+# New (use exact coordinates from filename):
+I_<NAME> = RuleImage(roi_front=(X,Y,W,H), roi_back=(X,Y,W,H), ...)
+```
+
+### 4. Update JSON Files
+Search in all JSON files under `tasks/GameUi/page/`:
+- page_img.json
+- page_img_2.json
+- page_img_supplement.json
+- page_img_3.json
+
+Replace the corresponding entry:
+```json
+{
+  "itemName": "<name>",
+  "imageName": "<original_name>.png",
+  "roiFront": "X,Y,W,H",
+  "roiBack": "X,Y,W,H",
+  ...
+}
+```
+
+### 5. Verify
+Run `git status --short` to show all modified files.
+
+## Notes
+- Always update both roi_front and roi_back to the same values unless otherwise specified
+- JSON format uses string coordinates: "X,Y,W,H"
+- Python format uses tuple coordinates: (X,Y,W,H)
+- Check which JSON file contains the item before updating

+ 13 - 13
tasks/GameUi/assets.py

@@ -44,33 +44,33 @@ class GameUiAssets:
 	# description 
 	I_MAIN_GOTO_EXPLORATION = RuleImage(roi_front=(493,116,45,75), roi_back=(243,100,933,211), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_main_goto_exploration.png")
 	# description 
-	I_CHECK_EXPLORATION = RuleImage(roi_front=(1146,175,21,22), roi_back=(1146,175,21,22), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_exploration.png")
+	I_CHECK_EXPLORATION = RuleImage(roi_front=(1149,119,27,21), roi_back=(1149,119,27,21), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_exploration.png")
 	# 探索前往觉醒 
-	I_EXPLORATION_GOTO_AWAKE_ZONE = RuleImage(roi_front=(57,628,57,42), roi_back=(33,619,113,79), threshold=0.65, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_awake_zone.png")
+	I_EXPLORATION_GOTO_AWAKE_ZONE = RuleImage(roi_front=(69,635,46,64), roi_back=(69,635,46,64), threshold=0.65, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_awake_zone.png")
 	# 探索前往御魂 
-	I_EXPLORATION_GOTO_SOUL_ZONE = RuleImage(roi_front=(163,642,44,36), roi_back=(134,623,93,70), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_soul_zone.png")
+	I_EXPLORATION_GOTO_SOUL_ZONE = RuleImage(roi_front=(170,631,34,62), roi_back=(170,631,34,62), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_soul_zone.png")
 	# 探索前往结界突破 
-	I_EXPLORATION_GOTO_REALM_RAID = RuleImage(roi_front=(248,636,67,48), roi_back=(229,612,203,87), threshold=0.65, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_realm_raid.png")
+	I_EXPLORATION_GOTO_REALM_RAID = RuleImage(roi_front=(260,634,44,60), roi_back=(260,634,44,60), threshold=0.65, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_realm_raid.png")
 	# 探索前往御灵 
-	I_EXPLORATION_GOTO_GORYOU_REALM = RuleImage(roi_front=(353,639,47,45), roi_back=(346,626,178,67), threshold=0.7, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_goryou_realm.png")
+	I_EXPLORATION_GOTO_GORYOU_REALM = RuleImage(roi_front=(359,635,38,59), roi_back=(359,635,38,59), threshold=0.7, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_goryou_realm.png")
 	# 探索前往式神委派 
-	I_EXPLORATION_GOTO_DELEGATION = RuleImage(roi_front=(453,639,53,37), roi_back=(409,613,167,75), threshold=0.65, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_delegation.png")
+	I_EXPLORATION_GOTO_DELEGATION = RuleImage(roi_front=(450,636,49,54), roi_back=(450,636,49,54), threshold=0.65, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_delegation.png")
 	# 探索前往秘闻 
-	I_EXPLORATION_GOTO_SECRET_ZONES = RuleImage(roi_front=(549,633,53,40), roi_back=(524,614,200,87), threshold=0.7, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_secret_zones.png")
+	I_EXPLORATION_GOTO_SECRET_ZONES = RuleImage(roi_front=(545,634,49,57), roi_back=(545,634,49,57), threshold=0.7, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_secret_zones.png")
 	# 探索前往地域鬼王 
-	I_EXPLORATION_GOTO_AREA_BOSS = RuleImage(roi_front=(640,638,51,45), roi_back=(640,638,180,45), threshold=0.65, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_area_boss.png")
+	I_EXPLORATION_GOTO_AREA_BOSS = RuleImage(roi_front=(643,634,46,60), roi_back=(643,634,46,60), threshold=0.65, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_area_boss.png")
 	# 探索前往平安奇谭 
 	I_EXPLORATION_GOTO_HEIAN_KITAN = RuleImage(roi_front=(739,643,52,44), roi_back=(739,643,180,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=(938,640,60,49), roi_back=(820,631,296,66), threshold=0.65, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_six_gates.png")
+	I_EXPLORATION_GOTO_SIX_GATES = RuleImage(roi_front=(930,634,47,61), roi_back=(930,634,47,61), threshold=0.65, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_six_gates.png")
 	# 探索前往契灵之境 
-	I_EXPLORATION_GOTO_BONDLING_FAIRYLAND = RuleImage(roi_front=(1037,635,56,44), roi_back=(918,623,218,72), threshold=0.65, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_bondling_fairyland.png")
+	I_EXPLORATION_GOTO_BONDLING_FAIRYLAND = RuleImage(roi_front=(1024,636,51,54), roi_back=(1024,636,51,54), threshold=0.65, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_bondling_fairyland.png")
 	# description 
 	I_BACK_BLUE = RuleImage(roi_front=(32,37,54,52), roi_back=(3,2,130,114), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_back_blue.png")
 	# description 
 	I_CHECK_AWAKE = RuleImage(roi_front=(376,565,73,82), roi_back=(376,565,73,82), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_awake.png")
 	# description 
-	I_CHECK_SOUL_ZONES = RuleImage(roi_front=(49,186,298,237), roi_back=(49,186,298,237), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_soul_zones.png")
+	I_CHECK_SOUL_ZONES = RuleImage(roi_front=(152,20,68,36), roi_back=(152,20,68,36), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_soul_zones.png")
 	# description 
 	I_CHECK_REALM_RAID = RuleImage(roi_front=(129,632,52,48), roi_back=(66,526,233,188), threshold=0.7, method="Template matching", file="./tasks/GameUi/page/page_check_realm_raid.png")
 	# description 
@@ -131,7 +131,7 @@ class GameUiAssets:
 	# description 
 	I_BACK_YOLLOW = RuleImage(roi_front=(24,16,48,55), roi_back=(0,0,100,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_back_yollow.png")
 	# description 
-	I_DEMON_ENCOUNTER_GOTO_TOWN = RuleImage(roi_front=(28,20,56,52), roi_back=(3,4,100,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_demon_encounter_goto_town.png")
+	I_DEMON_ENCOUNTER_GOTO_TOWN = RuleImage(roi_front=(22,19,41,37), roi_back=(22,19,41,37), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_demon_encounter_goto_town.png")
 	# description 
 	I_TOWN_GOTO_HYAKKIYAKOU = RuleImage(roi_front=(880,165,53,69), roi_back=(827,149,148,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_town_goto_hyakkiyakou.png")
 	# description 
@@ -216,7 +216,7 @@ class GameUiAssets:
 	# 英杰试炼左上角标志 
 	I_CHECK_HERO_TEST = RuleImage(roi_front=(148,10,133,48), roi_back=(137,0,157,71), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_hero_test.png")
 	# 探索前往英杰试炼 
-	I_EXPLORATION_GOTO_HERO_TEST = RuleImage(roi_front=(837,630,58,56), roi_back=(7,605,1272,113), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_hero_test.png")
+	I_EXPLORATION_GOTO_HERO_TEST = RuleImage(roi_front=(834,639,48,56), roi_back=(834,639,48,56), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_hero_test.png")
 
 
 	# Image Rule Assets

BIN
tasks/GameUi/page/page_check_exploration.png


BIN
tasks/GameUi/page/page_check_soul_zones.png


BIN
tasks/GameUi/page/page_demon_encounter_goto_town.png


BIN
tasks/GameUi/page/page_exploration_goto_area_boss.png


BIN
tasks/GameUi/page/page_exploration_goto_awake_zone.png


BIN
tasks/GameUi/page/page_exploration_goto_bondling_fairyland.png


BIN
tasks/GameUi/page/page_exploration_goto_delegation.png


BIN
tasks/GameUi/page/page_exploration_goto_goryou_realm.png


BIN
tasks/GameUi/page/page_exploration_goto_hero_test.png


BIN
tasks/GameUi/page/page_exploration_goto_main.png


BIN
tasks/GameUi/page/page_exploration_goto_realm_raid.png


BIN
tasks/GameUi/page/page_exploration_goto_secret_zones.png


BIN
tasks/GameUi/page/page_exploration_goto_six_gates.png


BIN
tasks/GameUi/page/page_exploration_goto_soul_zone.png


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

@@ -29,8 +29,8 @@
   {
     "itemName": "check_exploration",
     "imageName": "page_check_exploration.png",
-    "roiFront": "1146,175,21,22",
-    "roiBack": "1146,175,21,22",
+    "roiFront": "1149,119,27,21",
+    "roiBack": "1149,119,27,21",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"
@@ -38,8 +38,8 @@
   {
     "itemName": "exploration_goto_awake_zone",
     "imageName": "page_exploration_goto_awake_zone.png",
-    "roiFront": "57,628,57,42",
-    "roiBack": "33,619,113,79",
+    "roiFront": "69,635,46,64",
+    "roiBack": "69,635,46,64",
     "method": "Template matching",
     "threshold": 0.65,
     "description": "探索前往觉醒"
@@ -47,8 +47,8 @@
   {
     "itemName": "exploration_goto_soul_zone",
     "imageName": "page_exploration_goto_soul_zone.png",
-    "roiFront": "163,642,44,36",
-    "roiBack": "134,623,93,70",
+    "roiFront": "170,631,34,62",
+    "roiBack": "170,631,34,62",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "探索前往御魂"
@@ -56,8 +56,8 @@
   {
     "itemName": "exploration_goto_realm_raid",
     "imageName": "page_exploration_goto_realm_raid.png",
-    "roiFront": "248,636,67,48",
-    "roiBack": "229,612,203,87",
+    "roiFront": "260,634,44,60",
+    "roiBack": "260,634,44,60",
     "method": "Template matching",
     "threshold": 0.65,
     "description": "探索前往结界突破"
@@ -65,8 +65,8 @@
   {
     "itemName": "exploration_goto_goryou_realm",
     "imageName": "page_exploration_goto_goryou_realm.png",
-    "roiFront": "353,639,47,45",
-    "roiBack": "346,626,178,67",
+    "roiFront": "359,635,38,59",
+    "roiBack": "359,635,38,59",
     "method": "Template matching",
     "threshold": 0.7,
     "description": "探索前往御灵"
@@ -74,8 +74,8 @@
   {
     "itemName": "exploration_goto_delegation",
     "imageName": "page_exploration_goto_delegation.png",
-    "roiFront": "453,639,53,37",
-    "roiBack": "409,613,167,75",
+    "roiFront": "450,636,49,54",
+    "roiBack": "450,636,49,54",
     "method": "Template matching",
     "threshold": 0.65,
     "description": "探索前往式神委派"
@@ -83,8 +83,8 @@
   {
     "itemName": "exploration_goto_secret_zones",
     "imageName": "page_exploration_goto_secret_zones.png",
-    "roiFront": "549,633,53,40",
-    "roiBack": "524,614,200,87",
+    "roiFront": "545,634,49,57",
+    "roiBack": "545,634,49,57",
     "method": "Template matching",
     "threshold": 0.7,
     "description": "探索前往秘闻"
@@ -92,8 +92,8 @@
   {
     "itemName": "exploration_goto_area_boss",
     "imageName": "page_exploration_goto_area_boss.png",
-    "roiFront": "640,638,51,45",
-    "roiBack": "640,638,180,45",
+    "roiFront": "643,634,46,60",
+    "roiBack": "643,634,46,60",
     "method": "Template matching",
     "threshold": 0.65,
     "description": "探索前往地域鬼王"
@@ -110,8 +110,8 @@
   {
     "itemName": "exploration_goto_six_gates",
     "imageName": "page_exploration_goto_six_gates.png",
-    "roiFront": "938,640,60,49",
-    "roiBack": "820,631,296,66",
+    "roiFront": "930,634,47,61",
+    "roiBack": "930,634,47,61",
     "method": "Template matching",
     "threshold": 0.65,
     "description": "探索前往六道之门"
@@ -119,8 +119,8 @@
   {
     "itemName": "exploration_goto_bondling_fairyland",
     "imageName": "page_exploration_goto_bondling_fairyland.png",
-    "roiFront": "1037,635,56,44",
-    "roiBack": "918,623,218,72",
+    "roiFront": "1024,636,51,54",
+    "roiBack": "1024,636,51,54",
     "method": "Template matching",
     "threshold": 0.65,
     "description": "探索前往契灵之境"
@@ -146,8 +146,8 @@
   {
     "itemName": "check_soul_zones",
     "imageName": "page_check_soul_zones.png",
-    "roiFront": "49,186,298,237",
-    "roiBack": "49,186,298,237",
+    "roiFront": "152,20,68,36",
+    "roiBack": "152,20,68,36",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"

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

@@ -155,8 +155,8 @@
   {
     "itemName": "demon_encounter_goto_town",
     "imageName": "page_demon_encounter_goto_town.png",
-    "roiFront": "28,20,56,52",
-    "roiBack": "3,4,100,100",
+    "roiFront": "22,19,41,37",
+    "roiBack": "22,19,41,37",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "description"

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

@@ -83,8 +83,8 @@
   {
     "itemName": "exploration_goto_hero_test",
     "imageName": "page_exploration_goto_hero_test.png",
-    "roiFront": "837,630,58,56",
-    "roiBack": "7,605,1272,113",
+    "roiFront": "834,639,48,56",
+    "roiBack": "834,639,48,56",
     "method": "Template matching",
     "threshold": 0.8,
     "description": "探索前往英杰试炼"

BIN
tasks/HeroTest/as/as_hero2_skill6.png


BIN
tasks/HeroTest/as/as_hero2_skill7.png


+ 63 - 0
tasks/HeroTest/as/image.json

@@ -304,5 +304,68 @@
     "method": "Template matching",
     "threshold": 0.8,
     "description": "真钱"
+  },
+  {
+    "itemName": "hero2_skill1",
+    "imageName": "as_hero2_skill1.png",
+    "roiFront": "825,358,61,36",
+    "roiBack": "47,340,1178,65",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "同调祝福"
+  },
+  {
+    "itemName": "hero2_skill2",
+    "imageName": "as_hero2_skill2.png",
+    "roiFront": "521,356,63,37",
+    "roiBack": "46,333,1174,82",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "韵迟祝福"
+  },
+  {
+    "itemName": "hero2_skill3",
+    "imageName": "as_hero2_skill3.png",
+    "roiFront": "520,358,62,38",
+    "roiBack": "41,346,1172,63",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "弥天祝福"
+  },
+  {
+    "itemName": "hero2_skill4",
+    "imageName": "as_hero2_skill4.png",
+    "roiFront": "1127,356,65,41",
+    "roiBack": "48,349,1173,57",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "叠辉祝福"
+  },
+  {
+    "itemName": "hero2_skill5",
+    "imageName": "as_hero2_skill5.png",
+    "roiFront": "217,358,65,37",
+    "roiBack": "46,334,1148,81",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "敛神祝福"
+  },
+  {
+    "itemName": "hero2_skill6",
+    "imageName": "as_hero2_skill6.png",
+    "roiFront": "253,128,39,63",
+    "roiBack": "253,128,39,63",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "默认技能"
+  },
+  {
+    "itemName": "hero2_skill7",
+    "imageName": "as_hero2_skill7.png",
+    "roiFront": "427,356,62,38",
+    "roiBack": "48,342,1175,67",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "速度祝福"
   }
 ]

+ 4 - 2
tasks/HeroTest/assets.py

@@ -97,8 +97,10 @@ class HeroTestAssets:
 	I_HERO2_SKILL5 = RuleImage(roi_front=(217,358,65,37), roi_back=(46,334,1148,81), threshold=0.8, method="Template matching", file="./tasks/HeroTest/as/as_hero2_skill5.png")
 	# 弥天祝福 
 	I_HERO2_SKILL3 = RuleImage(roi_front=(520,358,62,38), roi_back=(41,346,1172,63), threshold=0.8, method="Template matching", file="./tasks/HeroTest/as/as_hero2_skill3.png")
-	# 速度祝福 
-	I_HERO2_SKILL6 = RuleImage(roi_front=(427,356,62,38), roi_back=(48,342,1175,67), threshold=0.8, method="Template matching", file="./tasks/HeroTest/as/as_hero2_skill6.png")
+	# 默认技能
+	I_HERO2_SKILL6 = RuleImage(roi_front=(253,128,39,63), roi_back=(253,128,39,63), threshold=0.8, method="Template matching", file="./tasks/HeroTest/as/as_hero2_skill6.png")
+	# 速度祝福
+	I_HERO2_SKILL7 = RuleImage(roi_front=(427,356,62,38), roi_back=(48,342,1175,67), threshold=0.8, method="Template matching", file="./tasks/HeroTest/as/as_hero2_skill7.png")
 
 
 	# Ocr Rule Assets

+ 7 - 3
tasks/HeroTest/script_task.py

@@ -151,10 +151,14 @@ class ScriptTask(GameUi, GeneralBattle, HeroTestAssets, SwitchSoul):
             self.I_HERO2_SKILL3,  # 弥天祝福
             self.I_HERO2_SKILL4,  # 叠辉祝福
             self.I_HERO2_SKILL5,  # 敛神祝福
-            self.I_HERO2_SKILL6,  # 速度祝福
+            self.I_HERO2_SKILL6,  # 默认技能,选第一个祝福
+            self.I_HERO2_SKILL7,  # 速度祝福
+        ]
+        # pvp技能列表
+        pvp_skill = [
+            self.I_HERO2_SKILL6,  # 默认技能,选第一个祝福
+            self.I_HERO2_SKILL7,  # 速度祝福
         ]
-        # TODO: PVP
-        pvp_skill = []
         target_skill_dict: dict[SkillMode, list] = {
             SkillMode.PVE: pve_skill,
             SkillMode.PVP: pvp_skill,

+ 7 - 7
tasks/Orochi/assets.py

@@ -12,24 +12,24 @@ class OrochiAssets:
 
 	# Image Rule Assets
 	# 八级大蛇进入 
-	I_OROCHI = RuleImage(roi_front=(55,104,295,406), roi_back=(55,104,295,406), threshold=0.8, method="Template matching", file="./tasks/Orochi/o/o_orochi.png")
+	I_OROCHI = RuleImage(roi_front=(297,86,50,260), roi_back=(297,86,50,260), threshold=0.8, method="Template matching", file="./tasks/Orochi/o/o_orochi.png")
 	# 组队 
-	I_FORM_TEAM = RuleImage(roi_front=(937,591,100,100), roi_back=(937,591,100,100), threshold=0.8, method="Template matching", file="./tasks/Orochi/o/o_form_team.png")
+	I_FORM_TEAM = RuleImage(roi_front=(964,605,95,46), roi_back=(964,605,95,46), threshold=0.8, method="Template matching", file="./tasks/Orochi/o/o_form_team.png")
 	# description 
-	I_OROCHI_LOCK = RuleImage(roi_front=(575,561,22,26), roi_back=(466,546,191,62), threshold=0.8, method="Template matching", file="./tasks/Orochi/o/o_orochi_lock.png")
+	I_OROCHI_LOCK = RuleImage(roi_front=(652,654,21,32), roi_back=(652,654,21,32), threshold=0.8, method="Template matching", file="./tasks/Orochi/o/o_orochi_lock.png")
 	# description 
-	I_OROCHI_UNLOCK = RuleImage(roi_front=(575,561,21,21), roi_back=(483,544,188,60), threshold=0.8, method="Template matching", file="./tasks/Orochi/o/o_orochi_unlock.png")
+	I_OROCHI_UNLOCK = RuleImage(roi_front=(653,657,20,24), roi_back=(653,657,20,24), threshold=0.8, method="Template matching", file="./tasks/Orochi/o/o_orochi_unlock.png")
 	# 点击挑战 
-	I_OROCHI_FIRE = RuleImage(roi_front=(1095,577,131,124), roi_back=(1095,577,131,124), threshold=0.6, method="Template matching", file="./tasks/Orochi/o/o_orochi_fire.png")
+	I_OROCHI_FIRE = RuleImage(roi_front=(1149,595,84,45), roi_back=(1149,595,84,45), threshold=0.6, method="Template matching", file="./tasks/Orochi/o/o_orochi_fire.png")
 	# 式神录 
-	I_SHI_RECORDS = RuleImage(roi_front=(821,638,48,45), roi_back=(821,638,48,45), threshold=0.8, method="Template matching", file="./tasks/Orochi/o/o_shi_records.png")
+	I_SHI_RECORDS = RuleImage(roi_front=(848,570,37,41), roi_back=(848,570,37,41), threshold=0.8, method="Template matching", file="./tasks/Orochi/o/o_shi_records.png")
 	# 小小宠物,发现宝藏 
 	I_PET_PRESENT = RuleImage(roi_front=(873,184,62,147), roi_back=(873,184,62,147), threshold=0.8, method="Template matching", file="./tasks/Orochi/o/o_pet_present.png")
 
 
 	# List Rule Assets
 	# 这个是御魂界面选择不同层数的 
-	L_LAYER_LIST = RuleList(folder="./tasks/Orochi/res", direction="vertical", mode="ocr", roi_back=(138,130,359,500), size=(45, 88), 
+	L_LAYER_LIST = RuleList(folder="./tasks/Orochi/res", direction="vertical", mode="ocr", roi_back=(125,99,74,585), size=(45, 88), 
 					 array=["壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖", "拾", "悲", "神", "虚"])
 
 

BIN
tasks/Orochi/o/o_form_team.png


BIN
tasks/Orochi/o/o_orochi.png


BIN
tasks/Orochi/o/o_orochi_fire.png


BIN
tasks/Orochi/o/o_orochi_lock.png


BIN
tasks/Orochi/o/o_orochi_unlock.png


BIN
tasks/Orochi/o/o_shi_records.png


+ 3 - 2
tasks/WantedQuests/assets.py

@@ -20,6 +20,8 @@ class WantedQuestsAssets:
 
 
 	# Ocr Rule Assets
+	# 探索界面检测是否有"封"字判断是否还有悬赏任务
+	O_WQ_LIST_TOP_BOTTOM_CHECK = RuleOcr(roi=(10,193,90,33), area=(10,193,90,33), mode="Single", method="Default", keyword="封", name="wq_list_top_bottom_check")
 	# 挑战券的数量 
 	O_WQ_NUMBER = RuleOcr(roi=(569,13,50,32), area=(569,13,50,32), mode="Digit", method="Default", keyword="", name="wq_number")
 	# 悬赏封印 
@@ -170,8 +172,7 @@ class WantedQuestsAssets:
 	I_WQ_TRACE_ONE_CHECK_OPENED = RuleImage(roi_front=(510,175,210,60), roi_back=(510,175,210,60), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_check_opened.png")
 	# 庭院悬赏任务界面 单个任务点开后的界面 是否为现世任务标志 
 	I_WQ_TRACE_ONE_REALWORLD = RuleImage(roi_front=(850,470,180,180), roi_back=(850,470,180,180), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_trace_one_realworld.png")
-	# 探索界面,左侧任务列表右上角右下角标志 
-	I_WQ_LIST_TOP_BOTTOM_CHECK = RuleImage(roi_front=(120,125,25,425), roi_back=(120,125,25,425), threshold=0.8, method="Template matching", file="./tasks/WantedQuests/wq/wq_list_top_bottom_check.png")
+
 
 
 	# Image Rule Assets

+ 3 - 2
tasks/WantedQuests/script_task.py

@@ -749,8 +749,9 @@ class ScriptTask(WQExplore, SecretScriptTask, WantedQuestsAssets):
         return -1, -1, -1, [0, 0, 0, 0]
 
     def is_wq_remained(self):
-        # 检测是否还存在任务
-        return self.appear(self.I_WQ_LIST_TOP_BOTTOM_CHECK)
+        # 检测是否还存在任务,OCR识别是否包含"封"字
+        result = self.O_WQ_LIST_TOP_BOTTOM_CHECK.ocr(self.device.image)
+        return "封" in result
 
 
 

BIN
tasks/WantedQuests/wq/wq_list_top_bottom_check.png