Quellcode durchsuchen

工具优化8.6

181404010226 vor 4 Monaten
Ursprung
Commit
b428cd1b8d

+ 9 - 9
assets/Scenes/GameLevel.scene

@@ -140,7 +140,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 360,
+      "x": 360.00000000000006,
       "y": 667,
       "z": 0
     },
@@ -476,7 +476,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 0,
+      "x": -5.684341886080802e-14,
       "y": 0,
       "z": 0
     },
@@ -10699,7 +10699,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -310,
+      "x": -310.00000000000006,
       "y": 577.3409999999999,
       "z": 0
     },
@@ -10757,7 +10757,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 360,
+      "x": 360.00000000000006,
       "y": 667,
       "z": 0
     },
@@ -10887,7 +10887,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 720,
+      "width": 720.0000000000001,
       "height": 1334
     },
     "_anchorPoint": {
@@ -14590,7 +14590,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 0,
+      "x": -5.684341886080802e-14,
       "y": 0,
       "z": 0
     },
@@ -16965,7 +16965,7 @@
       "__id__": 395
     },
     "_children": [],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 455
@@ -23936,7 +23936,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -310,
+      "x": -310.00000000000006,
       "y": 617,
       "z": 0
     },
@@ -34966,7 +34966,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 720,
+      "width": 720.0000000000001,
       "height": 1334
     },
     "_anchorPoint": {

+ 298 - 46
assets/resources/data/excel/config_manager.py

@@ -119,7 +119,9 @@ class ConfigManagerGUI:
                     '金币奖励': int,
                     '钻石奖励': int
                 },
