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

fix(GeneralBattle): Revert unknown settlement popup handling and ROI adjustments #1583

ryland 5 месяцев назад
Родитель
Сommit
eb687537e6

+ 2 - 2
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")
 	# description 
-	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_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_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")
 	# 退出确认 
@@ -143,7 +143,7 @@ class GeneralBattleAssets:
 	# 确认按钮 
 	I_CONFIRM = RuleImage(roi_front=(732,383,83,43), roi_back=(330,228,615,286), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_confirm.png")
 	# 关闭御魂不一致提示弹窗 
-	I_CONFIRM_CLOSE_DIFF_SOUL = RuleImage(roi_front=(571,404,135,54), roi_back=(508,372,255,161), threshold=0.7, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_confirm_close_diff_soul.png")
+	I_CONFIRM_CLOSE_DIFF_SOUL = RuleImage(roi_front=(571,404,135,54), roi_back=(517,374,226,112), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_confirm_close_diff_soul.png")
 	# 禁用御魂不一致提示7天 
 	I_DISABLE_7DAYS_DIFF_SOUL = RuleImage(roi_front=(547,342,27,36), roi_back=(524,325,70,71), threshold=0.8, method="Template matching", file="./tasks/Component/GeneralBattle/gb/gb_disable_7days_diff_soul.png")
 

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

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

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

@@ -21,9 +21,9 @@
     "itemName": "confirm_close_diff_soul",
     "imageName": "gb_confirm_close_diff_soul.png",
     "roiFront": "571,404,135,54",
-    "roiBack": "508,372,255,161",
+    "roiBack": "517,374,226,112",
     "method": "Template matching",
-    "threshold": 0.7,
+    "threshold": 0.8,
     "description": "关闭御魂不一致提示弹窗"
   },
   {

+ 1 - 6
tasks/Component/GeneralBattle/general_battle.py

@@ -237,13 +237,8 @@ class GeneralBattle(GeneralBuff, GeneralBattleAssets):
                 # self.appear_then_click(self.I_REWARD_SOUL_6, action=action_click, interval=1.5)
                 ):
                 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)  #碎片
-                self.appear_then_click(self.I_CONFIRM_CLOSE_DIFF_SOUL) #整个皮肤
-                continue
             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_PURPLE_SNAKE_SKIN) and
                 # not self.appear(self.I_REWARD_GOLD_SNAKE_SKIN) and