From 95f42092019237a3d7279775d526f6bf42a5b351 Mon Sep 17 00:00:00 2001 From: walkpan Date: Sun, 5 Apr 2026 22:10:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8A=80=E8=83=BD=E7=B3=BB=E7=BB=9F):=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BC=BA=E5=88=B6=E9=87=8A=E6=94=BE=E6=8A=80?= =?UTF-8?q?=E8=83=BD=E7=9A=84=E6=88=98=E6=96=97=E7=8A=B6=E6=80=81=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将无条件检查是否在战斗中改为仅对敌方目标技能进行战斗状态检查。友方增益和护盾技能现在可以在非战斗状态下释放,提高游戏体验的流畅性。 --- assets/script/game/hero/SCastSystem.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/script/game/hero/SCastSystem.ts b/assets/script/game/hero/SCastSystem.ts index 9b94722e..bff2ac3c 100644 --- a/assets/script/game/hero/SCastSystem.ts +++ b/assets/script/game/hero/SCastSystem.ts @@ -91,10 +91,13 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate * 忽略CD、状态、动画前摇,直接生效 */ public forceCastTriggerSkill(s_uuid: number, heroAttrs: HeroAttrsComp, heroView: HeroViewComp) { - if (!smc.mission.in_fight) return; + // 如果是敌方攻击技能,必须在战斗中才能释放;友方增益/护盾则允许在非战斗中释放 const config = SkillSet[s_uuid]; if (!config) return; + const isEnemyTarget = !this.isSelfSkill(config.TGroup) && !this.isFriendlySkill(config.TGroup); + if (isEnemyTarget && !smc.mission.in_fight) return; + const skillLv = heroAttrs.getSkillLevel(s_uuid) || 1; let isFriendly = false;