Procházet zdrojové kódy

调整(对弈竞猜):同步记录页面与最新识别素材

xylolit-mu před 1 měsícem
rodič
revize
98ce82bbfc

+ 25 - 9
tasks/FrogBoss/assets.py

@@ -12,23 +12,23 @@ class FrogBossAssets:
 
 
 	# Image Rule Assets
 	# Image Rule Assets
 	# 左边竞猜 
 	# 左边竞猜 
-	I_BET_LEFT = RuleImage(roi_front=(271,303,145,100), roi_back=(222,251,245,195), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_bet_left.png")
+	I_BET_LEFT = RuleImage(roi_front=(288,301,120,102), roi_back=(222,251,245,195), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_bet_left.png")
 	# 右边竞猜 
 	# 右边竞猜 
-	I_BET_RIGHT = RuleImage(roi_front=(1070,302,146,100), roi_back=(1048,248,187,208), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_bet_right.png")
+	I_BET_RIGHT = RuleImage(roi_front=(1093,307,118,94), roi_back=(1048,248,187,208), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_bet_right.png")
 	# description 
 	# description 
-	I_BET_SUCCESS_BOX = RuleImage(roi_front=(708,394,87,50), roi_back=(661,331,193,182), threshold=0.75, method="Template matching", file="./tasks/FrogBoss/fb/fb_bet_success_box.png")
+	I_BET_SUCCESS_BOX = RuleImage(roi_front=(713,399,80,45), roi_back=(661,331,193,182), threshold=0.75, method="Template matching", file="./tasks/FrogBoss/fb/fb_bet_success_box.png")
 	# 左边赢了 
 	# 左边赢了 
 	I_SUCCESS_LEFT = RuleImage(roi_front=(292,306,100,100), roi_back=(238,243,202,221), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_success_left.png")
 	I_SUCCESS_LEFT = RuleImage(roi_front=(292,306,100,100), roi_back=(238,243,202,221), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_success_left.png")
 	# 右边输了 
 	# 右边输了 
 	I_FAILURE_RIGHT = RuleImage(roi_front=(1097,303,100,100), roi_back=(1029,256,224,199), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_failure_right.png")
 	I_FAILURE_RIGHT = RuleImage(roi_front=(1097,303,100,100), roi_back=(1029,256,224,199), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_failure_right.png")
-	# description 
-	I_NEXT_COMPETITION = RuleImage(roi_front=(775,485,42,36), roi_back=(692,437,157,147), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_next_competition.png")
+	# 开始下一局
+	I_NEXT_COMPETITION = RuleImage(roi_front=(783,492,28,22), roi_back=(692,437,157,147), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_next_competition.png")
 	# 30万金币 
 	# 30万金币 
 	I_GOLD_30 = RuleImage(roi_front=(862,499,78,76), roi_back=(831,441,147,187), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_gold_30.png")
 	I_GOLD_30 = RuleImage(roi_front=(862,499,78,76), roi_back=(831,441,147,187), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_gold_30.png")
 	# 确认竞猜 
 	# 确认竞猜 
 	I_BET_SURE = RuleImage(roi_front=(1025,402,100,100), roi_back=(972,340,200,226), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_bet_sure.png")
 	I_BET_SURE = RuleImage(roi_front=(1025,402,100,100), roi_back=(972,340,200,226), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_bet_sure.png")
-	# description 
-	I_GOLD_30_CHECK = RuleImage(roi_front=(513,196,58,53), roi_back=(402,141,459,489), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_gold_30_check.png")
+	# 获胜奖励说明弹窗中的竞猜金币
+	I_GOLD_30_CHECK = RuleImage(roi_front=(513,196,58,53), roi_back=(495,195,104,111), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_gold_30_check.png")
 	# description 
 	# description 
 	I_BETTED = RuleImage(roi_front=(1093,313,125,54), roi_back=(207,240,1058,312), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_betted.png")
 	I_BETTED = RuleImage(roi_front=(1093,313,125,54), roi_back=(207,240,1058,312), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_betted.png")
 	# description 
 	# description 
@@ -36,7 +36,7 @@ class FrogBossAssets:
 	# description 
 	# description 
 	I_FAILURE_LEFT = RuleImage(roi_front=(296,303,100,100), roi_back=(243,245,212,259), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_failure_left.png")
 	I_FAILURE_LEFT = RuleImage(roi_front=(296,303,100,100), roi_back=(243,245,212,259), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_failure_left.png")
 	# description 
 	# description 
-	I_BET_FAILURE = RuleImage(roi_front=(591,290,269,72), roi_back=(496,222,447,211), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_bet_failure.png")
+	I_BET_FAILURE = RuleImage(roi_front=(625,277,269,72), roi_back=(496,222,447,211), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_bet_failure.png")
 	# description 
 	# description 
 	I_BET_SUCCESS = RuleImage(roi_front=(625,278,260,73), roi_back=(482,243,521,225), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_bet_success.png")
 	I_BET_SUCCESS = RuleImage(roi_front=(625,278,260,73), roi_back=(482,243,521,225), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_bet_success.png")
 
 
@@ -45,9 +45,23 @@ class FrogBossAssets:
 	# description 
 	# description 
 	I_FROG_BOSS_ENTER = RuleImage(roi_front=(1188,303,36,38), roi_back=(1169,203,78,320), threshold=0.7, method="Template matching", file="./tasks/FrogBoss/fb/fb_frog_boss_enter.png")
 	I_FROG_BOSS_ENTER = RuleImage(roi_front=(1188,303,36,38), roi_back=(1169,203,78,320), threshold=0.7, method="Template matching", file="./tasks/FrogBoss/fb/fb_frog_boss_enter.png")
 	# 休息中 
 	# 休息中 
-	I_FROG_BOSS_REST = RuleImage(roi_front=(510,274,169,64), roi_back=(492,260,220,113), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_frog_boss_rest.png")
+	I_FROG_BOSS_REST = RuleImage(roi_front=(627,284,169,64), roi_back=(601,259,220,113), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_frog_boss_rest.png")
 	# 竞猜主页面
 	# 竞猜主页面
 	I_FROG_CHECK = RuleImage(roi_front=(664,31,148,65), roi_back=(551,4,371,145), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_frog_check.png")
 	I_FROG_CHECK = RuleImage(roi_front=(664,31,148,65), roi_back=(551,4,371,145), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_frog_check.png")
+	# 进入记录页面
+	I_FROG_LOG = RuleImage(roi_front=(1171,624,43,41), roi_back=(1157,601,83,89), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_frog_log.png")
+	#
+	I_FROG_LOG_CHECK = RuleImage(roi_front=(549,31,192,52), roi_back=(469,0,371,145), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_frog_log_check.png")
+	# 上一局胜
+	I_FROG_LAST_WIN = RuleImage(roi_front=(178,210,61,49), roi_back=(148,147,114,123), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_frog_last_win.png")
+	# 上一局败
+	I_FROG_LAST_LOSE = RuleImage(roi_front=(178,210,61,49), roi_back=(148,147,114,123), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_frog_last_lose.png")
+	# 关闭记录
+	I_FROG_LOG_CLOSE = RuleImage(roi_front=(1188,99,43,41), roi_back=(1166,73,83,89), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_frog_log_close.png")
+	# 上一局选择红色
+	I_FROG_LAST_SELECT_RED = RuleImage(roi_front=(342,149,36,38), roi_back=(327,120,70,77), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_frog_last_select_red.png")
+	# 上一句选择蓝色
+	I_FROG_LAST_SELECT_BLUE = RuleImage(roi_front=(342,149,36,38), roi_back=(327,120,70,77), threshold=0.8, method="Template matching", file="./tasks/FrogBoss/fb/fb_frog_last_select_blue.png")
 
 
 
 
 	# Ocr Rule Assets
 	# Ocr Rule Assets
@@ -57,5 +71,7 @@ class FrogBossAssets:
 	O_RIGHT_COUNT = RuleOcr(roi=(1139,472,77,32), area=(1139,472,77,32), mode="Digit", method="Default", keyword="", name="right_count")
 	O_RIGHT_COUNT = RuleOcr(roi=(1139,472,77,32), area=(1139,472,77,32), mode="Digit", method="Default", keyword="", name="right_count")
 	# Ocr-description 
 	# Ocr-description 
 	O_TIME_REMAIN = RuleOcr(roi=(705,533,91,35), area=(705,533,91,35), mode="Duration", method="Default", keyword="", name="time_remain")
 	O_TIME_REMAIN = RuleOcr(roi=(705,533,91,35), area=(705,533,91,35), mode="Duration", method="Default", keyword="", name="time_remain")
+	# 上一句对局时间
+	O_FROG_LAST_TIME = RuleOcr(roi=(120,154,160,30), area=(120,154,160,30), mode="Single", method="Default", keyword="", name="frog_last_time")
 
 
 
 

binární
tasks/FrogBoss/fb/fb_bet_failure.png


binární
tasks/FrogBoss/fb/fb_bet_left.png


binární
tasks/FrogBoss/fb/fb_bet_right.png


binární
tasks/FrogBoss/fb/fb_bet_success_box.png


binární
tasks/FrogBoss/fb/fb_failure_right.png


binární
tasks/FrogBoss/fb/fb_frog_boss_rest.png


binární
tasks/FrogBoss/fb/fb_frog_last_lose.png


binární
tasks/FrogBoss/fb/fb_frog_last_select_blue.png


binární
tasks/FrogBoss/fb/fb_frog_last_select_red.png


binární
tasks/FrogBoss/fb/fb_frog_last_win.png


binární
tasks/FrogBoss/fb/fb_frog_log.png


binární
tasks/FrogBoss/fb/fb_frog_log_check.png


binární
tasks/FrogBoss/fb/fb_frog_log_close.png


binární
tasks/FrogBoss/fb/fb_next_competition.png


binární
tasks/FrogBoss/fb/fb_success_left.png


+ 9 - 23
tasks/FrogBoss/fb/image.json

@@ -2,31 +2,28 @@
   {
   {
     "itemName": "bet_left",
     "itemName": "bet_left",
     "imageName": "fb_bet_left.png",
     "imageName": "fb_bet_left.png",
-    "roiFront": "271,303,145,100",
+    "roiFront": "288,301,120,102",
     "roiBack": "222,251,245,195",
     "roiBack": "222,251,245,195",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
     "description": "左边竞猜"
     "description": "左边竞猜"
   },
   },
   {
   {
     "itemName": "bet_right",
     "itemName": "bet_right",
     "imageName": "fb_bet_right.png",
     "imageName": "fb_bet_right.png",
-    "roiFront": "1070,302,146,100",
+    "roiFront": "1093,307,118,94",
     "roiBack": "1048,248,187,208",
     "roiBack": "1048,248,187,208",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
     "description": "右边竞猜"
     "description": "右边竞猜"
   },
   },
   {
   {
     "itemName": "bet_success_box",
     "itemName": "bet_success_box",
     "imageName": "fb_bet_success_box.png",
     "imageName": "fb_bet_success_box.png",
-    "roiFront": "708,394,87,50",
+    "roiFront": "713,399,80,45",
     "roiBack": "661,331,193,182",
     "roiBack": "661,331,193,182",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.75,
     "threshold": 0.75,
-    "profile": "Default",
     "description": "description"
     "description": "description"
   },
   },
   {
   {
@@ -36,7 +33,6 @@
     "roiBack": "238,243,202,221",
     "roiBack": "238,243,202,221",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
     "description": "左边赢了"
     "description": "左边赢了"
   },
   },
   {
   {
@@ -46,18 +42,16 @@
     "roiBack": "1029,256,224,199",
     "roiBack": "1029,256,224,199",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
     "description": "右边输了"
     "description": "右边输了"
   },
   },
   {
   {
     "itemName": "next_competition",
     "itemName": "next_competition",
     "imageName": "fb_next_competition.png",
     "imageName": "fb_next_competition.png",
-    "roiFront": "775,485,42,36",
+    "roiFront": "783,492,28,22",
     "roiBack": "692,437,157,147",
     "roiBack": "692,437,157,147",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
-    "description": "description"
+    "description": "开始下一局"
   },
   },
   {
   {
     "itemName": "gold_30",
     "itemName": "gold_30",
@@ -66,7 +60,6 @@
     "roiBack": "831,441,147,187",
     "roiBack": "831,441,147,187",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
     "description": "30万金币"
     "description": "30万金币"
   },
   },
   {
   {
@@ -76,18 +69,16 @@
     "roiBack": "972,340,200,226",
     "roiBack": "972,340,200,226",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
     "description": "确认竞猜"
     "description": "确认竞猜"
   },
   },
   {
   {
     "itemName": "gold_30_check",
     "itemName": "gold_30_check",
     "imageName": "fb_gold_30_check.png",
     "imageName": "fb_gold_30_check.png",
     "roiFront": "513,196,58,53",
     "roiFront": "513,196,58,53",
-    "roiBack": "402,141,459,489",
+    "roiBack": "495,195,104,111",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
-    "description": "description"
+    "description": "获胜奖励说明弹窗中的竞猜金币"
   },
   },
   {
   {
     "itemName": "betted",
     "itemName": "betted",
@@ -96,7 +87,6 @@
     "roiBack": "207,240,1058,312",
     "roiBack": "207,240,1058,312",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
     "description": "description"
     "description": "description"
   },
   },
   {
   {
@@ -106,7 +96,6 @@
     "roiBack": "1040,250,201,260",
     "roiBack": "1040,250,201,260",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
     "description": "description"
     "description": "description"
   },
   },
   {
   {
@@ -116,17 +105,15 @@
     "roiBack": "243,245,212,259",
     "roiBack": "243,245,212,259",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
     "description": "description"
     "description": "description"
   },
   },
   {
   {
     "itemName": "bet_failure",
     "itemName": "bet_failure",
     "imageName": "fb_bet_failure.png",
     "imageName": "fb_bet_failure.png",
-    "roiFront": "591,290,269,72",
+    "roiFront": "625,277,269,72",
     "roiBack": "496,222,447,211",
     "roiBack": "496,222,447,211",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
     "description": "description"
     "description": "description"
   },
   },
   {
   {
@@ -136,7 +123,6 @@
     "roiBack": "482,243,521,225",
     "roiBack": "482,243,521,225",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
     "description": "description"
     "description": "description"
   }
   }
-]
+]

+ 66 - 6
tasks/FrogBoss/fb/image2.json

@@ -6,17 +6,15 @@
     "roiBack": "1169,203,78,320",
     "roiBack": "1169,203,78,320",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.7,
     "threshold": 0.7,
-    "profile": "Default",
     "description": "description"
     "description": "description"
   },
   },
   {
   {
     "itemName": "frog_boss_rest",
     "itemName": "frog_boss_rest",
     "imageName": "fb_frog_boss_rest.png",
     "imageName": "fb_frog_boss_rest.png",
-    "roiFront": "510,274,169,64",
-    "roiBack": "492,260,220,113",
+    "roiFront": "627,284,169,64",
+    "roiBack": "601,259,220,113",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
     "description": "休息中"
     "description": "休息中"
   },
   },
   {
   {
@@ -26,7 +24,69 @@
     "roiBack": "551,4,371,145",
     "roiBack": "551,4,371,145",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
-    "profile": "Default",
     "description": "竞猜主页面"
     "description": "竞猜主页面"
+  },
+  {
+    "itemName": "frog_log",
+    "imageName": "fb_frog_log.png",
+    "roiFront": "1171,624,43,41",
+    "roiBack": "1157,601,83,89",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "进入记录页面"
+  },
+  {
+    "itemName": "frog_log_check",
+    "imageName": "fb_frog_log_check.png",
+    "roiFront": "549,31,192,52",
+    "roiBack": "469,0,371,145",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": ""
+  },
+  {
+    "itemName": "frog_last_win",
+    "imageName": "fb_frog_last_win.png",
+    "roiFront": "178,210,61,49",
+    "roiBack": "148,147,114,123",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "上一局胜"
+  },
+  {
+    "itemName": "frog_last_lose",
+    "imageName": "fb_frog_last_lose.png",
+    "roiFront": "178,210,61,49",
+    "roiBack": "148,147,114,123",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "上一局败"
+  },
+  {
+    "itemName": "frog_log_close",
+    "imageName": "fb_frog_log_close.png",
+    "roiFront": "1188,99,43,41",
+    "roiBack": "1166,73,83,89",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "关闭记录"
+  },
+  {
+    "itemName": "frog_last_select_red",
+    "imageName": "fb_frog_last_select_red.png",
+    "roiFront": "342,149,36,38",
+    "roiBack": "327,120,70,77",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "上一局选择红色"
+  },
+  {
+    "itemName": "frog_last_select_blue",
+    "imageName": "fb_frog_last_select_blue.png",
+    "roiFront": "342,149,36,38",
+    "roiBack": "327,120,70,77",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "上一句选择蓝色"
   }
   }
-]
+]

+ 9 - 0
tasks/FrogBoss/fb/ocr.json

@@ -25,5 +25,14 @@
     "method": "Default",
     "method": "Default",
     "keyword": "",
     "keyword": "",
     "description": "Ocr-description"
     "description": "Ocr-description"
+  },
+  {
+    "itemName": "frog_last_time",
+    "roiFront": "120,154,160,30",
+    "roiBack": "120,154,160,30",
+    "mode": "Single",
+    "method": "Default",
+    "keyword": "",
+    "description": "上一句对局时间"
   }
   }
 ]
 ]