fix(技能系统): 调整强制释放技能的战斗状态检查逻辑
将无条件检查是否在战斗中改为仅对敌方目标技能进行战斗状态检查。友方增益和护盾技能现在可以在非战斗状态下释放,提高游戏体验的流畅性。
This commit is contained in:
@@ -91,10 +91,13 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
|||||||
* 忽略CD、状态、动画前摇,直接生效
|
* 忽略CD、状态、动画前摇,直接生效
|
||||||
*/
|
*/
|
||||||
public forceCastTriggerSkill(s_uuid: number, heroAttrs: HeroAttrsComp, heroView: HeroViewComp) {
|
public forceCastTriggerSkill(s_uuid: number, heroAttrs: HeroAttrsComp, heroView: HeroViewComp) {
|
||||||
if (!smc.mission.in_fight) return;
|
// 如果是敌方攻击技能,必须在战斗中才能释放;友方增益/护盾则允许在非战斗中释放
|
||||||
const config = SkillSet[s_uuid];
|
const config = SkillSet[s_uuid];
|
||||||
if (!config) return;
|
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;
|
const skillLv = heroAttrs.getSkillLevel(s_uuid) || 1;
|
||||||
|
|
||||||
let isFriendly = false;
|
let isFriendly = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user