-                'format_type': 'horizontal'
+                'format_type': 'horizontal',
+                'multi_sheet': True,  # 标记为多工作表文件
+                'sheet_names': ['关卡基础配置', '波次配置', '敌人配置', '敌人名称映射']  # 需要读取的工作表
             },
             '技能配置表.xlsx': {
                 'json_path': self.project_root / "assets/resources/data/skill.json",
@@ -387,12 +389,22 @@ class ConfigManagerGUI:
                     continue
                 
                 if file_config:
-                    self.config_data.update(file_config)
-                    
-                    # 显示预览
-                    self.preview_text.insert(tk.END, f"找到 {len(file_config)} 个配置参数:\n")
-                    for key, value in file_config.items():
-                        self.preview_text.insert(tk.END, f"  {key}: {value}\n")
+                    # 检查file_config的类型,如果是列表则特殊处理
+                    if isinstance(file_config, list):
+                        # 对于关卡配置等返回列表的情况
+                        self.preview_text.insert(tk.END, f"找到 {len(file_config)} 个配置项:\n")
+                        for i, item in enumerate(file_config):
+                            self.preview_text.insert(tk.END, f"  配置项 {i+1}: {item}\n")
+                        # 将列表数据存储到config_data中
+                        self.config_data[file_path.stem] = file_config
+                    else:
+                        # 原有的字典处理逻辑
+                        self.config_data.update(file_config)
+                        
+                        # 显示预览
+                        self.preview_text.insert(tk.END, f"找到 {len(file_config)} 个配置参数:\n")
+                        for key, value in file_config.items():
+                            self.preview_text.insert(tk.END, f"  {key}: {value}\n")
                 else:
                     self.preview_text.insert(tk.END, "未找到有效的配置数据\n")
                 
@@ -417,17 +429,38 @@ class ConfigManagerGUI:
             return config
         
         try:
-            # 检查是否有指定的工作表名称
-            sheet_name = None
-            if self.current_mapping and 'sheet_name' in self.current_mapping:
-                sheet_name = self.current_mapping['sheet_name']
-            
-            # 读取Excel文件
-            if sheet_name:
-                df = pd.read_excel(file_path, sheet_name=sheet_name)
+            # 检查是否为多工作表文件
+            if self.current_mapping and self.current_mapping.get('multi_sheet', False):
+                # 处理多工作表文件
+                sheet_names = self.current_mapping.get('sheet_names', [])
+                all_sheets_data = {}
+                
+                for sheet_name in sheet_names:
+                    try:
+                        df = pd.read_excel(file_path, sheet_name=sheet_name)
+                        all_sheets_data[sheet_name] = df
+                        print(f"成功读取工作表: {sheet_name}, 数据行数: {len(df)}")
+                    except Exception as e:
+                        print(f"读取工作表 {sheet_name} 时出错: {e}")
+                
+                # 对于关卡配置,需要特殊处理多工作表数据
+                if '关卡配置表' in file_path.name:
+                    config = self.parse_level_multi_sheet_data(all_sheets_data, file_path.name)
+                else:
+                    # 其他多工作表文件的处理逻辑
+                    config = self.parse_multi_sheet_data(all_sheets_data, file_path.name)
             else:
-                df = pd.read_excel(file_path)
-            config = self.parse_config_data(df, file_path.name)
+                # 处理单工作表文件
+                sheet_name = None
+                if self.current_mapping and 'sheet_name' in self.current_mapping:
+                    sheet_name = self.current_mapping['sheet_name']
+                
+                # 读取Excel文件
+                if sheet_name:
+                    df = pd.read_excel(file_path, sheet_name=sheet_name)
+                else:
+                    df = pd.read_excel(file_path)
+                config = self.parse_config_data(df, file_path.name)
             
         except Exception as e:
             print(f"读取Excel文件 {file_path.name} 时出错: {e}")
@@ -489,6 +522,103 @@ class ConfigManagerGUI:
         
         return config
     
+    def parse_level_multi_sheet_data(self, all_sheets_data, filename):
+        """解析关卡配置的多工作表数据"""
+        config = []
+        
+        try:
+            # 获取各个工作表的数据
+            basic_config = all_sheets_data.get('关卡基础配置')
+            wave_config = all_sheets_data.get('波次配置')
+            enemy_config = all_sheets_data.get('敌人配置')
+            enemy_mapping = all_sheets_data.get('敌人名称映射')
+            
+            if basic_config is None:
+                print("错误: 未找到关卡基础配置工作表")
+                return config
+            
+            # 创建敌人名称映射字典
+            enemy_name_map = {}
+            if enemy_mapping is not None:
+                for _, row in enemy_mapping.iterrows():
+                    if pd.notna(row['中文名称']) and pd.notna(row['英文ID']):
+                        enemy_name_map[row['中文名称']] = row['英文ID']
+            
+            # 处理每个关卡
+            for _, basic_row in basic_config.iterrows():
+                if pd.isna(basic_row['关卡ID']):
+                    continue
+                    
+                level_id = str(basic_row['关卡ID'])
+                level_data = {
+                    'levelId': level_id,
+                    'name': str(basic_row['关卡名称']) if pd.notna(basic_row['关卡名称']) else '',
+                    'scene': str(basic_row['场景']) if pd.notna(basic_row['场景']) else 'grassland',
+                    'description': str(basic_row['描述']) if pd.notna(basic_row['描述']) else '',
+                    'availableWeapons': str(basic_row['可用武器']).split(', ') if pd.notna(basic_row['可用武器']) else [],
+                    'timeLimit': 300,  # 默认值
+                    'difficulty': 'normal',  # 默认值
+                    'healthMultiplier': 1.0,  # 默认值
+                    'waves': []
+                }
+                
+                # 获取该关卡的波次配置
+                if wave_config is not None:
+                    level_waves = wave_config[wave_config['关卡ID'] == level_id]
+                    
+                    for _, wave_row in level_waves.iterrows():
+                        wave_id = int(wave_row['波次ID']) if pd.notna(wave_row['波次ID']) else 1
+                        
+                        # 获取该波次的敌人配置
+                        wave_enemies = []
+                        if enemy_config is not None:
+                            wave_enemy_data = enemy_config[
+                                (enemy_config['关卡ID'] == level_id) & 
+                                (enemy_config['波次ID'] == wave_id)
+                            ]
+                            
+                            for _, enemy_row in wave_enemy_data.iterrows():
+                                enemy_type = str(enemy_row['敌人类型']) if pd.notna(enemy_row['敌人类型']) else '普通僵尸'
+                                # 使用映射表转换敌人名称
+                                enemy_id = enemy_name_map.get(enemy_type, enemy_type)
+                                
+                                enemy_data = {
+                                    'enemyType': enemy_id,
+                                    'count': int(enemy_row['数量']) if pd.notna(enemy_row['数量']) else 1,
+                                    'spawnInterval': float(enemy_row['生成间隔']) if pd.notna(enemy_row['生成间隔']) else 2.0,
+                                    'spawnDelay': float(enemy_row['生成延迟']) if pd.notna(enemy_row['生成延迟']) else 0.0,
+                                    'characteristics': str(enemy_row['特性']) if pd.notna(enemy_row['特性']) else ''
+                                }
+                                wave_enemies.append(enemy_data)
+                        
+                        wave_data = {
+                            'waveId': wave_id,
+                            'enemies': wave_enemies
+                        }
+                        level_data['waves'].append(wave_data)
+                
+                config.append(level_data)
+                print(f"处理关卡: {level_id}, 波次数: {len(level_data['waves'])}")
+            
+            print(f"成功解析关卡配置,共 {len(config)} 个关卡")
+            
+        except Exception as e:
+            print(f"解析关卡多工作表数据时出错: {e}")
+            import traceback
+            traceback.print_exc()
+        
+        return config
+    
+    def parse_multi_sheet_data(self, all_sheets_data, filename):
+        """解析通用多工作表数据"""
+        # 这里可以添加其他多工作表文件的处理逻辑
+        # 目前只返回第一个工作表的数据
+        if all_sheets_data:
+            first_sheet_name = list(all_sheets_data.keys())[0]
+            first_sheet_data = all_sheets_data[first_sheet_name]
+            return self.parse_config_data(first_sheet_data, filename)
+        return []
+    
     def parse_config_data(self, df, filename):
         """解析配置数据(支持多种格式,需要pandas)"""
         config = {}
@@ -736,21 +866,89 @@ class ConfigManagerGUI:
         print(f"横向表格配置导入开始...")
         print(f"配置数据结构: {list(self.config_data.keys()) if self.config_data else 'None'}")
         
-        if 'items' not in self.config_data:
-            print(f"错误: 配置数据中缺少'items'字段")
-            print(f"实际配置数据: {self.config_data}")
-            messagebox.showwarning("警告", "横向表格数据格式错误:缺少'items'字段")
-            return
+        # 检查是否是关卡配置(目录类型)
+        is_level_config = str(self.json_config_path).endswith('levels')
         
-        items = self.config_data['items']
-        print(f"配置项数量: {len(items) if items else 0}")
-        if not items:
-            messagebox.showwarning("警告", "没有有效的配置项")
-            return
+        # 对于关卡配置,支持多种数据格式
+        if is_level_config:
+            if isinstance(self.config_data, list):
+                # 多工作表数据格式:直接是关卡数据列表
+                print("检测到关卡配置的多工作表数据格式")
+                items = None  # 不需要items字段
+            elif 'items' in self.config_data:
+                # 传统的items数据格式
+                print("检测到关卡配置的传统items数据格式")
+                items = self.config_data['items']
+            elif isinstance(self.config_data, dict) and len(self.config_data) == 1:
+                # 检查是否是包装在单个键中的配置数据
+                key = list(self.config_data.keys())[0]
+                wrapped_data = self.config_data[key]
+                print(f"检测到包装的关卡配置数据,键名: {key}")
+                if isinstance(wrapped_data, list):
+                    print("提取到关卡配置的多工作表数据格式")
+                    self.config_data = wrapped_data  # 更新配置数据为实际内容
+                    items = None
+                elif isinstance(wrapped_data, dict) and 'items' in wrapped_data:
+                    print("提取到关卡配置的传统items数据格式")
+                    self.config_data = wrapped_data
+                    items = wrapped_data['items']
+                else:
+                    print(f"错误: 包装数据格式不正确: {type(wrapped_data)}")
+                    error_msg = f"关卡配置数据格式错误:包装数据不是列表或包含items的字典\n\n包装键: {key}\n数据类型: {type(wrapped_data)}"
+                    messagebox.showwarning("警告", error_msg)
+                    self.preview_text.insert(tk.END, f"\n=== 错误信息 ===\n")
+                    self.preview_text.insert(tk.END, f"关卡配置数据格式错误:包装数据不是列表或包含items的字典\n")
+                    self.preview_text.insert(tk.END, f"包装键: {key}\n数据类型: {type(wrapped_data)}\n")
+                    return
+            else:
+                print(f"错误: 关卡配置数据格式不正确")
+                print(f"实际配置数据: {self.config_data}")
+                print(f"配置数据类型: {type(self.config_data)}")
+                print(f"配置数据键: {list(self.config_data.keys()) if isinstance(self.config_data, dict) else 'Not a dict'}")
+                error_msg = f"关卡配置数据格式错误:需要多工作表数据或items字段\n\n数据类型: {type(self.config_data)}\n数据内容: {str(self.config_data)[:200]}..."
+                messagebox.showwarning("警告", error_msg)
+                # 同时在GUI中显示错误信息
+                self.preview_text.insert(tk.END, f"\n=== 错误信息 ===\n")
+                self.preview_text.insert(tk.END, f"关卡配置数据格式错误:需要多工作表数据或items字段\n")
+                self.preview_text.insert(tk.END, f"数据类型: {type(self.config_data)}\n")
+                self.preview_text.insert(tk.END, f"数据内容: {str(self.config_data)[:500]}...\n")
+                return
+        else:
+            # 其他配置类型必须有items字段
+            if 'items' not in self.config_data:
+                print(f"错误: 配置数据中缺少'items'字段")
+                print(f"实际配置数据: {self.config_data}")
+                print(f"配置数据类型: {type(self.config_data)}")
+                print(f"配置数据键: {list(self.config_data.keys()) if isinstance(self.config_data, dict) else 'Not a dict'}")
+                error_msg = f"横向表格数据格式错误:缺少'items'字段\n\n数据类型: {type(self.config_data)}\n可用键: {list(self.config_data.keys()) if isinstance(self.config_data, dict) else 'Not a dict'}"
+                messagebox.showwarning("警告", error_msg)
+                # 同时在GUI中显示错误信息
+                self.preview_text.insert(tk.END, f"\n=== 错误信息 ===\n")
+                self.preview_text.insert(tk.END, f"横向表格数据格式错误:缺少'items'字段\n")
+                self.preview_text.insert(tk.END, f"数据类型: {type(self.config_data)}\n")
+                self.preview_text.insert(tk.END, f"可用键: {list(self.config_data.keys()) if isinstance(self.config_data, dict) else 'Not a dict'}\n")
+                return
+            items = self.config_data['items']
+        
+        # 验证数据有效性
+        if items is not None:
+            print(f"配置项数量: {len(items) if items else 0}")
+            if not items:
+                messagebox.showwarning("警告", "没有有效的配置项")
+                return
+        elif isinstance(self.config_data, list):
+            print(f"关卡配置数量: {len(self.config_data)}")
+            if not self.config_data:
+                messagebox.showwarning("警告", "没有有效的关卡配置")
+                return
         
         # 打印前几个配置项用于调试
-        for i, item in enumerate(items[:3]):
-            print(f"配置项{i}: {item}")
+        if items is not None:
+            for i, item in enumerate(items[:3]):
+                print(f"配置项{i}: {item}")
+        elif isinstance(self.config_data, list):
+            for i, item in enumerate(self.config_data[:3]):
+                print(f"关卡配置{i}: {item.get('levelId', 'Unknown')} - {item.get('name', 'Unknown')}")
         
         # 读取现有JSON配置
         print(f"JSON配置文件路径: {self.json_config_path}")
@@ -866,15 +1064,32 @@ class ConfigManagerGUI:
                     messagebox.showerror("错误", f"没有写入权限到目录: {levels_dir}\n请检查目录权限或以管理员身份运行")
                     return
                 
-                # 将Excel数据转换为JSON格式并保存为单独文件
+                # 检查数据格式:多工作表数据 vs 传统items数据
+                if isinstance(self.config_data, list):
+                    # 新的多工作表数据格式:直接是关卡数据列表
+                    print("使用多工作表数据格式")
+                    level_configs = self.config_data
+                elif 'items' in self.config_data:
+                    # 传统的items数据格式:需要转换
+                    print("使用传统items数据格式")
+                    level_configs = []
+                    for item in items:
+                        level_data = self._convert_level_data(item)
+                        if level_data:
+                            level_configs.append(level_data)
+                else:
+                    print(f"错误: 未知的关卡配置数据格式: {type(self.config_data)}")
+                    messagebox.showerror("错误", "关卡配置数据格式错误")
+                    return
+                
+                # 保存关卡配置文件
                 updated_count = 0
                 failed_count = 0
                 
-                for item in items:
+                for level_data in level_configs:
                     try:
-                        level_data = self._convert_level_data(item)
-                        if level_data and '关卡ID' in item and item['关卡ID']:
-                            level_id = item['关卡ID']
+                        if level_data and 'levelId' in level_data and level_data['levelId']:
+                            level_id = level_data['levelId']
                             level_file = levels_dir / f"{level_id}.json"
                             
                             print(f"保存关卡配置: {level_file}")
@@ -882,7 +1097,7 @@ class ConfigManagerGUI:
                                 json.dump(level_data, f, indent=2, ensure_ascii=False)
                             updated_count += 1
                         else:
-                            print(f"跳过无效的关卡数据: {item}")
+                            print(f"跳过无效的关卡数据: {level_data}")
                             failed_count += 1
                     except Exception as e:
                         print(f"保存关卡配置时出错: {e}")
@@ -1028,24 +1243,61 @@ class ConfigManagerGUI:
     def _convert_level_data(self, item):
         """转换关卡数据格式"""
         try:
+            # 如果item已经是完整的关卡数据结构(来自多工作表解析),直接返回
+            if isinstance(item, dict) and 'waves' in item:
+                return item
+            
+            # 处理传统的单行数据格式
             # 处理可用武器字符串,转换为数组
             available_weapons = []
             if '可用武器' in item and item['可用武器']:
                 weapons_str = str(item['可用武器'])
                 available_weapons = [weapon.strip() for weapon in weapons_str.split(',')]
             
-            return {
-                "levelId": str(item.get('关卡ID', '')),
-                "name": str(item.get('关卡名称', '')),
-                "scene": str(item.get('场景', '')),
-                "description": str(item.get('描述', '')),
-                "weapons": available_weapons,
-                "timeLimit": int(item.get('时间限制', 300)),
-                "difficulty": str(item.get('难度', 'normal')),
-                "healthMultiplier": float(item.get('生命倍数', 1.0)),
-                "coinReward": int(item.get('金币奖励', 0)),
-                "diamondReward": int(item.get('钻石奖励', 0))
+            # 获取关卡ID,用于读取现有配置
+            level_id = str(item.get('关卡ID', ''))
+            
+            # 尝试读取现有的关卡配置文件,保留waves数据
+            existing_waves = []
+            existing_data = {}
+            if level_id:
+                try:
+                    levels_dir = self.project_root / "assets/resources/data/levels"
+                    level_file = levels_dir / f"{level_id}.json"
+                    if level_file.exists():
+                        with open(level_file, 'r', encoding='utf-8') as f:
+                            existing_data = json.load(f)
+                            existing_waves = existing_data.get('waves', [])
+                            print(f"保留现有关卡 {level_id} 的 {len(existing_waves)} 个波次数据")
+                except Exception as e:
+                    print(f"读取现有关卡配置时出错: {e}")
+            
+            # 构建新的关卡数据,保留现有的waves
+            level_data = {
+                "levelId": level_id,
+                "name": str(item.get('关卡名称', existing_data.get('name', ''))),
+                "scene": str(item.get('场景', existing_data.get('scene', ''))),
+                "description": str(item.get('描述', existing_data.get('description', ''))),
+                "weapons": available_weapons if available_weapons else existing_data.get('weapons', existing_data.get('availableWeapons', [])),
+                "timeLimit": int(item.get('时间限制', existing_data.get('timeLimit', 300))),
+                "difficulty": str(item.get('难度', existing_data.get('difficulty', 'normal'))),
+                "healthMultiplier": float(item.get('生命倍数', existing_data.get('healthMultiplier', 1.0))),
+                "waves": existing_waves  # 保留现有的waves数据
             }
+            
+            # 添加可选字段(如果存在)
+            if '金币奖励' in item:
+                level_data["coinReward"] = int(item.get('金币奖励', 0))
+            elif 'coinReward' in existing_data:
+                level_data["coinReward"] = existing_data['coinReward']
+                
+            if '钻石奖励' in item:
+                level_data["diamondReward"] = int(item.get('钻石奖励', 0))
+            elif 'diamondReward' in existing_data:
+                level_data["diamondReward"] = existing_data['diamondReward']
+            
+            return level_data
+            
         except Exception as e:
             print(f"转换关卡数据时出错: {e}")
             return None

+ 12 - 0
assets/resources/data/excel/关卡配置/~$关卡配置表_完整版_更新_v2.xlsx.meta

@@ -0,0 +1,12 @@
+{
+  "ver": "1.0.0",
+  "importer": "*",
+  "imported": true,
+  "uuid": "2579fc27-3acf-437a-befb-0771c5203678",
+  "files": [
+    ".json",
+    ".xlsx"
+  ],
+  "subMetas": {},
+  "userData": {}
+}

BIN
assets/resources/data/excel/关卡配置/关卡配置表_完整版_更新_v2.xlsx


BIN
assets/resources/data/excel/方块武器配置/方块武器配置表_更新_v2.xlsx


+ 125 - 0
assets/resources/data/excel/更新说明.md

@@ -0,0 +1,125 @@
+# Excel配置表更新说明
+
+## 概述
+
+根据最新的JSON配置文件,已成功更新了以下Excel配置表:
+
+1. **方块武器配置表_更新.xlsx** - 基于 `weapons.json` 的最新武器配置
+2. **关卡配置表_完整版_更新.xlsx** - 基于 `levels/` 目录下所有关卡JSON文件的配置
+
+## 更新内容详情
+
+### 1. 方块武器配置表更新
+
+**文件位置**: `d:/CocosGame/Pong/assets/resources/data/excel/方块武器配置/方块武器配置表_更新_v2.xlsx`
+
+**包含工作表**:
+
+#### 武器基础配置
+- **ID**: 武器唯一标识符
+- **名称**: 武器显示名称
+- **类型**: 武器类型(single_shot, piercing, explosive等)
+- **稀有度**: 武器稀有度(common, uncommon, rare, epic)
+- **权重**: 武器在随机生成中的权重
+- **伤害**: 基础伤害值
+- **射速**: 射击频率
+- **射程**: 武器射程
+- **子弹速度**: 子弹飞行速度
+
+
+#### 子弹配置
+- **武器ID/名称**: 对应的武器信息
+- **子弹数量类型**: single, spread, burst
+- **子弹数量**: 每次射击的子弹数量
+- **散射角度**: 多发子弹的散射角度
+- **连发数量**: 连发模式下的子弹数量
+- **连发延迟**: 连发间隔时间
+- **轨迹类型**: straight, arc, homing等
+- **轨迹速度**: 子弹轨迹速度
+- **重力**: 重力影响
+- **生命周期类型**: 子弹消失条件
+- **最大生存时间**: 子弹最大存在时间
+- **穿透次数**: 可穿透敌人数量
+- **反弹次数**: 可反弹次数
+- **是否返回原点**: 回旋镖类型武器
+
+#### 方块形状配置
+- **ID**: 形状标识符
+- **名称**: 形状名称
+- **形状矩阵**: 4x4矩阵表示的方块形状
+
+#### 稀有度权重
+- **稀有度**: 稀有度等级
+- **权重**: 对应的权重值
+
+### 2. 关卡配置表更新
+
+**文件位置**: `d:/CocosGame/Pong/assets/resources/data/excel/关卡配置/关卡配置表_完整版_更新_v2.xlsx`
+
+**包含工作表**:
+
+#### 关卡基础配置
+- **关卡ID**: 关卡标识符(Level1, Level2等)
+- **关卡名称**: 关卡显示名称
+- **场景**: 关卡场景类型
+- **描述**: 关卡描述信息
+- **可用武器**: 该关卡可使用的武器列表
+- **初始生命**: 玩家初始生命值
+- **时间限制**: 关卡时间限制(秒)
+- **难度**: 关卡难度等级
+
+#### 波次配置
+- **关卡ID**: 所属关卡
+- **波次ID**: 波次编号
+- **敌人种类数**: 该波次包含的敌人种类数量
+
+#### 敌人配置
+- **关卡ID**: 所属关卡
+- **波次ID**: 所属波次
+- **敌人类型**: 敌人类型名称
+- **数量**: 该类型敌人的数量
+- **生成间隔**: 敌人生成间隔时间
+- **生成延迟**: 该类型敌人开始生成的延迟时间
+- **特性**: 敌人特殊能力和特征
+
+## 主要更新特性
+
+### 关卡配置的重要改进
+
+1. **多敌人类型支持**: 每个波次现在可以配置多种不同类型的敌人,而不是之前的单一敌人类型
+
+2. **独立生成控制**: 每种敌人类型都有独立的:
+   - 数量控制
+   - 生成间隔
+   - 生成延迟
+   - 特性配置
+
+3. **策略深度增强**: 通过多敌人类型的组合,提供更丰富的游戏策略和挑战
+
+4. **武器配置优化**: 删除了无用的精度(accuracy)字段,简化配置结构
+
+### 武器配置的完整性
+
+1. **详细的子弹配置**: 包含完整的子弹行为参数
+2. **视觉效果配置**: 包含特效和音效配置
+3. **方块形状系统**: 完整的俄罗斯方块形状配置
+4. **稀有度系统**: 平衡的稀有度权重分配
+
+## 使用建议
+
+1. **备份原文件**: 在使用新配置前,建议备份原有的Excel文件
+2. **逐步测试**: 建议先在测试环境中验证新配置的正确性
+3. **平衡性调整**: 根据实际游戏体验,可能需要调整数值平衡
+4. **版本控制**: 建议将配置文件纳入版本控制系统
+
+## 技术说明
+
+- 更新脚本: `update_excel_from_json.py`
+- 数据源: `weapons.json` 和 `levels/` 目录下的JSON文件
+- 生成工具: Python pandas + openpyxl
+- 编码格式: UTF-8
+
+## 后续维护
+
+当JSON配置文件发生变化时,可以重新运行 `update_excel_from_json.py` 脚本来更新Excel文件,确保配置的一致性。
+

+ 11 - 0
assets/resources/data/excel/更新说明.md.meta

@@ -0,0 +1,11 @@
+{
+  "ver": "1.0.1",
+  "importer": "text",
+  "imported": true,
+  "uuid": "251ca7b8-e7b7-4ec9-911e-5e4af8593ee0",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {}
+}

+ 47 - 4
assets/resources/data/levels/Level1.json

@@ -1,15 +1,58 @@
 {
   "levelId": "Level1",
-  "name": "新手关卡(草地平原)",
+  "name": "新手引导(草地平原)",
   "scene": "grassland",
   "description": "新手引导关卡,学习基础塔防玩法",
-  "weapons": [
+  "availableWeapons": [
     "毛豆射手",
     "尖胡萝卜"
   ],
   "timeLimit": 300,
   "difficulty": "normal",
   "healthMultiplier": 1.0,
-  "coinReward": 0,
-  "diamondReward": 0
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 8,
+          "spawnInterval": 3.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 10,
+          "spawnInterval": 2.5,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 6,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 3,
+          "spawnInterval": 8.0,
+          "spawnDelay": 12.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    }
+  ]
 }

+ 53 - 3
assets/resources/data/levels/Level2.json

@@ -3,7 +3,7 @@
   "name": "丛林探险(森林场景)",
   "scene": "forest",
   "description": "森林场景的塔防挑战,引入新的敌人类型和武器组合",
-  "weapons": [
+  "availableWeapons": [
     "锯齿草",
     "西瓜炸弹",
     "毛豆射手"
@@ -11,6 +11,56 @@
   "timeLimit": 300,
   "difficulty": "normal",
   "healthMultiplier": 1.0,
-  "coinReward": 0,
-  "diamondReward": 0
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 10,
+          "spawnInterval": 2.8,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 8,
+          "spawnInterval": 2.2,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 4,
+          "spawnInterval": 7.0,
+          "spawnDelay": 10.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 12,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 5,
+          "spawnInterval": 6.0,
+          "spawnDelay": 15.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    }
+  ]
 }

