From 9fd893c6922d98844d64fd206d4ea2bda3213e53 Mon Sep 17 00:00:00 2001 From: panw Date: Fri, 3 Apr 2026 16:15:31 +0800 Subject: [PATCH] =?UTF-8?q?refactor(map):=20=E9=87=8D=E6=9E=84=E6=80=AA?= =?UTF-8?q?=E7=89=A9=E7=B1=BB=E5=9E=8B=E6=9E=9A=E4=B8=BE=E5=92=8C=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=BB=A5=E6=8F=90=E9=AB=98=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 MonType 枚举值重命名为更具描述性的名称(如 AP -> Melee) - 为 StageGrow 和 StageBossGrow 配置添加注释说明 - 更新 MissionMonComp 中的回退逻辑以使用新的 Melee 类型 - 清理未使用的配置常量(StageDuration、SpawnCd 等) - 扩展 BossList 包含更多Boss怪物ID --- assets/script/game/map/MissionMonComp.ts | 2 +- assets/script/game/map/RogueConfig.ts | 45 +++++++++++------------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/assets/script/game/map/MissionMonComp.ts b/assets/script/game/map/MissionMonComp.ts index aef21a13..b483021e 100644 --- a/assets/script/game/map/MissionMonComp.ts +++ b/assets/script/game/map/MissionMonComp.ts @@ -189,7 +189,7 @@ export class MissionMonCompComp extends CCComp { const typeKeys = Object.keys(MonType).map(k => (MonType as any)[k]).filter(v => typeof v === "number"); const randomType = typeKeys[Math.floor(Math.random() * typeKeys.length)] as number; // 如果某类型配置被清空,回退到 AP 类型,避免空池异常 - const pool = MonList[randomType] || MonList[MonType.AP]; + const pool = MonList[randomType] || MonList[MonType.Melee]; const index = Math.floor(Math.random() * pool.length); return pool[index]; } diff --git a/assets/script/game/map/RogueConfig.ts b/assets/script/game/map/RogueConfig.ts index c4bd4952..a03ad5ca 100644 --- a/assets/script/game/map/RogueConfig.ts +++ b/assets/script/game/map/RogueConfig.ts @@ -4,37 +4,34 @@ export enum UpType { HP2 = 1, //强hp AP2 = 2 //强ap } +// 普通关卡成长值:第一项为攻击力成长,第二项为血量成长 export const StageGrow = { - [UpType.AP1_HP1]: [4,10], - [UpType.HP2]: [2,20], - [UpType.AP2]: [8,0], + [UpType.AP1_HP1]: [4,10], // 平衡型:攻4 血10 + [UpType.HP2]: [2,20], // 强HP型:攻2 血20 + [UpType.AP2]: [8,0], // 强AP型:攻8 血0 } + +// Boss关卡成长值:同上,数值更高 export const StageBossGrow = { - [UpType.AP1_HP1]: [3,16], - [UpType.HP2]: [1,24], - [UpType.AP2]: [10,4], + [UpType.AP1_HP1]: [3,16], // 平衡型:攻3 血16 + [UpType.HP2]: [1,24], // 强HP型:攻1 血24 + [UpType.AP2]: [10,4], // 强AP型:攻10 血4 } + export const MonType = { - AP: 0, // 近战高功 - SPEED: 1, // 高速贴近 - HP: 2, // 高血皮厚 - RANGED: 3, // 射手 - MAGE: 4, // 远程魔法 - // + Melee: 0, // 近战高功 + Long: 1, // 高速贴近 + Support: 2, // 支持怪 + MeleeBoss: 3, // boss怪 + LongBoss: 4, // boss怪 } export const MonList = { - [MonType.AP]: [6001,6003], // 近战高功 - [MonType.SPEED]: [6002], // 高速贴近 - [MonType.HP]: [6002], // 高血皮厚 - [MonType.RANGED]: [6004], // 射手 - [MonType.MAGE]: [6005], // 远程魔法 - // + [MonType.Melee]: [6001,6003], // 近战高功 + [MonType.Long]: [6002], // 高速贴近 + [MonType.Support]: [6002], // 高血皮厚 + [MonType.MeleeBoss]:[6006,6104,6015], // 射手 + [MonType.LongBoss]:[6005], // 远程魔法 } -export const BossList = [6006] -export const StageDuration = 30 -export const SpawnBaseCd = 1.6 -export const SpawnMinCd = 0.5 -export const SpawnStageReduce = 0.08 -export const BossSpawnTimeline = [60, 120, 180, 240, 300] +export const BossList = [6006,6104,6015] export const SpawnPowerBias = 1