Forráskód Böngészése

Merge pull request #1610 from asdadasdd/add-costume-battle-13

添加战斗主题:茸茨跃动
huangrunheng 5 hónapja
szülő
commit
032de0febe

+ 1 - 1
assets/i18n/zh-CN.json

@@ -18,6 +18,7 @@
   "costume_carpbanner_type_help": "多数结界通用",
   "costume_carpbanner_type_help": "多数结界通用",
   "costume_battle_10": "流焰蝶舞",
   "costume_battle_10": "流焰蝶舞",
   "costume_battle_11": "辰烁奇夜",
   "costume_battle_11": "辰烁奇夜",
+  "costume_battle_13": "茸茨跃动",
   "enable_courtyard_affairs": "庭院事务",
   "enable_courtyard_affairs": "庭院事务",
   "GuildActivityMonitor": "寮活动监控",
   "GuildActivityMonitor": "寮活动监控",
   "guild_activity_monitor_combat_time": "监控时间设置",
   "guild_activity_monitor_combat_time": "监控时间设置",
@@ -38,4 +39,3 @@
   "emulator_startup_lead_time_help": "在开始运行任务之前提前启动模拟器的时间",
   "emulator_startup_lead_time_help": "在开始运行任务之前提前启动模拟器的时间",
   "exit_four_help": "支持打九退四,保证稳定57级,要求设置好战斗主题,即 脚本->全局配置->游戏装饰自定义->战斗主题"
   "exit_four_help": "支持打九退四,保证稳定57级,要求设置好战斗主题,即 脚本->全局配置->游戏装饰自定义->战斗主题"
 }
 }
-

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

@@ -70,6 +70,7 @@ class BattleType(str, Enum):
     COSTUME_BATTLE_10 = 'costume_battle_10'  # 流焰蝶舞
     COSTUME_BATTLE_10 = 'costume_battle_10'  # 流焰蝶舞
     COSTUME_BATTLE_11 = 'costume_battle_11'  # 辰烁奇夜
     COSTUME_BATTLE_11 = 'costume_battle_11'  # 辰烁奇夜
     COSTUME_BATTLE_12 = 'costume_battle_12'  # 招财纳福
     COSTUME_BATTLE_12 = 'costume_battle_12'  # 招财纳福
+    COSTUME_BATTLE_13 = 'costume_battle_13'  # 茸茨跃动
 
 
 
 
 
 

+ 7 - 1
tasks/Component/Costume/costume_base.py

@@ -37,7 +37,7 @@ carpbanner_costume_model = {
 
 
 # 战斗主题(使用循环处理常规情况 + 特例处理)
 # 战斗主题(使用循环处理常规情况 + 特例处理)
 battle_theme_model = {}
 battle_theme_model = {}
-for i in range(1, 13):
+for i in range(1, 14):
     entry = {
     entry = {
         'I_LOCAL': f'I_LOCAL_{i}',
         'I_LOCAL': f'I_LOCAL_{i}',
         'I_EXIT': f'I_EXIT_{i}',
         'I_EXIT': f'I_EXIT_{i}',
@@ -55,6 +55,12 @@ for i in range(1, 13):
             'I_DE_WIN': 'I_DE_WIN_12',
             'I_DE_WIN': 'I_DE_WIN_12',
             'I_FALSE': 'I_FALSE_12'
             'I_FALSE': 'I_FALSE_12'
         })
         })
+    if i == 13:  # 13项特殊处理
+        entry.update({
+            'I_WIN': 'I_WIN_13',
+            'I_DE_WIN': 'I_DE_WIN_13',
+            'I_FALSE': 'I_FALSE_13'
+        })
     battle_theme_model[getattr(BattleType, f"COSTUME_BATTLE_{i}")] = entry
     battle_theme_model[getattr(BattleType, f"COSTUME_BATTLE_{i}")] = entry
 
 
 # 幕间主题
 # 幕间主题

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

