refactor(game): 重构怪物波次生成逻辑,移除排队机制
- 移除 IWaveSlot 中的 monCount 字段,改为固定 6 个槽位 - Boss 现在固定占用 2 个槽位且只能放置在 1、3、5 号位 - 每波开始时立即生成所有怪物,不再支持死亡后排队刷怪 - 简化 MissionMonComp 中的槽位管理逻辑,移除 slotSpawnQueues 等复杂结构
This commit is contained in:
@@ -40,49 +40,45 @@ export interface IWaveSlot {
|
||||
type: number; // 对应 MonType
|
||||
count: number; // 占位数量
|
||||
slotsPerMon?: number; // 每个怪占用几个位置,默认 1
|
||||
monCount: number; // 这个占位排队的怪物总数(每个坑位要刷多少个怪)
|
||||
}
|
||||
|
||||
// =========================================================================================
|
||||
// 【每波怪物占位与刷怪配置说明】
|
||||
// 1. 数组顺序:数组中的元素顺序即为战场上怪物从左到右占位的物理顺序。
|
||||
// 2. 字段说明:
|
||||
// 1. 字段说明:
|
||||
// - type: 怪物类型 (参考 MonType,如近战 0,远程 1,Boss 3 等)。
|
||||
// - count: 该类型在场上同时存在几个并排的占位坑。
|
||||
// - monCount: 每个占位坑需要刷出的怪物总数(即每个坑排队的怪物数量)。当场上该坑位的怪死亡后,排队的下一只才会生成。
|
||||
// - slotsPerMon: (可选) 单个怪物体积占用几个占位坑,默认为 1。如果是大型 Boss 可设为 2 或更多,它会跨占位降落。
|
||||
// - count: 该类型的怪在场上同时存在几个。
|
||||
// - slotsPerMon: (可选) 单个怪物体积占用几个占位坑,默认为 1。如果是大型 Boss 可设为 2,它会跨占位降落。
|
||||
//
|
||||
// 举例:
|
||||
// { type: MonType.Melee, count: 2, monCount: 3 }
|
||||
// 表示:在对应的位置开启 2 个近战占位坑,每个坑要排队刷出 3 只怪,总计该行配置会刷出 6 只近战怪。
|
||||
//
|
||||
// 【注意】:波次怪物的总数将由所有坑位的 count * monCount 自动累加计算得出。
|
||||
// 【注意】:
|
||||
// 全场固定 6 个槽位(索引 0-5)。
|
||||
// Boss 固定占用 2 个位置,且只能出现在 1、3、5 号位(对应索引 0, 2, 4)。
|
||||
// 每波怪物总槽位占用不能超过 6。不再支持排队刷怪。
|
||||
// =========================================================================================
|
||||
export const WaveSlotConfig: { [wave: number]: IWaveSlot[] } = {
|
||||
1: [
|
||||
{ type: MonType.Melee, count: 2, monCount: 3 },
|
||||
{ type: MonType.Long, count: 2, monCount: 2 }
|
||||
{ type: MonType.Melee, count: 3 },
|
||||
{ type: MonType.Long, count: 3 }
|
||||
],
|
||||
2: [
|
||||
{ type: MonType.Melee, count: 2, monCount: 4 },
|
||||
{ type: MonType.Long, count: 2, monCount: 3 },
|
||||
{ type: MonType.Support, count: 1, monCount: 2 }
|
||||
{ type: MonType.Melee, count: 2 },
|
||||
{ type: MonType.Long, count: 2 },
|
||||
{ type: MonType.Support, count: 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 }
|
||||
{ type: MonType.Melee, count: 2 },
|
||||
{ type: MonType.MeleeBoss, count: 1, slotsPerMon: 2 },
|
||||
{ type: MonType.Long, count: 2 }
|
||||
],
|
||||
4: [
|
||||
{ type: MonType.Melee, count: 1, monCount: 5 },
|
||||
{ type: MonType.Long, count: 1, monCount: 5 },
|
||||
{ type: MonType.LongBoss, count: 1, slotsPerMon: 2, monCount: 1 }
|
||||
{ type: MonType.Melee, count: 2 },
|
||||
{ type: MonType.Long, count: 2 },
|
||||
{ type: MonType.LongBoss, count: 1, slotsPerMon: 2 }
|
||||
],
|
||||
}
|
||||
|
||||
// 默认占位配置 (如果在 WaveSlotConfig 中找不到波次,则使用此配置)
|
||||
export const DefaultWaveSlot: IWaveSlot[] = [
|
||||
{ type: MonType.Melee, count: 2, monCount: 3 },
|
||||
{ type: MonType.Long, count: 3, monCount: 3 }
|
||||
{ type: MonType.Melee, count: 3 },
|
||||
{ type: MonType.Long, count: 3 }
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user