feat(测试模式): 新增怪物技能测试覆盖功能并完善测试配置

修复怪物生成位置索引越界问题,通过对位置数组长度取模限制合法索引范围
新增测试模式专属的怪物技能覆盖逻辑,支持覆盖普攻及各类触发技能配置
扩展测试模式配置项,新增怪物生成数量、词缀配置以及全类型技能覆盖参数
优化 Rogue 关卡生成引擎,支持批量生成测试怪物并计算词缀属性加成
This commit is contained in:
pan
2026-06-12 16:31:32 +08:00
parent 85ab6b0507
commit 488b1632ef
3 changed files with 83 additions and 11 deletions

View File

@@ -311,12 +311,16 @@ export class MissionMonCompComp extends CCComp {
let scale = -1;
// 获取硬编码的占位点坐标,不再使用随机偏移
const basePos = MissionMonCompComp.MON_POSITIONS[posIndex];
const basePos = MissionMonCompComp.MON_POSITIONS[posIndex % MissionMonCompComp.MON_POSITIONS.length];
const spawnX = basePos.x;
const landingY = basePos.y + (monData.isBoss ? 6 : 0);
const spawnPos: Vec3 = v3(spawnX, landingY + MissionMonCompComp.MON_DROP_HEIGHT, 0);
this.globalSpawnOrder = (this.globalSpawnOrder + 1) % 999;
// 如果存在测试技能覆盖,则传递下去(修改 mon.load 逻辑或者通过预存)
// 为了避免侵入 Mon.ts 的原有逻辑,我们先预存
(mon as any)._testSkills = monData.testSkills;
mon.load(spawnPos, scale, monData.uuid, monData.isBoss, landingY, monLv, posIndex);
// 设置渲染排序