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

Merge pull request #1399 from migsmiku/dev

fix(ScriptTask): update back button identifier from I_BACK_BL to I_BA…
huangrunheng 9 месяцев назад
Родитель
Сommit
ed4a853805

+ 4 - 2
tasks/Duel/script_task.py

@@ -92,7 +92,9 @@ class ScriptTask(GameUi, GeneralBattle, SwitchSoul, DuelAssets):
             # 关闭恭喜晋升段位页面
             if self.appear_then_click(GGA.I_UI_BACK_RED):
                 continue
-            if self.appear_then_click(self.I_REWARD, interval=0.6):
+            if self.appear_then_click(self.I_REWARD):
+                continue
+            if self.appear_then_click(self.I_WIN):
                 continue
             if not self.duel_main():
                 continue
@@ -481,7 +483,7 @@ class ScriptTask(GameUi, GeneralBattle, SwitchSoul, DuelAssets):
 if __name__ == '__main__':
     from module.config.config import Config
     from module.device.device import Device
-    c = Config('oas3')
+    c = Config('oas2')
     d = Device(c)
     t = ScriptTask(c, d)
 

+ 1 - 1
tasks/EvoZone/script_task.py

@@ -317,7 +317,7 @@ class ScriptTask(GeneralBattle, GeneralInvite, GeneralBuff, GeneralRoom, GameUi,
             self.screenshot()
             if not self.appear(self.I_FORM_TEAM):
                 break
-            if self.appear_then_click(self.I_BACK_BL, interval=1):
+            if self.appear_then_click(self.I_BACK_Y, interval=1):
                 continue
 
         self.ui_current = page_awake_zones

+ 2 - 2
tasks/GameUi/assets.py

@@ -112,8 +112,8 @@ class GameUiAssets:
 	I_TOWN_GOTO_DRAFT_DUEL = RuleImage(roi_front=(335,159,55,72), roi_back=(170,145,567,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_town_goto_draft_duel.png")
 	# 百鬼奕 
 	I_TOWN_GOTO_HYAKKISEN = RuleImage(roi_front=(192,145,48,67), roi_back=(86,130,447,100), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_town_goto_hyakkisen.png")
-	# description 
-	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=(151,12,71,44), roi_back=(79,1,474,74), threshold=0.8, method="Template matching", file="./tasks/GameUi/page/page_check_duel.png")
 	# 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")
 	# 检查狩猎战界面 

BIN
tasks/GameUi/page/page_check_duel.png


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

@@ -74,11 +74,11 @@
   {
     "itemName": "check_duel",
     "imageName": "page_check_duel.png",
-    "roiFront": "110,10,64,38",
-    "roiBack": "79,1,110,74",
+    "roiFront": "151,17,71,39",
+    "roiBack": "79,1,474,74",
     "method": "Template matching",
     "threshold": 0.8,
-    "description": "description"
+    "description": "检查斗技页面"
   },
   {
     "itemName": "check_demon_encounter",