+ 74 - 3
assets/resources/data/levels/Level3.json

@@ -3,7 +3,7 @@
   "name": "魔法废墟(魔幻场景)",
   "scene": "magic_ruins",
   "description": "魔幻场景的塔防挑战,引入远程攻击敌人和隐身机制",
-  "weapons": [
+  "availableWeapons": [
     "回旋镖盆栽",
     "炙热辣椒",
     "尖胡萝卜"
@@ -11,6 +11,77 @@
   "timeLimit": 300,
   "difficulty": "normal",
   "healthMultiplier": 1.0,
-  "coinReward": 0,
-  "diamondReward": 0
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 12,
+          "spawnInterval": 2.5,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 3,
+          "spawnInterval": 8.0,
+          "spawnDelay": 15.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 10,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 4,
+          "spawnInterval": 6.0,
+          "spawnDelay": 8.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 4,
+          "spawnInterval": 7.0,
+          "spawnDelay": 20.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 8,
+          "spawnInterval": 1.8,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 6,
+          "spawnInterval": 5.0,
+          "spawnDelay": 10.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 5,
+          "spawnInterval": 6.0,
+          "spawnDelay": 25.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        }
+      ]
+    }
+  ]
 }

+ 74 - 3
assets/resources/data/levels/Level4.json

