chore(map): 调整关卡波次上限为15波并完善怪物队列检测

1.  将显示的波次文字从30波改为15波
2.  修改通关判定条件为当前波次达到15波
3.  新增待刷新怪物数量的状态跟踪
4.  完善怪物全灭的判定逻辑,加入待刷新队列检测
5.  移除了测试用的ts和js脚本文件
6.  添加了怪物生成相关的调试日志
This commit is contained in:
walkpan
2026-05-15 22:24:29 +08:00
parent f243b8edae
commit f515feda7b
4 changed files with 21 additions and 15 deletions

View File

@@ -115,6 +115,8 @@ export class MissionMonCompComp extends CCComp {
* 3. 逐步从 pendingMonsters 队列中生成怪物(受 stop_spawn_mon 限制)。
*/
protected update(dt: number): void {
smc.vmdata.mission_data.pending_mon_num = this.pendingMonsters.length;
if(!smc.mission.play) return
if(smc.mission.pause) return
if(smc.mission.stop_mon_action) return;
@@ -135,6 +137,7 @@ export class MissionMonCompComp extends CCComp {
if (this.pendingMonsters.length === 0) break;
const monData = this.pendingMonsters.shift()!;
const lane = this.pickBalancedLane();
console.log(`[MissionMonComp] 准备生成怪物 UUID=${monData.uuid}, 剩余数量=${this.pendingMonsters.length}`);
this.addMonsterAt(lane, this.laneIndices[lane], monData);
this.laneIndices[lane]++;
this.waveSpawnedCount++;
@@ -184,9 +187,14 @@ export class MissionMonCompComp extends CCComp {
// 预生成第一波数据以获取数量和 Boss 信息
const monsters = spawningEngine.generateWave(this.currentWave);
this.pendingMonsters = monsters;
smc.vmdata.mission_data.pending_mon_num = this.pendingMonsters.length;
this.waveTargetCount = monsters.length;
let hasBoss = monsters.some(m => m.isBoss);
console.log(`[MissionMonComp] 波次 ${this.currentWave} 生成怪物总数: ${this.waveTargetCount}`);
const uuids = monsters.map(m => m.uuid);
console.log(`[MissionMonComp] 波次 ${this.currentWave} 怪物 UUID 列表:`, uuids);
oops.message.dispatchEvent(GameEvent.NewWave, {
wave: this.currentWave,
total: this.waveTargetCount,
@@ -258,9 +266,14 @@ export class MissionMonCompComp extends CCComp {
// 预生成新一波数据以获取数量和 Boss 信息
const monsters = spawningEngine.generateWave(this.currentWave);
this.pendingMonsters = monsters;
smc.vmdata.mission_data.pending_mon_num = this.pendingMonsters.length;
this.waveTargetCount = monsters.length;
let hasBoss = monsters.some(m => m.isBoss);
console.log(`[MissionMonComp] 波次 ${this.currentWave} 生成怪物总数: ${this.waveTargetCount}`);
const uuids = monsters.map(m => m.uuid);
console.log(`[MissionMonComp] 波次 ${this.currentWave} 怪物 UUID 列表:`, uuids);
oops.message.dispatchEvent(GameEvent.NewWave, {
wave: this.currentWave,
total: this.waveTargetCount,