fix(战斗): 调整射手技能和近战走位逻辑

- 将射手英雄的技能从[6005,6006]改为[6005,6008]
- 调整技能6005、6006的hit_count从2和3统一为1,提高技能6008的hit_count从1到6
- 优化近战单位的走位逻辑,增加攻击准备锁定和通过阈值判断,调整盟友重叠间距和位移释放距离
This commit is contained in:
panw
2026-03-18 09:57:21 +08:00
parent 941fb50ce2
commit eb4e544363
3 changed files with 14 additions and 6 deletions

View File

@@ -211,13 +211,13 @@ export const SkillSet: Record<number, SkillConfig> = {
},
6005: {
uuid:6005,name:"蓝箭",sp_name:"arrow_blue",icon:"1135",TGroup:TGroup.Enemy,TType:TType.Frontline,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,
ap:100,hit_count:2,hitcd:0.2,speed:720,with:0,
ap:100,hit_count:1,hitcd:0.2,speed:720,with:0,
ready:0,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.collision,
buffs:[],debuffs:[],info:"对前方单个目标造成100%攻击的伤害",
},
6006: {
uuid:6006,name:"绿箭",sp_name:"arrow_green",icon:"1135",TGroup:TGroup.Enemy,TType:TType.Frontline,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,
ap:100,hit_count:3,hitcd:0.2,speed:720,with:0,
ap:100,hit_count:1,hitcd:0.2,speed:720,with:0,
ready:0,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.collision,
buffs:[],debuffs:[],info:"对前方单个目标造成100%攻击的伤害",
},
@@ -229,7 +229,7 @@ export const SkillSet: Record<number, SkillConfig> = {
},
6008: {
uuid:6008,name:"光箭",sp_name:"arrow_big_yellow",icon:"1135",TGroup:TGroup.Enemy,TType:TType.Frontline,readyAnm:"",endAnm:"",act:"atk",DTType:DTType.single,
ap:100,hit_count:1,hitcd:0.2,speed:720,with:0,
ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,
ready:0,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.animationEnd,
buffs:[],debuffs:[],info:"对前方单个目标造成100%攻击的伤害",
},

View File

@@ -163,7 +163,7 @@ export const HeroInfo: Record<number, heroInfo> = {
type:HType.Long,lv:1,hp:150,ap:40,speed:95,skills:[6003,6101],info:"奥术法师"},
5003:{uuid:5003,name:"射手",icon:"1001",path:"ha1", fac:FacSet.HERO, kind:2,as:1,ss:5,
type:HType.Long,lv:1,hp:180,ap:30,speed:140,skills:[6005,6006],info:"射手"},
type:HType.Long,lv:1,hp:180,ap:30,speed:140,skills:[6005,6008],info:"射手"},
5005:{uuid:5005,name:"牧师",icon:"1001",path:"hh1", fac:FacSet.HERO, kind:2,as:1,ss:5,
type:HType.Long,lv:1,hp:160,ap:25,speed:100,skills:[6003,6100],info:"牧师"},

View File

@@ -38,8 +38,10 @@ interface MoveFacConfig {
export class MoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate {
private readonly meleeAttackRange = 52;
private readonly allySpacingX = 40;
private readonly allyOverlapSpacingX = 8;
private readonly displacementReleaseX = 24;
private readonly allyOverlapSpacingX = 14;
private readonly displacementReleaseX = 10;
private readonly attackReadyLockX = 10;
private readonly attackPassThresholdX = 60;
private readonly minSpacingY = 30;
private readonly renderSortInterval = 0.05;
private renderSortElapsed = 0;
@@ -327,12 +329,18 @@ export class MoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
selfPriority: number
): number {
if (!selfAttrs || !selfMove || !allyMove) return this.allySpacingX;
if ((selfAttrs.type as HType) !== HType.Melee) return this.allySpacingX;
if (allyPriority !== selfPriority) return this.allySpacingX;
const selfTargetX = selfMove.targetX;
const allyTargetX = allyMove.targetX;
const selfHasTarget = Math.abs(selfTargetX) > 0.01;
const allyHasTarget = Math.abs(allyTargetX) > 0.01;
if (!selfHasTarget || !allyHasTarget) return this.allySpacingX;
const selfDistToAttack = Math.abs(selfTargetX - currentX);
const canAttackNow = selfAttrs.enemy_in_cast_range || selfDistToAttack <= this.attackReadyLockX;
if (canAttackNow) return this.allySpacingX;
const targetTooFar = selfDistToAttack >= this.attackPassThresholdX;
if (!targetTooFar) return this.allySpacingX;
const allyDisplaced = Math.abs(allyX - allyTargetX) >= this.displacementReleaseX;
const selfNeedAdvance = direction > 0 ? selfTargetX > currentX + 2 : selfTargetX < currentX - 2;
if (allyDisplaced && selfNeedAdvance) return this.allyOverlapSpacingX;