@@ -3,7 +3,7 @@
   "name": "钢铁堡垒(工业场景)",
   "scene": "industrial",
   "description": "工业场景的高难度挑战,引入BOSS战和超高防御敌人",
-  "weapons": [
+  "availableWeapons": [
     "仙人散弹",
     "秋葵导弹",
     "西瓜炸弹"
@@ -11,6 +11,77 @@
   "timeLimit": 300,
   "difficulty": "normal",
   "healthMultiplier": 1.0,
-  "coinReward": 0,
-  "diamondReward": 0
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 15,
+          "spawnInterval": 2.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 3,
+          "spawnInterval": 10.0,
+          "spawnDelay": 20.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 8,
+          "spawnInterval": 4.0,
+          "spawnDelay": 0.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 5,
+          "spawnInterval": 6.0,
+          "spawnDelay": 15.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 4,
+          "spawnInterval": 8.0,
+          "spawnDelay": 25.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 10,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 6,
+          "spawnInterval": 3.5,
+          "spawnDelay": 8.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 5,
+          "spawnInterval": 7.0,
+          "spawnDelay": 20.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    }
+  ]
 }

+ 74 - 3
assets/resources/data/levels/Level5.json

@@ -3,7 +3,7 @@
   "name": "终极挑战(赛博都市)",
   "scene": "cyberpunk",
   "description": "终极挑战关卡,包含多个BOSS和复杂的敌人组合",
