Преглед изворни кода

feat: 更新探索入口图片及坐标,优化HeroTest脚本

GameUi:
- 替换12个探索入口按钮图片,使用精确坐标匹配
- 更新 roi_front 和 roi_back 参数与图片文件名中的坐标一致
- 涉及图片: demon_encounter_goto_town, exploration_goto_main,
  exploration_goto_awake_zone, exploration_goto_soul_zone,
  exploration_goto_realm_raid, exploration_goto_goryou_realm,
  exploration_goto_delegation, exploration_goto_secret_zones,
  exploration_goto_area_boss, exploration_goto_six_gates,
  exploration_goto_bondling_fairyland, exploration_goto_hero_test
- 更新 page_img.json, page_img_2.json, page_img_supplement.json 配置

HeroTest:
- 手动更新 script_task.py 脚本逻辑
lhye пре 6 месеци
родитељ
комит
9bddd7a170

+ 11 - 11
tasks/GameUi/assets.py

@@ -46,25 +46,25 @@ class GameUiAssets:
 	# 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_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 
@@ -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_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


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

@@ -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": "探索前往契灵之境"

+ 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": "探索前往英杰试炼"

+ 1 - 1
tasks/HeroTest/script_task.py

@@ -154,7 +154,7 @@ class ScriptTask(GameUi, GeneralBattle, HeroTestAssets, SwitchSoul):
             self.I_HERO2_SKILL6,  # 默认技能,选第一个祝福
             self.I_HERO2_SKILL7,  # 速度祝福
         ]
-        # TODO: PVP
+        # pvp技能列表
         pvp_skill = [
             self.I_HERO2_SKILL6,  # 默认技能,选第一个祝福
             self.I_HERO2_SKILL7,  # 速度祝福