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

Merge pull request #1010 from runhey/dev

Automated PR 2025.08.28
huangrunheng 1 год назад
Родитель
Сommit
78254321ea

+ 19 - 19
tasks/GameUi/assets.py

@@ -38,32 +38,32 @@ class GameUiAssets:
 	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")
 	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 
 	# 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=(1146,175,21,22), roi_back=(1146,175,21,22), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_exploration.png")
-	# description 
+	# 探索前往觉醒 
 	I_EXPLORATION_GOTO_AWAKE_ZONE = RuleImage(roi_front=(57,628,57,61), roi_back=(33,619,113,79), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_awake_zone.png")
 	I_EXPLORATION_GOTO_AWAKE_ZONE = RuleImage(roi_front=(57,628,57,61), roi_back=(33,619,113,79), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_awake_zone.png")
-	# description 
+	# 探索前往御魂 
 	I_EXPLORATION_GOTO_SOUL_ZONE = RuleImage(roi_front=(159,633,55,55), roi_back=(138,620,89,75), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_soul_zone.png")
 	I_EXPLORATION_GOTO_SOUL_ZONE = RuleImage(roi_front=(159,633,55,55), roi_back=(138,620,89,75), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_soul_zone.png")
-	# description 
-	I_EXPLORATION_GOTO_REALM_RAID = RuleImage(roi_front=(248,636,67,48), roi_back=(229,612,102,87), threshold=0.8, 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,60,67), threshold=0.7, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_goryou_realm.png")
-	# 式神委派 
-	I_EXPLORATION_GOTO_DELEGATION = RuleImage(roi_front=(445,638,60,50), roi_back=(445,638,60,50), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_delegation.png")
-	# 秘闻 
-	I_EXPLORATION_GOTO_SECRET_ZONES = RuleImage(roi_front=(546,628,61,55), roi_back=(524,614,100,87), threshold=0.8, 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,51,45), threshold=0.8, 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,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=(838,640,60,49), roi_back=(818,631,200,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,56,49), roi_back=(928,633,203,64), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_bondling_fairyland.png")
+	# 探索前往结界突破 
+	I_EXPLORATION_GOTO_REALM_RAID = RuleImage(roi_front=(248,636,67,48), roi_back=(229,612,203,87), threshold=0.8, 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_DELEGATION = RuleImage(roi_front=(445,638,60,50), roi_back=(445,638,180,50), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_delegation.png")
+	# 探索前往秘闻 
+	I_EXPLORATION_GOTO_SECRET_ZONES = RuleImage(roi_front=(546,628,61,55), roi_back=(524,614,200,87), threshold=0.8, 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.8, 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=(918,631,200,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=(1037,639,56,49), roi_back=(1018,633,203,64), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_exploration_goto_bondling_fairyland.png")
 	# description 
 	# 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")
 	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 
 	# 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")
 	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 
 	# description 
-	I_CHECK_SOUL_ZONES = RuleImage(roi_front=(49,105,298,405), roi_back=(49,105,298,405), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_soul_zones.png")
+	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")
 	# description 
 	# 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")
 	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 
 	# description 

+ 6 - 6
tasks/GameUi/page.py

@@ -78,11 +78,11 @@ page_exploration.link(button=G.I_EXPLORATION_GOTO_DELEGATION, destination=page_d
 page_secret_zones = Page(G.I_CHECK_SECRET_ZONES)
 page_secret_zones = Page(G.I_CHECK_SECRET_ZONES)
 page_secret_zones.link(button=G.I_BACK_BLUE, destination=page_exploration)
 page_secret_zones.link(button=G.I_BACK_BLUE, destination=page_exploration)
 page_exploration.link(button=G.I_EXPLORATION_GOTO_SECRET_ZONES, destination=page_secret_zones)
 page_exploration.link(button=G.I_EXPLORATION_GOTO_SECRET_ZONES, destination=page_secret_zones)
-# 地狱鬼王 area boss
+# 地域鬼王 area boss
 page_area_boss = Page(G.I_CHECK_AREA_BOSS)
 page_area_boss = Page(G.I_CHECK_AREA_BOSS)
 page_area_boss.link(button=G.I_BACK_BLUE, destination=page_exploration)
 page_area_boss.link(button=G.I_BACK_BLUE, destination=page_exploration)
 page_exploration.link(button=G.I_EXPLORATION_GOTO_AREA_BOSS, destination=page_area_boss)
 page_exploration.link(button=G.I_EXPLORATION_GOTO_AREA_BOSS, destination=page_area_boss)
-# 平安奇谭
+# 平安奇谭 heian kitan
 page_heian_kitan = Page(G.I_CHECK_HEIAN_KITAN)
 page_heian_kitan = Page(G.I_CHECK_HEIAN_KITAN)
 page_heian_kitan.link(button=G.I_CHECK_HEIAN_KITAN, destination=page_exploration)
 page_heian_kitan.link(button=G.I_CHECK_HEIAN_KITAN, destination=page_exploration)
 page_exploration.link(button=G.I_EXPLORATION_GOTO_HEIAN_KITAN, destination=page_heian_kitan)
 page_exploration.link(button=G.I_EXPLORATION_GOTO_HEIAN_KITAN, destination=page_heian_kitan)
@@ -90,17 +90,17 @@ page_exploration.link(button=G.I_EXPLORATION_GOTO_HEIAN_KITAN, destination=page_
 page_six_gates = Page(G.I_CHECK_SIX_GATES)
 page_six_gates = Page(G.I_CHECK_SIX_GATES)
 page_six_gates.link(button=G.I_SIX_GATES_GOTO_EXPLORATION, destination=page_exploration)
 page_six_gates.link(button=G.I_SIX_GATES_GOTO_EXPLORATION, destination=page_exploration)
 page_exploration.link(button=G.I_EXPLORATION_GOTO_SIX_GATES, destination=page_six_gates)
 page_exploration.link(button=G.I_EXPLORATION_GOTO_SIX_GATES, destination=page_six_gates)
-# 器灵 bondling_fairyland
+# 契灵之境 bondling fairyland
 page_bondling_fairyland = Page(G.I_CHECK_BONDLING_FAIRYLAND)
 page_bondling_fairyland = Page(G.I_CHECK_BONDLING_FAIRYLAND)
 page_bondling_fairyland.link(button=G.I_BACK_YOLLOW, destination=page_exploration)
 page_bondling_fairyland.link(button=G.I_BACK_YOLLOW, destination=page_exploration)
 page_exploration.link(button=G.I_EXPLORATION_GOTO_BONDLING_FAIRYLAND, destination=page_bondling_fairyland)
 page_exploration.link(button=G.I_EXPLORATION_GOTO_BONDLING_FAIRYLAND, destination=page_bondling_fairyland)
 
 
 # ************************************* 町中部分 *****************************************#
 # ************************************* 町中部分 *****************************************#
-# 斗鸡 duel
+# 斗技 duel
 page_duel = Page(G.I_CHECK_DUEL)
 page_duel = Page(G.I_CHECK_DUEL)
 page_duel.link(button=G.I_BACK_YOLLOW, destination=page_town)
 page_duel.link(button=G.I_BACK_YOLLOW, destination=page_town)
 page_town.link(button=G.I_TOWN_GOTO_DUEL, destination=page_duel)
 page_town.link(button=G.I_TOWN_GOTO_DUEL, destination=page_duel)
-# 封魔之时 demon_encounter
+# 逢魔之时 demon_encounter
 page_demon_encounter = Page(G.I_CHECK_DEMON_ENCOUNTER)
 page_demon_encounter = Page(G.I_CHECK_DEMON_ENCOUNTER)
 page_demon_encounter.link(button=G.I_DEMON_ENCOUNTER_GOTO_TOWN, destination=page_town)
 page_demon_encounter.link(button=G.I_DEMON_ENCOUNTER_GOTO_TOWN, destination=page_town)
 page_town.link(button=G.I_TOWN_GOTO_DEMON_ENCOUNTER, destination=page_demon_encounter)
 page_town.link(button=G.I_TOWN_GOTO_DEMON_ENCOUNTER, destination=page_demon_encounter)
@@ -112,7 +112,7 @@ page_town.link(button=G.I_TOWN_GOTO_HUNT, destination=page_hunt)
 page_draft_duel = Page(G.I_CHECK_DRAFT_DUEL)
 page_draft_duel = Page(G.I_CHECK_DRAFT_DUEL)
 page_draft_duel.link(button=G.I_BACK_YOLLOW, destination=page_town)
 page_draft_duel.link(button=G.I_BACK_YOLLOW, destination=page_town)
 page_town.link(button=G.I_TOWN_GOTO_DRAFT_DUEL, destination=page_draft_duel)
 page_town.link(button=G.I_TOWN_GOTO_DRAFT_DUEL, destination=page_draft_duel)
-# 百鬼奕 hyakkisen
+# 百鬼弈 hyakkisen
 page_hyakkisen = Page(G.I_CHECK_HYAKKISEN)
 page_hyakkisen = Page(G.I_CHECK_HYAKKISEN)
 page_hyakkisen.link(button=G.I_BACK_YOLLOW, destination=page_town)
 page_hyakkisen.link(button=G.I_BACK_YOLLOW, destination=page_town)
 page_town.link(button=G.I_TOWN_GOTO_HYAKKISEN, destination=page_hyakkisen)
 page_town.link(button=G.I_TOWN_GOTO_HYAKKISEN, destination=page_hyakkisen)

BIN
tasks/GameUi/page/page_check_soul_zones.png


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

@@ -42,7 +42,7 @@
     "roiBack": "33,619,113,79",
     "roiBack": "33,619,113,79",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "description": "description"
+    "description": "探索前往觉醒"
   },
   },
   {
   {
     "itemName": "exploration_goto_soul_zone",
     "itemName": "exploration_goto_soul_zone",
@@ -51,79 +51,79 @@
     "roiBack": "138,620,89,75",
     "roiBack": "138,620,89,75",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "description": "description"
+    "description": "探索前往御魂"
   },
   },
   {
   {
     "itemName": "exploration_goto_realm_raid",
     "itemName": "exploration_goto_realm_raid",
     "imageName": "page_exploration_goto_realm_raid.png",
     "imageName": "page_exploration_goto_realm_raid.png",
     "roiFront": "248,636,67,48",
     "roiFront": "248,636,67,48",
-    "roiBack": "229,612,102,87",
+    "roiBack": "229,612,203,87",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "description": "description"
+    "description": "探索前往结界突破"
   },
   },
   {
   {
     "itemName": "exploration_goto_goryou_realm",
     "itemName": "exploration_goto_goryou_realm",
     "imageName": "page_exploration_goto_goryou_realm.png",
     "imageName": "page_exploration_goto_goryou_realm.png",
     "roiFront": "353,639,47,45",
     "roiFront": "353,639,47,45",
-    "roiBack": "346,626,60,67",
+    "roiBack": "346,626,178,67",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.7,
     "threshold": 0.7,
-    "description": "前往御灵"
+    "description": "探索前往御灵"
   },
   },
   {
   {
     "itemName": "exploration_goto_delegation",
     "itemName": "exploration_goto_delegation",
     "imageName": "page_exploration_goto_delegation.png",
     "imageName": "page_exploration_goto_delegation.png",
     "roiFront": "445,638,60,50",
     "roiFront": "445,638,60,50",
-    "roiBack": "445,638,60,50",
+    "roiBack": "445,638,180,50",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "description": "式神委派"
+    "description": "探索前往式神委派"
   },
   },
   {
   {
     "itemName": "exploration_goto_secret_zones",
     "itemName": "exploration_goto_secret_zones",
     "imageName": "page_exploration_goto_secret_zones.png",
     "imageName": "page_exploration_goto_secret_zones.png",
     "roiFront": "546,628,61,55",
     "roiFront": "546,628,61,55",
-    "roiBack": "524,614,100,87",
+    "roiBack": "524,614,200,87",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "description": "秘闻"
+    "description": "探索前往秘闻"
   },
   },
   {
   {
     "itemName": "exploration_goto_area_boss",
     "itemName": "exploration_goto_area_boss",
     "imageName": "page_exploration_goto_area_boss.png",
     "imageName": "page_exploration_goto_area_boss.png",
     "roiFront": "640,638,51,45",
     "roiFront": "640,638,51,45",
-    "roiBack": "640,638,51,45",
+    "roiBack": "640,638,180,45",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "description": "地狱鬼王"
+    "description": "探索前往地域鬼王"
   },
   },
   {
   {
     "itemName": "exploration_goto_heian_kitan",
     "itemName": "exploration_goto_heian_kitan",
     "imageName": "page_exploration_goto_heian_kitan.png",
     "imageName": "page_exploration_goto_heian_kitan.png",
     "roiFront": "739,643,52,44",
     "roiFront": "739,643,52,44",
-    "roiBack": "739,643,52,44",
+    "roiBack": "739,643,180,44",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "description": "平安奇谭"
+    "description": "探索前往平安奇谭"
   },
   },
   {
   {
     "itemName": "exploration_goto_six_gates",
     "itemName": "exploration_goto_six_gates",
     "imageName": "page_exploration_goto_six_gates.png",
     "imageName": "page_exploration_goto_six_gates.png",
-    "roiFront": "838,640,60,49",
-    "roiBack": "818,631,200,66",
+    "roiFront": "938,640,60,49",
+    "roiBack": "918,631,200,66",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "description": "六道之门"
+    "description": "探索前往六道之门"
   },
   },
   {
   {
     "itemName": "exploration_goto_bondling_fairyland",
     "itemName": "exploration_goto_bondling_fairyland",
     "imageName": "page_exploration_goto_bondling_fairyland.png",
     "imageName": "page_exploration_goto_bondling_fairyland.png",
-    "roiFront": "937,639,56,49",
-    "roiBack": "928,633,203,64",
+    "roiFront": "1037,639,56,49",
+    "roiBack": "1018,633,203,64",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "description": "器灵"
+    "description": "探索前往契灵之境"
   },
   },
   {
   {
     "itemName": "back_blue",
     "itemName": "back_blue",
@@ -146,8 +146,8 @@
   {
   {
     "itemName": "check_soul_zones",
     "itemName": "check_soul_zones",
     "imageName": "page_check_soul_zones.png",
     "imageName": "page_check_soul_zones.png",
-    "roiFront": "49,105,298,405",
-    "roiBack": "49,105,298,405",
+    "roiFront": "49,186,298,237",
+    "roiBack": "49,186,298,237",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"

+ 1 - 1
tasks/HeroTest/as/image.json

@@ -12,7 +12,7 @@
     "itemName": "two",
     "itemName": "two",
     "imageName": "as_two.png",
     "imageName": "as_two.png",
     "roiFront": "819,685,95,26",
     "roiFront": "819,685,95,26",
-    "roiBack": "819,685,95,26",
+    "roiBack": "819,685,200,26",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "进入活动第二步"
     "description": "进入活动第二步"

+ 1 - 1
tasks/HeroTest/assets.py

@@ -14,7 +14,7 @@ class HeroTestAssets:
 	# 进入活动第一步 
 	# 进入活动第一步 
 	I_ONE = RuleImage(roi_front=(633,106,88,105), roi_back=(633,106,88,105), threshold=0.7, method="Template matching", file="./tasks/HeroTest/as/as_one.png")
 	I_ONE = RuleImage(roi_front=(633,106,88,105), roi_back=(633,106,88,105), threshold=0.7, method="Template matching", file="./tasks/HeroTest/as/as_one.png")
 	# 进入活动第二步 
 	# 进入活动第二步 
-	I_TWO = RuleImage(roi_front=(819,685,95,26), roi_back=(819,685,95,26), threshold=0.8, method="Template matching", file="./tasks/HeroTest/as/as_two.png")
+	I_TWO = RuleImage(roi_front=(819,685,95,26), roi_back=(819,685,200,26), threshold=0.8, method="Template matching", file="./tasks/HeroTest/as/as_two.png")
 	# 点击鬼兵演武 
 	# 点击鬼兵演武 
 	I_GBB = RuleImage(roi_front=(95,344,37,131), roi_back=(95,344,37,131), threshold=0.8, method="Template matching", file="./tasks/HeroTest/as/as_gbb.png")
 	I_GBB = RuleImage(roi_front=(95,344,37,131), roi_back=(95,344,37,131), threshold=0.8, method="Template matching", file="./tasks/HeroTest/as/as_gbb.png")
 	# 爬塔返回按钮 
 	# 爬塔返回按钮 

+ 4 - 0
tasks/Hyakkiyakou/assets.py

@@ -164,6 +164,10 @@ class HyakkiyakouAssets:
 	I_FRIEND_SAME_2_RECALL = RuleImage(roi_front=(168,126,100,60), roi_back=(152,112,133,80), threshold=0.8, method="Template matching", file="./tasks/Hyakkiyakou/hya/hya_friend_same_2.png")
 	I_FRIEND_SAME_2_RECALL = RuleImage(roi_front=(168,126,100,60), roi_back=(152,112,133,80), threshold=0.8, method="Template matching", file="./tasks/Hyakkiyakou/hya/hya_friend_same_2.png")
 	# 回归活动使用 
 	# 回归活动使用 
 	I_FRIEND_REMOTE_2_RECALL = RuleImage(roi_front=(296,122,100,56), roi_back=(278,115,131,81), threshold=0.8, method="Template matching", file="./tasks/Hyakkiyakou/hya/hya_friend_remote_2.png")
 	I_FRIEND_REMOTE_2_RECALL = RuleImage(roi_front=(296,122,100,56), roi_back=(278,115,131,81), threshold=0.8, method="Template matching", file="./tasks/Hyakkiyakou/hya/hya_friend_remote_2.png")
+	# description 
+	I_FRIEND_RYOU_1 = RuleImage(roi_front=(328,128,80,45), roi_back=(328,128,80,45), threshold=0.8, method="Template matching", file="./tasks/Hyakkiyakou/hya/hya_friend_ryou_1.png")
+	# description 
+	I_FRIEND_RYOU_2 = RuleImage(roi_front=(328,128,80,45), roi_back=(328,128,80,45), threshold=0.8, method="Template matching", file="./tasks/Hyakkiyakou/hya/hya_friend_ryou_2.png")
 
 
 
 
 	# Ocr Rule Assets
 	# Ocr Rule Assets

BIN
tasks/Hyakkiyakou/hya/hya_friend_ryou_1.png


BIN
tasks/Hyakkiyakou/hya/hya_friend_ryou_2.png


+ 18 - 0
tasks/Hyakkiyakou/hya/image5.json

@@ -70,5 +70,23 @@
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "回归活动使用"
     "description": "回归活动使用"
+  },
+  {
+    "itemName": "friend_ryou_1",
+    "imageName": "hya_friend_ryou_1.png",
+    "roiFront": "328,128,80,45",
+    "roiBack": "328,128,80,45",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "friend_ryou_2",
+    "imageName": "hya_friend_ryou_2.png",
+    "roiFront": "328,128,80,45",
+    "roiBack": "328,128,80,45",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
   }
   }
 ]
 ]

+ 1 - 1
tasks/Hyakkiyakou/slave/hya_slave.py

@@ -223,7 +223,7 @@ class HyaSlave(HyaDevice, HyaColor, HyakkiyakouAssets):
             if self.appear(self.I_ENSURE_RECALL):
             if self.appear(self.I_ENSURE_RECALL):
                 hya_recall_activity = True
                 hya_recall_activity = True
             if hya_recall_activity:
             if hya_recall_activity:
-                if self.appear(self.I_FRIEND_SAME_1_RECALL) or self.appear(self.I_FRIEND_SAME_2_RECALL):
+                if self.appear(self.I_FRIEND_SAME_1_RECALL) or self.appear(self.I_FRIEND_SAME_2_RECALL) or self.appear(self.I_FRIEND_RYOU_1):
                     break
                     break
             else:
             else:
                 if self.appear(self.I_FRIEND_SAME_1) or self.appear(self.I_FRIEND_SAME_2):
                 if self.appear(self.I_FRIEND_SAME_1) or self.appear(self.I_FRIEND_SAME_2):

+ 33 - 22
tasks/RichMan/mall/honor.py

@@ -22,9 +22,36 @@ class Honor(Special):
             logger.info('Honor is not enable')
             logger.info('Honor is not enable')
             return
             return
         self._enter_honor()
         self._enter_honor()
-        self._honor_mystery_amulet(con.mystery_amulet)
-        self._honor_black_daruma_scrap(con.black_daruma_scrap)
-
+        
+        # 向下滑找到购买的物品
+        mystery_bought, black_bought = False, False
+        max_swipes = 3
+        swipe_count = 0
+        
+        while 1:
+            self.screenshot()
+            if not mystery_bought and con.mystery_amulet and self.appear(self.I_HONOR_BLUE):
+                self._honor_mystery_amulet(con.mystery_amulet)
+                mystery_bought = True
+            if not black_bought and con.black_daruma_scrap and self.appear(self.I_HONOR_BLACK):
+                self._honor_black_daruma_scrap(con.black_daruma_scrap)
+                black_bought = True
+
+            # 如果所有需要购买的物品都已购买完成
+            if (not con.mystery_amulet or mystery_bought) and (not con.black_daruma_scrap or black_bought):
+                logger.info('All honor items processed')
+                break
+            # 如果滑动次数过多,避免无限循环
+            if swipe_count >= max_swipes:
+                break
+            # 如果滑动到底了
+            if self.appear(self.I_SP_SWIPE_CHECK):
+                break
+
+            # 向下滑动寻找商品
+            if self.swipe(self.S_SP_DOWN, interval=2):
+                swipe_count += 1
+                time.sleep(2)
 
 
     def _honor_mystery_amulet(self, enable: bool=False):
     def _honor_mystery_amulet(self, enable: bool=False):
         logger.hr('Buy mystery amulet', 3)
         logger.hr('Buy mystery amulet', 3)
@@ -32,12 +59,7 @@ class Honor(Special):
             logger.info('Buy mystery amulet is disabled')
             logger.info('Buy mystery amulet is disabled')
             return
             return
 
 
-        self.screenshot()
-        if not self.appear(self.I_HONOR_BLUE):
-            logger.warning('No appear mystery amulet')
-            return
         # 检查剩余数量
         # 检查剩余数量
-        # remain_number = self.O_HONOR_BLUE.ocr(self.device.image)
         remain_number = self._special_check_remain(self.I_HONOR_BLUE)
         remain_number = self._special_check_remain(self.I_HONOR_BLUE)
         if not isinstance(remain_number, int):
         if not isinstance(remain_number, int):
             logger.warning('Can not get remain number')
             logger.warning('Can not get remain number')
@@ -48,8 +70,8 @@ class Honor(Special):
         if not self.mall_check_money(4, 1500):
         if not self.mall_check_money(4, 1500):
             logger.warning('No enough money')
             logger.warning('No enough money')
             return
             return
-        # 点击购买
-        self.buy_more(self.I_HONOR_BLUE)
+        # 使用动态位置点击购买
+        self.appear_then_click(self.I_HONOR_BLUE)
         time.sleep(1)
         time.sleep(1)
 
 
     def _honor_black_daruma_scrap(self, enable: bool=False):
     def _honor_black_daruma_scrap(self, enable: bool=False):
@@ -58,12 +80,7 @@ class Honor(Special):
             logger.info('Buy black daruma scrap is disabled')
             logger.info('Buy black daruma scrap is disabled')
             return
             return
 
 
-        self.screenshot()
-        if not self.appear(self.I_HONOR_BLACK):
-            logger.warning('No appear black daruma scrap')
-            return
         # 检查剩余数量
         # 检查剩余数量
-        # remain_number = self.O_HONOR_BLACK.ocr(self.device.image)
         remain_number = self._special_check_remain(self.I_HONOR_BLACK)
         remain_number = self._special_check_remain(self.I_HONOR_BLACK)
         if not isinstance(remain_number, int):
         if not isinstance(remain_number, int):
             logger.warning('Can not get remain number')
             logger.warning('Can not get remain number')
@@ -74,14 +91,11 @@ class Honor(Special):
         if not self.mall_check_money(4, 540):
         if not self.mall_check_money(4, 540):
             logger.warning('No enough money')
             logger.warning('No enough money')
             return
             return
-        # 点击购买
+        # 使用动态位置点击购买
         self.buy_more(self.I_HONOR_BLACK)
         self.buy_more(self.I_HONOR_BLACK)
         time.sleep(0.5)
         time.sleep(0.5)
 
 
 
 
-
-
-
 if __name__ == '__main__':
 if __name__ == '__main__':
     from module.config.config import Config
     from module.config.config import Config
     from module.device.device import Device
     from module.device.device import Device
@@ -92,6 +106,3 @@ if __name__ == '__main__':
 
 
     t.execute_honor()
     t.execute_honor()
 
 
-
-
-

+ 1 - 1
tasks/RichMan/mall/special.py

@@ -158,7 +158,7 @@ class Special(Buy, MallNavbar):
         # logger.info(f'上中点是:{upper_midpoint}')
         # logger.info(f'上中点是:{upper_midpoint}')
         # logger.info(f'数字的ROI是: {self.O_SP_RES_NUMBER.roi}')
         # logger.info(f'数字的ROI是: {self.O_SP_RES_NUMBER.roi}')
         result = self.O_SP_RES_NUMBER.ocr(self.device.image)
         result = self.O_SP_RES_NUMBER.ocr(self.device.image)
-        result = result.replace('?', '2').replace('?', '2').replace(':', ';').replace('火', '次').replace('教', '数')
+        result = result.replace('?', '2').replace('?', '2').replace(':', ';').replace('火', '次').replace('教', '数').replace('刺', '剩').replace('头', '买')
         try:
         try:
             if ':' in result:
             if ':' in result:
                 result = re.findall(r'(?:剩余)?购买次数:(\d+)', result)[0]
                 result = re.findall(r'(?:剩余)?购买次数:(\d+)', result)[0]