-  "weapons": [
+  "availableWeapons": [
     "毛豆射手",
     "尖胡萝卜",
     "锯齿草",
@@ -16,6 +16,77 @@
   "timeLimit": 300,
   "difficulty": "normal",
   "healthMultiplier": 1.0,
-  "coinReward": 0,
-  "diamondReward": 0
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 20,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 8,
+          "spawnInterval": 3.0,
+          "spawnDelay": 10.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "mage_zombie",
+          "count": 8,
+          "spawnInterval": 4.0,
+          "spawnDelay": 0.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 6,
+          "spawnInterval": 6.0,
+          "spawnDelay": 15.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 15,
+          "spawnInterval": 1.2,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 10,
+          "spawnInterval": 2.5,
+          "spawnDelay": 8.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 8,
+          "spawnInterval": 3.5,
+          "spawnDelay": 20.0,
+          "characteristics": "远程魔法攻击, 中等生命"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 6,
+          "spawnInterval": 5.0,
+          "spawnDelay": 30.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    }
+  ]
 }

+ 74 - 3
assets/resources/data/levels/Level6.json

@@ -3,7 +3,7 @@
   "name": "沙漠绿洲(沙漠场景)",
   "scene": "desert",
   "description": "沙漠场景的挑战,炎热环境下的生存战斗",
