Bladeren bron

增加麒麟页面识别

yEs1do 1 jaar geleden
bovenliggende
commit
5a443655cd

+ 3 - 1
tasks/GameUi/assets.py

@@ -109,8 +109,10 @@ class GameUiAssets:
 	I_CHECK_DUEL = RuleImage(roi_front=(110,10,64,38), roi_back=(79,1,110,74), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_duel.png")
 	I_CHECK_DUEL = RuleImage(roi_front=(110,10,64,38), roi_back=(79,1,110,74), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_duel.png")
 	# description 
 	# description 
 	I_CHECK_DEMON_ENCOUNTER = RuleImage(roi_front=(26,658,42,43), roi_back=(2,619,100,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_demon_encounter.png")
 	I_CHECK_DEMON_ENCOUNTER = RuleImage(roi_front=(26,658,42,43), roi_back=(2,619,100,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_demon_encounter.png")
-	# description 
+	# 检查狩猎战界面 
 	I_CHECK_HUNT = RuleImage(roi_front=(575,30,46,25), roi_back=(553,1,81,68), threshold=0.7, method="Template matching", file="./tasks/GameUi/page/page_check_hunt.png")
 	I_CHECK_HUNT = RuleImage(roi_front=(575,30,46,25), roi_back=(553,1,81,68), threshold=0.7, method="Template matching", file="./tasks/GameUi/page/page_check_hunt.png")
+	# 检查狩猎战麒麟界面 
+	I_CHECK_HUNT_KIRIN = RuleImage(roi_front=(353,240,30,54), roi_back=(328,234,81,68), threshold=0.7, method="Template matching", file="./tasks/GameUi/page/page_check_hunt_kirin.png")
 	# description 
 	# description 
 	I_CHECK_HYAKKISEN = RuleImage(roi_front=(1014,607,53,55), roi_back=(986,587,100,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_hyakkisen.png")
 	I_CHECK_HYAKKISEN = RuleImage(roi_front=(1014,607,53,55), roi_back=(986,587,100,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_hyakkisen.png")
 	# description 
 	# description 

+ 1 - 1
tasks/GameUi/game_ui.py

@@ -30,7 +30,7 @@ class GameUi(BaseTask, GameUiAssets):
         page_secret_zones, page_area_boss, page_heian_kitan, page_six_gates, page_bondling_fairyland,
         page_secret_zones, page_area_boss, page_heian_kitan, page_six_gates, page_bondling_fairyland,
         page_kekkai_toppa,
         page_kekkai_toppa,
         # 町中的
         # 町中的
-        page_duel, page_demon_encounter, page_hunt, page_draft_duel, page_hyakkisen,
+        page_duel, page_demon_encounter, page_hunt, page_hunt_kirin, page_draft_duel, page_hyakkisen,
         # 庭院里面的
         # 庭院里面的
         page_shikigami_records, page_onmyodo, page_friends, page_daily, page_mall, page_guild, page_team,
         page_shikigami_records, page_onmyodo, page_friends, page_daily, page_mall, page_guild, page_team,
         page_collection,
         page_collection,

+ 4 - 0
tasks/GameUi/page.py

@@ -108,6 +108,10 @@ page_town.link(button=G.I_TOWN_GOTO_DEMON_ENCOUNTER, destination=page_demon_enco
 page_hunt = Page(G.I_CHECK_HUNT)
 page_hunt = Page(G.I_CHECK_HUNT)
 page_hunt.link(button=G.I_BACK_BL, destination=page_town)
 page_hunt.link(button=G.I_BACK_BL, destination=page_town)
 page_town.link(button=G.I_TOWN_GOTO_HUNT, destination=page_hunt)
 page_town.link(button=G.I_TOWN_GOTO_HUNT, destination=page_hunt)
+# 狩猎战麒麟 hunt_kirin
+page_hunt_kirin = Page(G.I_CHECK_HUNT_KIRIN)
+page_hunt_kirin.link(button=G.I_BACK_YOLLOW, destination=page_town)
+page_town.link(button=G.I_TOWN_GOTO_HUNT, destination=page_hunt_kirin)
 # 协同斗技 draft_duel
 # 协同斗技 draft_duel
 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)

BIN
tasks/GameUi/page/page_check_hunt_kirin.png


+ 10 - 1
tasks/GameUi/page/page_img_2.json

@@ -96,7 +96,16 @@
     "roiBack": "553,1,81,68",
     "roiBack": "553,1,81,68",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.7,
     "threshold": 0.7,
-    "description": "description"
+    "description": "检查狩猎战界面"
+  },
+  {
+    "itemName": "check_hunt_kirin",
+    "imageName": "page_check_hunt_kirin.png",
+    "roiFront": "353,240,30,54",
+    "roiBack": "328,234,81,68",
+    "method": "Template matching",
+    "threshold": 0.7,
+    "description": "检查狩猎战麒麟界面"
   },
   },
   {
   {
     "itemName": "check_hyakkisen",
     "itemName": "check_hyakkisen",

+ 3 - 3
tasks/Hunt/script_task.py

@@ -10,7 +10,7 @@ from module.logger import logger
 from module.base.timer import Timer
 from module.base.timer import Timer
 
 
 from tasks.GameUi.game_ui import GameUi
 from tasks.GameUi.game_ui import GameUi
-from tasks.GameUi.page import page_main, page_hunt, page_shikigami_records
+from tasks.GameUi.page import page_main, page_hunt, page_hunt_kirin, page_shikigami_records
 from tasks.Component.GeneralBattle.general_battle import GeneralBattle
 from tasks.Component.GeneralBattle.general_battle import GeneralBattle
 from tasks.Component.GeneralBattle.config_general_battle import GeneralBattleConfig
 from tasks.Component.GeneralBattle.config_general_battle import GeneralBattleConfig
 from tasks.Component.GeneralInvite.general_invite import GeneralInvite
 from tasks.Component.GeneralInvite.general_invite import GeneralInvite
@@ -38,11 +38,11 @@ class ScriptTask(GameUi, GeneralBattle, GeneralInvite, SwitchSoul, HuntAssets):
                 if con.netherworld_group_team != '-1,-1':
                 if con.netherworld_group_team != '-1,-1':
                     self.run_switch_soul(con.netherworld_group_team)
                     self.run_switch_soul(con.netherworld_group_team)
         self.ui_get_current_page()
         self.ui_get_current_page()
-        self.ui_goto(page_hunt)
-
         if self.kirin_day:
         if self.kirin_day:
+            self.ui_goto(page_hunt_kirin)
             self.kirin()
             self.kirin()
         else:
         else:
+            self.ui_goto(page_hunt)
             self.netherworld()
             self.netherworld()
         sleep(1)
         sleep(1)