feat(英雄): 添加受击触发技能机制

- 在 HeroInfo 接口中添加 atked 字段,用于配置受击后触发的技能
- 在 HeroAtkSystem 中实现 checkAndTriggerAtkedSkills 方法,检查受击次数并触发对应技能
- 在伤害计算逻辑中增加受击计数并调用触发检查
This commit is contained in:
panw
2026-04-15 10:55:51 +08:00
parent 4995097606
commit 9148c830c2
2 changed files with 22 additions and 0 deletions

View File

@@ -68,6 +68,7 @@ export interface heroInfo {
fstart?:number[]; // 战斗开始时释放的技能uuid列表
fend?:number[]; // 战斗结束时释放的技能uuid列表
atking?:{s_uuid:number, t_num:number}[]; // 普通攻击后触发的技能配置s_uuid: 技能id, t_num: 触发所需的普攻次数
atked?:{s_uuid:number, t_num:number}[]; // 受击后触发的技能配置s_uuid: 技能id, t_num: 触发所需的受击次数
// dis: number; // 攻击距离(像素)
speed: number; // 移动速度(像素/秒)
skills: Record<number, HSkillInfo> ; // 携带技能ID列表