-  "weapons": [
+  "availableWeapons": [
     "毛豆射手",
     "尖胡萝卜",
     "锯齿草",
@@ -14,6 +14,77 @@
   "timeLimit": 300,
   "difficulty": "normal",
   "healthMultiplier": 1.0,
-  "coinReward": 0,
-  "diamondReward": 0
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 18,
+          "spawnInterval": 1.8,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 4,
+          "spawnInterval": 6.0,
+          "spawnDelay": 12.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 15,
+          "spawnInterval": 1.5,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 5,
+          "spawnInterval": 5.0,
+          "spawnDelay": 8.0,
+          "characteristics": "远程魔法子弹攻击防御塔"
+        },
+        {
+          "enemyType": "archer_zombie",
+          "count": 3,
+          "spawnInterval": 8.0,
+          "spawnDelay": 15.0,
+          "characteristics": "远程弓箭攻击"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 20,
+          "spawnInterval": 1.2,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "stealth_zombie",
+          "count": 4,
+          "spawnInterval": 10.0,
+          "spawnDelay": 20.0,
+          "characteristics": "隐身能力, 快速移动"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 6,
+          "spawnInterval": 4.0,
+          "spawnDelay": 25.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    }
+  ]
 }

+ 86 - 3
assets/resources/data/levels/Level7.json

