Kaynağa Gözat

fix(GeneralBattle): 添加未知结算弹窗处理

- 调整 I_STATISTICS 图像识别的 roiFront 和 roiBack 坐标
- 在结算流程中新增未知结算弹窗(如皮肤碎片等)的检测逻辑,当检测到统计界面但无已知奖励和胜利标识时,点击空白区域跳过
- 仅测试探索
yuyuyuyuyu 5 ay önce
ebeveyn
işleme
f23739aac5

+ 1 - 1
tasks/Component/GeneralBattle/assets.py

@@ -98,7 +98,7 @@ class GeneralBattleAssets:
 	# 左下角的位置指针 
 	# 左下角的位置指针 
 	I_LOCAL = RuleImage(roi_front=(25,563,30,34), roi_back=(25,563,30,34), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_local.png")
 	I_LOCAL = RuleImage(roi_front=(25,563,30,34), roi_back=(25,563,30,34), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_local.png")
 	# description 
 	# description 
-	I_STATISTICS = RuleImage(roi_front=(61,644,33,28), roi_back=(61,644,33,28), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_statistics.png")
+	I_STATISTICS = RuleImage(roi_front=(70,630,33,28), roi_back=(35,28,411,661), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_statistics.png")
 	# 左上角的退出 
 	# 左上角的退出 
 	I_EXIT = RuleImage(roi_front=(14,12,43,41), roi_back=(14,12,43,41), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_exit.png")
 	I_EXIT = RuleImage(roi_front=(14,12,43,41), roi_back=(14,12,43,41), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_exit.png")
 	# 退出确认 
 	# 退出确认 

+ 2 - 2
tasks/Component/GeneralBattle/gb/image.json

@@ -137,8 +137,8 @@
   {
   {
     "itemName": "statistics",
     "itemName": "statistics",
     "imageName": "gb_statistics.png",
     "imageName": "gb_statistics.png",
-    "roiFront": "61,644,33,28",
-    "roiBack": "61,644,33,28",
+    "roiFront": "70,630,33,28",
+    "roiBack": "35,28,411,661",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"

+ 4 - 0
tasks/Component/GeneralBattle/general_battle.py

@@ -237,6 +237,10 @@ class GeneralBattle(GeneralBuff, GeneralBattleAssets):
                 # self.appear_then_click(self.I_REWARD_SOUL_6, action=action_click, interval=1.5)
                 # self.appear_then_click(self.I_REWARD_SOUL_6, action=action_click, interval=1.5)
                 ):
                 ):
                 continue
                 continue
+            # 未知结算弹窗(皮肤碎片等):点一下空白区域尝试跳过
+            if self.appear(self.I_STATISTICS) and not self.appear(self.I_REWARD)and not self.appear(self.I_WIN):
+                self.click(self.C_RANDOM_CLICK)
+                continue
             if (not self.appear(self.I_REWARD) and
             if (not self.appear(self.I_REWARD) and
                 not self.appear(self.I_REWARD_GOLD)#  and
                 not self.appear(self.I_REWARD_GOLD)#  and
                 # not self.appear(self.I_REWARD_STATISTICS) and
                 # not self.appear(self.I_REWARD_STATISTICS) and