refactor(missionMon): 扩展为6路刷怪并优化中路判定逻辑

1.  将原3路刷怪扩展为6路,调整刷怪线Y轴偏移配置
2.  优化怪物中路判定,使用常量BoxSet.GAME_LINE替代硬编码30阈值
3.  改进均衡选路逻辑,支持多候选路随机选择
4.  为怪物出生位置增加Y轴随机偏移实现多路线进军
This commit is contained in:
panw
2026-05-21 16:58:29 +08:00
parent 52b24668c7
commit 7c54f58be1
2 changed files with 19 additions and 16 deletions

View File

@@ -561,7 +561,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
}
} else {
// 怪物:优先找中路目标
const isMidLane = Math.abs(view.node.position.y) < 30; // 0 是中路
const isMidLane = Math.abs(view.node.position.y - BoxSet.GAME_LINE) < 30; // BoxSet.GAME_LINE(100) 是中路
if (foundPreferredLane && !isMidLane) return;
@@ -619,7 +619,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
frontEnemy = view;
} else {
// 怪物:优先找中路最前排的
const isMidLane = Math.abs(view.node.position.y) < 30;
const isMidLane = Math.abs(view.node.position.y - BoxSet.GAME_LINE) < 30; // BoxSet.GAME_LINE(100) 是中路
if (foundPreferredLane && !isMidLane) return;