@@ -52,6 +52,21 @@ class CostumeBattleAssets:
 	I_FALSE_12 = RuleImage(roi_front=(390,30,58,86), roi_back=(390,30,510,290), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle12/battle12_false_12.png")
 	I_FALSE_12 = RuleImage(roi_front=(390,30,58,86), roi_back=(390,30,510,290), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle12/battle12_false_12.png")
 
 
 
 
+	# Image Rule Assets
+	# 左上角退出 
+	I_EXIT_13 = RuleImage(roi_front=(25,21,24,24), roi_back=(16,10,40,44), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle13/battle13_exit_13.png")
+	# 左上角好友 
+	I_FRIENDS_13 = RuleImage(roi_front=(95,17,28,27), roi_back=(88,12,40,40), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle13/battle13_friends_13.png")
+	# 指针 
+	I_LOCAL_13 = RuleImage(roi_front=(115,491,30,32), roi_back=(107,479,48,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle13/battle13_local_13.png")
+	# 战斗胜利 
+	I_WIN_13 = RuleImage(roi_front=(590,152,87,129), roi_back=(390,30,510,290), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle13/battle13_win_13.png")
+	# 针对封魔的特殊 
+	I_DE_WIN_13 = RuleImage(roi_front=(590,152,87,129), roi_back=(390,30,510,290), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle13/battle13_de_win_13.png")
+	# 失败 
+	I_FALSE_13 = RuleImage(roi_front=(586,178,76,110), roi_back=(380,55,510,290), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle13/battle13_false_13.png")
+
+
 	# Image Rule Assets
 	# Image Rule Assets
 	# description 
 	# description 
 	I_LOCAL_2 = RuleImage(roi_front=(30,569,21,22), roi_back=(30,569,21,22), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle2/battle2_local_2.png")
 	I_LOCAL_2 = RuleImage(roi_front=(30,569,21,22), roi_back=(30,569,21,22), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeBattle/battle2/battle2_local_2.png")

BIN
tasks/Component/CostumeBattle/battle13/battle13_de_win_13.png


BIN
tasks/Component/CostumeBattle/battle13/battle13_exit_13.png


BIN
tasks/Component/CostumeBattle/battle13/battle13_false_13.png


BIN
tasks/Component/CostumeBattle/battle13/battle13_friends_13.png


BIN
tasks/Component/CostumeBattle/battle13/battle13_local_13.png


BIN
tasks/Component/CostumeBattle/battle13/battle13_win_13.png


+ 56 - 0
tasks/Component/CostumeBattle/battle13/image.json

@@ -0,0 +1,56 @@
+[
+  {
+    "itemName": "exit_13",
+    "imageName": "battle13_exit_13.png",
+    "roiFront": "25,21,24,24",
+    "roiBack": "16,10,40,44",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "左上角退出"
+  },
+  {
+    "itemName": "friends_13",
+    "imageName": "battle13_friends_13.png",
+    "roiFront": "95,17,28,27",
+    "roiBack": "88,12,40,40",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "左上角好友"
+  },
+  {
+    "itemName": "local_13",
+    "imageName": "battle13_local_13.png",
+    "roiFront": "115,491,30,32",
+    "roiBack": "107,479,48,50",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "指针"
+  },
+  {
+    "itemName": "win_13",
+    "imageName": "battle13_win_13.png",
+    "roiFront": "590,152,87,129",
+    "roiBack": "390,30,510,290",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "战斗胜利"
+  },
+  {
+    "itemName": "de_win_13",
+    "imageName": "battle13_de_win_13.png",
+    "roiFront": "590,152,87,129",
+    "roiBack": "390,30,510,290",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "针对封魔的特殊"
+  },
+  {
+    "itemName": "false_13",
+    "imageName": "battle13_false_13.png",
+    "roiFront": "586,178,76,110",
+    "roiBack": "380,55,510,290",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "失败"
+  }
+]