refactor(英雄技能): 重构天赋触发逻辑和技能施放系统

- 将HeroAttrsComp中的isDSill和isWFuny改为talTrigger结构体
- 移除TalComp中不再使用的checkTriggers和checkIsTrigger方法
- 优化SACastSystem中的技能施放逻辑,分离天赋处理代码块
- 为Skill.load方法添加damage参数
- 重命名executeCast返回变量为castSucess以提高可读性
This commit is contained in:
2025-11-19 16:03:19 +08:00
parent e577ed976c
commit bcaa377cf6
4 changed files with 27 additions and 71 deletions

View File

@@ -6,7 +6,7 @@ import { HeroSkillsComp } from "./HeroSkills";
import { talConf, TalAttrs } from "../common/config/TalSet";
interface talTrigger{
isTrigger:boolean
value:boolean
count:number
}
@ecs.register('HeroAttrs')
@@ -36,8 +36,8 @@ export class HeroAttrsComp extends ecs.Comp {
Attrs: any = []; // 最终属性数组经过Buff计算后
NeAttrs: any = []; // 负面状态数组
//=====================天赋触发标签=====================
isDSill:number
isWFuny:number
tal_DSill:talTrigger={value:false,count:0}
tal_WFuny:talTrigger={value:false,count:0}
/** 天赋buff数组 - 触发过期,数量可叠加 */
BUFFS_TAL: Record<number, Array<{tal:number,value: number, BType: BType,count:number}>> = {};