refactor: 整理技能与战斗相关的配置与逻辑

1.  新增技能飞行距离配置项,支持自定义直线技能飞行距离
2.  调整英雄后退击退范围从30改为20
3.  重构击退逻辑,统一敌我双方的边界钳制处理
4.  优化Boss数值配置,固定基础面板为初始英雄2倍强度
5.  修正技能6006的动画资源引用为atk1
6.  调整近战英雄默认停火距离从80改为60
7.  更新注释文档与配置注释,优化代码可读性
This commit is contained in:
panFD
2026-08-14 00:36:26 +08:00
parent 4fee02d82e
commit df0dedba75
12 changed files with 301 additions and 55 deletions

View File

@@ -28,6 +28,8 @@ export class MoveComp extends ecs.Comp {
baseY: number = 0;
/** 出生序,用于同条件渲染排序稳定 */
spawnOrder: number = 0;
/** 击退速度(像素/秒),受击瞬间赋值,每帧指数衰减至 0 */
knockbackVelocity: number = 0;
reset() {
this.direction = 1;
@@ -35,6 +37,7 @@ export class MoveComp extends ecs.Comp {
this.moving = true;
this.baseY = 0;
this.spawnOrder = 0;
this.knockbackVelocity = 0;
}
}
@@ -146,7 +149,7 @@ export class MoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
const dist = Math.abs(selfX - enemyX);
const attackRange = model.dis;
/** 近战贴身作战:攻击距离 dis(100) 大于技能范围(60),推进到与敌人相隔 60 才停下,保证技能可命中且不过度贴身 */
const stopRange = model.type === 0 ? 80 : attackRange;
const stopRange = model.type === 0 ? 60 : attackRange;
const inRange = dist <= stopRange;
if (inRange) {