refactor: 重构无限关模式,移除章节概念,统一使用关卡-回合结构

This commit is contained in:
pan
2026-09-23 17:18:05 +08:00
parent 8f89dd11fa
commit 577a62193c
7 changed files with 56 additions and 85 deletions

View File

@@ -124,12 +124,11 @@ export class MissionMonCompComp extends CCComp {
start() { }
/**
* 小节开始事件回调:生成怪物列表并按节奏刷出
* 回合开始事件回调:生成怪物列表并按节奏刷出
* @param event 事件名
* @param data { chapter, stage, section }
* @param data { stage, section }
*/
private onSectionStart(event: string, data: any) {
const chapter = Number(data?.chapter ?? 1);
const stage = Number(data?.stage ?? 1);
const section = Number(data?.section ?? 1);
@@ -142,15 +141,15 @@ export class MissionMonCompComp extends CCComp {
smc.vmdata.mission_data.mon_num = 0;
smc.vmdata.mission_data.pending_mon_num = 0;
// 从生成引擎获取本小节怪物列表
const monsters = spawningEngine.generateSectionMonsters(chapter, stage, section);
// 从生成引擎获取本回合怪物列表
const monsters = spawningEngine.generateSectionMonsters(stage, section);
this.sectionTargetCount = monsters.length;
if (TestModeConfig.enable) {
mLogger.log(this.debugMode, 'MissionMonComp', "[MissionMonComp] 测试模式已开启");
}
mLogger.log(this.debugMode, 'MissionMonComp',
`[MissionMonComp] 小节 ${chapter}-${stage}-${section} 生成完成,怪物总数: ${this.sectionTargetCount}`);
`[MissionMonComp] 回合 ${stage}-${section} 生成完成,怪物总数: ${this.sectionTargetCount}`);
// 按批次拆分:batch=0 立即刷,batch=1 进入待刷队列
const immediate: GeneratedMonster[] = [];