From e8df6e6e9cafc54d3b411f056f17c186d7394891 Mon Sep 17 00:00:00 2001 From: walkpan Date: Fri, 1 May 2026 21:40:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BB=9F=E4=B8=80=E8=8B=B1=E9=9B=84?= =?UTF-8?q?=E6=94=BB=E5=87=BB=E8=B7=9D=E7=A6=BB=E5=B9=B6=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=86=97=E4=BD=99=E6=9C=80=E5=B0=8F=E8=B7=9D=E7=A6=BB=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将不同英雄类型的攻击距离统一调整为720,简化距离计算逻辑。 移除HeroAttrsComp中根据英雄类型动态计算最小攻击距离的代码,因为所有英雄的最小攻击距离现在均为0。 同时更新MoveSystem中的攻击范围判断逻辑,将远程英雄的最大攻击范围从360调整为720以保持一致性。 --- assets/script/game/common/config/heroSet.ts | 6 +++--- assets/script/game/hero/HeroAttrsComp.ts | 5 ----- assets/script/game/hero/MoveComp.ts | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/assets/script/game/common/config/heroSet.ts b/assets/script/game/common/config/heroSet.ts index dfc4b627..02711400 100644 --- a/assets/script/game/common/config/heroSet.ts +++ b/assets/script/game/common/config/heroSet.ts @@ -69,9 +69,9 @@ export const FormationPointX = { } as const; export const HeroDisVal: Record = { - [HType.Melee]: 200, - [HType.Mid]: 400, - [HType.Long]: 660, + [HType.Melee]: 720, + [HType.Mid]: 720, + [HType.Long]: 720, } export const resolveFormationTargetX = (fac: FacSet, type: HType): number => { diff --git a/assets/script/game/hero/HeroAttrsComp.ts b/assets/script/game/hero/HeroAttrsComp.ts index 8fd8abb8..a3d29965 100644 --- a/assets/script/game/hero/HeroAttrsComp.ts +++ b/assets/script/game/hero/HeroAttrsComp.ts @@ -200,11 +200,6 @@ export class HeroAttrsComp extends ecs.Comp { const rangeType = this.type as HType.Melee | HType.Mid | HType.Long; const maxRange = HeroDisVal[rangeType]; let minRange = 0; - if (rangeType === HType.Mid) { - minRange = HeroDisVal[HType.Melee]; - } else if (rangeType === HType.Long) { - minRange = HeroDisVal[HType.Mid]; - } this.maxSkillDistance = maxRange; this.minSkillDistance = minRange; } diff --git a/assets/script/game/hero/MoveComp.ts b/assets/script/game/hero/MoveComp.ts index ba973e17..22a455a3 100644 --- a/assets/script/game/hero/MoveComp.ts +++ b/assets/script/game/hero/MoveComp.ts @@ -173,7 +173,7 @@ export class MoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate const [, maxRange] = this.resolveCombatRange(model, 360, 720); return dist <= maxRange; } - const [, maxRange] = this.resolveCombatRange(model, 120, 360); + const [, maxRange] = this.resolveCombatRange(model, 120, 720); return dist <= maxRange; }