@@ -3,7 +3,7 @@
   "name": "冰雪王国(冰雪场景)",
   "scene": "ice",
   "description": "冰雪场景的极地挑战,寒冷环境下的防御战",
-  "weapons": [
+  "availableWeapons": [
     "毛豆射手",
     "尖胡萝卜",
     "锯齿草",
@@ -15,6 +15,89 @@
   "timeLimit": 300,
   "difficulty": "normal",
   "healthMultiplier": 1.0,
-  "coinReward": 0,
-  "diamondReward": 0
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 22,
+          "spawnInterval": 1.6,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 8,
+          "spawnInterval": 4.0,
+          "spawnDelay": 10.0,
+          "characteristics": "高生命, 慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 18,
+          "spawnInterval": 1.4,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "archer_zombie",
+          "count": 6,
+          "spawnInterval": 6.0,
+          "spawnDelay": 12.0,
+          "characteristics": "远程弓箭攻击"
+        },
+        {
+          "enemyType": "barrel_zombie",
+          "count": 3,
+          "spawnInterval": 12.0,
+          "spawnDelay": 20.0,
+          "characteristics": "爆炸伤害, 自爆攻击"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 25,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 8,
+          "spawnInterval": 3.0,
+          "spawnDelay": 15.0,
+          "characteristics": "超高生命, 极慢速移动"
+        },
+        {
+          "enemyType": "stealth_zombie",
+          "count": 5,
+          "spawnInterval": 8.0,
+          "spawnDelay": 25.0,
+          "characteristics": "隐身能力, 快速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 4,
+      "enemies": [
+        {
+          "enemyType": "boss1_gatekeeper",
+          "count": 1,
+          "spawnInterval": 0.0,
+          "spawnDelay": 30.0,
+          "characteristics": "超高生命, 多种攻击方式, 召唤小怪"
+        }
+      ]
+    }
+  ]
 }

+ 107 - 3
assets/resources/data/levels/Level8.json

@@ -3,7 +3,7 @@
   "name": "火山熔岩(火山场景)",
   "scene": "volcano",
   "description": "火山场景的极限挑战,熔岩环境下的终极考验",
