Files
pixelheros/assets/script/game/map/RogueConfig.ts
walkpan eb1f19d14b refactor: 移除 BossList 并重构 boss 检测逻辑
移除 RogueConfig 中已弃用的 BossList 常量,改为直接使用 MonList 中的分类来检测 boss 类型。这消除了冗余的配置数据,使 boss 类型的判断逻辑与 MonList 的维护来源保持一致,提高了代码的可维护性。
2026-04-04 09:41:03 +08:00

89 lines
3.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export enum UpType {
AP1_HP1 = 0, //平衡
HP2 = 1, //强hp
AP2 = 2 //强ap
}
// 普通关卡成长值:第一项为攻击力成长,第二项为血量成长
export const StageGrow = {
[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], // 平衡型攻3 血16
[UpType.HP2]: [1,24], // 强HP型攻1 血24
[UpType.AP2]: [10,4], // 强AP型攻10 血4
}
export const MonType = {
Melee: 0, // 近战高功
Long: 1, // 高速贴近
Support: 2, // 支持怪
MeleeBoss: 3, // boss怪
LongBoss: 4, // boss怪
}
export const MonList = {
[MonType.Melee]: [6001,6002,6003], // 近战怪
[MonType.Long]: [6004,6005], // 远程怪
[MonType.Support]: [6005], // 辅助怪
[MonType.MeleeBoss]:[6006,6015], // 近战boss
[MonType.LongBoss]:[6104], // 远程boss
}
/*
*** 全局刷怪强度配置,后期根据玩家强度动态调整
*/
export const SpawnPowerBias = 1
export interface IWaveSlot {
type: number; // 对应 MonType
count: number; // 占位数量
slotsPerMon?: number; // 每个怪占用几个位置,默认 1
monCount: number; // 这个占位排队的怪物总数(每个坑位要刷多少个怪)
}
// =========================================================================================
// 【每波怪物占位与刷怪配置说明】
// 1. 数组顺序:数组中的元素顺序即为战场上怪物从左到右占位的物理顺序。
// 2. 字段说明:
// - type: 怪物类型 (参考 MonType如近战 0远程 1Boss 3 等)。
// - count: 该类型在场上同时存在几个并排的占位坑。
// - monCount: 每个占位坑需要刷出的怪物总数(即每个坑排队的怪物数量)。当场上该坑位的怪死亡后,排队的下一只才会生成。
// - slotsPerMon: (可选) 单个怪物体积占用几个占位坑,默认为 1。如果是大型 Boss 可设为 2 或更多,它会跨占位降落。
//
// 举例:
// { type: MonType.Melee, count: 2, monCount: 3 }
// 表示:在对应的位置开启 2 个近战占位坑,每个坑要排队刷出 3 只怪,总计该行配置会刷出 6 只近战怪。
//
// 【注意】:波次怪物的总数将由所有坑位的 count * monCount 自动累加计算得出。
// =========================================================================================
export const WaveSlotConfig: { [wave: number]: IWaveSlot[] } = {
1: [
{ type: MonType.Melee, count: 2, monCount: 3 },
{ type: MonType.Long, count: 2, monCount: 2 }
],
2: [
{ type: MonType.Melee, count: 2, monCount: 4 },
{ type: MonType.Long, count: 2, monCount: 3 },
{ type: MonType.Support, count: 1, monCount: 2 }
],
3: [
{ type: MonType.Melee, count: 1, monCount: 5 },
{ type: MonType.MeleeBoss, count: 1, slotsPerMon: 2, monCount: 1 },
{ type: MonType.Long, count: 2, monCount: 4 }
],
4: [
{ type: MonType.Melee, count: 1, monCount: 5 },
{ type: MonType.Long, count: 1, monCount: 5 },
{ type: MonType.LongBoss, count: 1, slotsPerMon: 2, monCount: 1 }
],
}
// 默认占位配置 (如果在 WaveSlotConfig 中找不到波次,则使用此配置)
export const DefaultWaveSlot: IWaveSlot[] = [
{ type: MonType.Melee, count: 2, monCount: 3 },
{ type: MonType.Long, count: 3, monCount: 3 }
]