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;