-  "weapons": [
+  "availableWeapons": [
     "毛豆射手",
     "尖胡萝卜",
     "锯齿草",
@@ -16,6 +16,110 @@
   "timeLimit": 300,
   "difficulty": "normal",
   "healthMultiplier": 1.0,
-  "coinReward": 0,
-  "diamondReward": 0
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 30,
+          "spawnInterval": 1.2,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 10,
+          "spawnInterval": 3.0,
+          "spawnDelay": 8.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "wandering_zombie",
+          "count": 6,
+          "spawnInterval": 5.0,
+          "spawnDelay": 15.0,
+          "characteristics": "左右摇摆, 近战范围大"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 25,
+          "spawnInterval": 1.0,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 8,
+          "spawnInterval": 4.0,
+          "spawnDelay": 10.0,
+          "characteristics": "远程魔法子弹攻击防御塔"
+        },
+        {
+          "enemyType": "archer_zombie",
+          "count": 6,
+          "spawnInterval": 6.0,
+          "spawnDelay": 18.0,
+          "characteristics": "远程弓箭攻击"
+        },
+        {
+          "enemyType": "barrel_zombie",
+          "count": 4,
+          "spawnInterval": 10.0,
+          "spawnDelay": 25.0,
+          "characteristics": "爆炸伤害, 自爆攻击"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 20,
+          "spawnInterval": 0.8,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 12,
+          "spawnInterval": 2.5,
+          "spawnDelay": 12.0,
+          "characteristics": "超高生命, 极慢速移动"
+        },
+        {
+          "enemyType": "stealth_zombie",
+          "count": 8,
+          "spawnInterval": 6.0,
+          "spawnDelay": 20.0,
+          "characteristics": "隐身能力, 快速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 4,
+      "enemies": [
+        {
+          "enemyType": "boss2_gravedigger",
+          "count": 1,
+          "spawnInterval": 0.0,
+          "spawnDelay": 30.0,
+          "characteristics": "超高生命, 范围攻击, 召唤增援"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 6,
+          "spawnInterval": 8.0,
+          "spawnDelay": 45.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    }
+  ]
 }

+ 126 - 3
assets/resources/data/levels/Level9.json

@@ -3,7 +3,7 @@
   "name": "终极试炼(终极场景)",
   "scene": "ultimate",
   "description": "终极试炼关卡,解锁最后的植物武器,面对最强挑战",
-  "weapons": [
+  "availableWeapons": [
     "毛豆射手",
     "尖胡萝卜",
     "锯齿草",
@@ -17,6 +17,129 @@
   "timeLimit": 300,
   "difficulty": "normal",
   "healthMultiplier": 1.0,
-  "coinReward": 0,
-  "diamondReward": 0
+  "waves": [
+    {
+      "waveId": 1,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 40,
+          "spawnInterval": 0.8,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "roadblock_zombie",
+          "count": 15,
+          "spawnInterval": 2.5,
+          "spawnDelay": 5.0,
+          "characteristics": "高生命, 慢速移动"
+        },
+        {
+          "enemyType": "wandering_zombie",
+          "count": 10,
+          "spawnInterval": 4.0,
+          "spawnDelay": 12.0,
+          "characteristics": "左右摇摆, 近战范围大"
+        }
+      ]
+    },
+    {
+      "waveId": 2,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 35,
+          "spawnInterval": 0.6,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "mage_zombie",
+          "count": 12,
+          "spawnInterval": 3.0,
+          "spawnDelay": 8.0,
+          "characteristics": "远程魔法子弹攻击防御塔"
+        },
+        {
+          "enemyType": "archer_zombie",
+          "count": 10,
+          "spawnInterval": 4.0,
+          "spawnDelay": 15.0,
+          "characteristics": "远程弓箭攻击"
+        },
+        {
+          "enemyType": "barrel_zombie",
+          "count": 6,
+          "spawnInterval": 8.0,
+          "spawnDelay": 22.0,
+          "characteristics": "爆炸伤害, 自爆攻击"
+        }
+      ]
+    },
+    {
+      "waveId": 3,
+      "enemies": [
+        {
+          "enemyType": "normal_zombie",
+          "count": 30,
+          "spawnInterval": 0.5,
+          "spawnDelay": 0.0,
+          "characteristics": "中速移动, 无技能"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 15,
+          "spawnInterval": 2.0,
+          "spawnDelay": 10.0,
+          "characteristics": "超高生命, 极慢速移动"
+        },
+        {
+          "enemyType": "stealth_zombie",
+          "count": 12,
+          "spawnInterval": 4.0,
+          "spawnDelay": 18.0,
+          "characteristics": "隐身能力, 快速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 4,
+      "enemies": [
+        {
+          "enemyType": "boss1_gatekeeper",
+          "count": 1,
+          "spawnInterval": 0.0,
+          "spawnDelay": 25.0,
+          "characteristics": "超高生命, 多种攻击方式, 召唤小怪"
+        },
+        {
+          "enemyType": "boss2_gravedigger",
+          "count": 1,
+          "spawnInterval": 0.0,
+          "spawnDelay": 60.0,
+          "characteristics": "超高生命, 范围攻击, 召唤增援"
+        },
+        {
+          "enemyType": "bucket_zombie",
+          "count": 10,
+          "spawnInterval": 6.0,
+          "spawnDelay": 40.0,
+          "characteristics": "超高生命, 极慢速移动"
+        }
+      ]
+    },
+    {
+      "waveId": 5,
+      "enemies": [
+        {
+          "enemyType": "终极BOSS",
+          "count": 1,
+          "spawnInterval": 0.0,
+          "spawnDelay": 30.0,
+          "characteristics": "极高生命, 全屏攻击, 无敌阶段, 召唤军团"
+        }
+      ]
+    }
+  ]
 }

+ 0 - 1
assets/scripts/LevelSystem/LevelConfigManager.ts

@@ -193,7 +193,6 @@ export class LevelConfigManager extends Component {
                 weapons: weapons,
                 waves: [],
                 levelSettings: {
-                    initialHealth: jsonData.initialHealth,
                     timeLimit: jsonData.timeLimit,
                     difficulty: jsonData.difficulty,
                     healthMultiplier: jsonData.healthMultiplier,