fix(英雄): 修复复活配置类型错误并优化复活流程

将 HeroAttrsComp 和 heroSet 中的 revive 字段从数组类型改为单一对象类型,因为每个英雄只能配置一个复活技能。同时优化 HeroAtkSystem 中的复活逻辑,将技能配置提取到变量中复用,并延迟 0.5 秒执行 alive() 方法以确保复活动画能够完整播放。
This commit is contained in:
panw
2026-04-23 15:02:39 +08:00
parent bca97070d4
commit 062ce6eb5c
3 changed files with 20 additions and 12 deletions

View File

@@ -70,7 +70,7 @@ export interface heroInfo {
field?: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: 触发所需的受击次数
revive?:{s_uuid:number,r_num:number,upr:number}[]
revive?:{s_uuid:number,r_num:number,upr:number};
// dis: number; // 攻击距离(像素)
speed: number; // 移动速度(像素/秒)
skills: Record<number, HSkillInfo> ; // 携带技能ID列表
@@ -115,7 +115,7 @@ export const HeroInfo: Record<number, heroInfo> = {
// ========== 法师英雄 ==========
5101:{uuid:5101,name:"奥术法师",path:"hm2", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:50,ap:60,speed:800,revive:[{s_uuid:6501,r_num:1,upr:0.5}],
5101:{uuid:5101,name:"奥术法师",path:"hm2", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:50,ap:60,speed:800,revive:{s_uuid:6501,r_num:1,upr:0.5},
skills:{6201:{uuid:6007,lv:1,cd:1,ccd:0}},info:"冰球,冰锥 远法dps"},
5102:{uuid:5102,name:"火焰法师",path:"hm1", fac:FacSet.HERO,cards_lv:2,lv:1,type:HType.Long,hp:30,ap:120,speed:800,
skills:{6203:{uuid:6002,lv:1,cd:1,ccd:0}},info:"火击,火球 远法dps"},