Procházet zdrojové kódy

feat(Component): Add battle costume '笼梦之境'

huangrunheng před 2 roky
rodič
revize
06d58a3802

+ 2 - 0
tasks/Component/Costume/config.py

@@ -46,6 +46,8 @@ class BattleType(str, Enum):
     COSTUME_BATTLE_4 = 'costume_battle_4'  # 春缕含青
     COSTUME_BATTLE_4 = 'costume_battle_4'  # 春缕含青
     COSTUME_BATTLE_5 = 'costume_battle_5'  # 祥夜幽芳
     COSTUME_BATTLE_5 = 'costume_battle_5'  # 祥夜幽芳
     COSTUME_BATTLE_6 = 'costume_battle_6'  # 桂馥金秋
     COSTUME_BATTLE_6 = 'costume_battle_6'  # 桂馥金秋
+    COSTUME_BATTLE_7 = 'costume_battle_7'  # 笼梦之境
+    COSTUME_BATTLE_8 = 'costume_battle_8'  # 藏金台阁
 
 
 
 
 
 

+ 5 - 0
tasks/Component/Costume/costume_base.py

@@ -103,6 +103,11 @@ battle_theme_model = {
         'I_EXIT': 'I_EXIT_6',
         'I_EXIT': 'I_EXIT_6',
         'I_FRIENDS': 'I_FRIENDS_6',
         'I_FRIENDS': 'I_FRIENDS_6',
     },
     },
+    BattleType.COSTUME_BATTLE_7: {
+        'I_LOCAL': 'I_LOCAL_7',
+        'I_EXIT': 'I_EXIT_7',
+        'I_FRIENDS': 'I_FRIENDS_7',
+    },
 }
 }
 
 
 
 

+ 18 - 0
tasks/Component/CostumeBattle/assets.py

@@ -64,3 +64,21 @@ class CostumeBattleAssets:
 	I_FRIENDS_6 = RuleImage(roi_front=(89,18,35,34), roi_back=(89,18,35,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle6/battle6_friends_6.png")
 	I_FRIENDS_6 = RuleImage(roi_front=(89,18,35,34), roi_back=(89,18,35,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle6/battle6_friends_6.png")
 
 
 
 
+	# Image Rule Assets
+	# 指针 
+	I_LOCAL_7 = RuleImage(roi_front=(30,566,23,25), roi_back=(30,566,23,25), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle7/battle7_local_7.png")
+	# 左上角退出 
+	I_EXIT_7 = RuleImage(roi_front=(22,17,27,31), roi_back=(22,17,27,31), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle7/battle7_exit_7.png")
+	# 左上角好友 
+	I_FRIENDS_7 = RuleImage(roi_front=(89,18,35,34), roi_back=(89,18,35,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle7/battle6_friends_7.png")
+
+
+	# Image Rule Assets
+	# 指针 
+	I_LOCAL_8 = RuleImage(roi_front=(30,566,23,25), roi_back=(30,566,23,25), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle8/battle7_local_8.png")
+	# 左上角退出 
+	I_EXIT_8 = RuleImage(roi_front=(22,17,27,31), roi_back=(22,17,27,31), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle8/battle7_exit_8.png")
+	# 左上角好友 
+	I_FRIENDS_8 = RuleImage(roi_front=(89,18,35,34), roi_back=(89,18,35,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle8/battle6_friends_8.png")
+
+

+ 29 - 0
tasks/Component/CostumeBattle/battle7/image.json

@@ -0,0 +1,29 @@
+[
+  {
+    "itemName": "local_7",
+    "imageName": "battle7_local_7.png",
+    "roiFront": "30,566,23,25",
+    "roiBack": "30,566,23,25",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "指针"
+  },
+  {
+    "itemName": "exit_7",
+    "imageName": "battle7_exit_7.png",
+    "roiFront": "22,17,27,31",
+    "roiBack": "22,17,27,31",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "左上角退出"
+  },
+  {
+    "itemName": "friends_7",
+    "imageName": "battle6_friends_7.png",
+    "roiFront": "89,18,35,34",
+    "roiBack": "89,18,35,34",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "左上角好友"
+  }
+]

+ 29 - 0
tasks/Component/CostumeBattle/battle8/image.json

@@ -0,0 +1,29 @@
+[
+  {
+    "itemName": "local_8",
+    "imageName": "battle7_local_8.png",
+    "roiFront": "30,566,23,25",
+    "roiBack": "30,566,23,25",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "指针"
+  },
+  {
+    "itemName": "exit_8",
+    "imageName": "battle7_exit_8.png",
+    "roiFront": "22,17,27,31",
+    "roiBack": "22,17,27,31",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "左上角退出"
+  },
+  {
+    "itemName": "friends_8",
+    "imageName": "battle6_friends_8.png",
+    "roiFront": "89,18,35,34",
+    "roiBack": "89,18,35,34",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "左上角好友"
+  }
+]