通过帧事件 实现技能的范围伤害完善

This commit is contained in:
2025-08-08 16:36:54 +08:00
parent cd6675652b
commit 1482e9989a
7 changed files with 157 additions and 193 deletions

View File

@@ -207,7 +207,7 @@ ap:施法者攻击
mhp:增加最大生命比例
hp:增加当前生命比例
cd:buff/debuff持续时间
/debhit:1,hited:伤害时间
/debhit_num:1,hit:1,hited:伤害时间
shield:增加护盾占最大生命比例
buC:0,buR:100,speed:移动速度
@@ -232,100 +232,100 @@ export const getSkills=(quality:number)=>{
export const SkillSet = {
6001:{uuid:6001,name:"剑气",for_hero:false,sp_name:"atk_1",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"},
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit_num:1,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"},
6002:{uuid:6002,name:"冰球",for_hero:false,sp_name:"greenball",path:"3034",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害"},
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit_num:1,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害"},
6003:{uuid:6003,name:"射击",for_hero:false,sp_name:"arrow",path:"3037",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:2,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人释放箭矢,造成100%攻击的伤害"},
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit_num:1,hit:2,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人释放箭矢,造成100%攻击的伤害"},
6004:{uuid:6004,name:"护盾",for_hero:true,sp_name:"shield",path:"3045",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Team,SType:SType.shield,act:"max",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,EType:EType.animationEnd,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:1,ap:0,cd:5,hit:1,hited:3,buV:2,buC:0,buR:100,speed:720,cost:10,info:"为最前排队友召唤一个可以抵御2次攻击的圣盾(最高叠加到6次)"},
debuff:0,deV:0,deC:0,deR:100,in:1,ap:0,cd:5,hit_num:1,hit:1,hited:3,buV:2,buC:0,buR:100,speed:720,cost:10,info:"为最前排队友召唤一个可以抵御2次攻击的圣盾(最高叠加到6次)"},
6005:{uuid:6005,name:"治疗", for_hero:true, sp_name:"heath_small",path:"3056",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Team,SType:SType.heal,act:"max",DTType:DTType.single,CdType:CdType.cd,AType:AType.StartEnd,EType:EType.timeEnd,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:1,ap:0,cd:5,hit:0,hited:0,buV:20,buC:0,buR:100,speed:0,cost:10,info:"回复最前排队友10%最大生命值的生命"},
debuff:0,deV:0,deC:0,deR:100,in:1,ap:0,cd:5,hit_num:1,hit:0,hited:0,buV:20,buC:0,buR:100,speed:0,cost:10,info:"回复最前排队友10%最大生命值的生命"},
6006:{uuid:6006,name:"铁斧打击",for_hero:false,sp_name:"base_ft",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"},
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit_num:1,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"},
6007:{uuid:6007,name:"木棍打击",for_hero:false,sp_name:"base_mg",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出木棍,造成100%攻击的伤害"},
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit_num:1,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出木棍,造成100%攻击的伤害"},
6008:{uuid:6008,name:"飞刀打击",for_hero:false,sp_name:"base_sf",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出飞刀,造成100%攻击的伤害"},
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit_num:1,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出飞刀,造成100%攻击的伤害"},
6009:{uuid:6009,name:"石斧打击",for_hero:false,sp_name:"base_sf",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit_num:1,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
6010:{uuid:6010,name:"攻击",for_hero:false,sp_name:"atk1",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,EType:EType.animationEnd,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:0.2,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit_num:1,hit:1,hited:0.2,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
6011:{uuid:6011,name:"攻击",for_hero:false,sp_name:"atk2",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,EType:EType.animationEnd,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:0.2,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit_num:1,hit:1,hited:0.2,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
6020:{uuid:6020,name:"烈焰斩击",for_hero:false,sp_name:"max_fireatk",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.fixedStart,EType:EType.animationEnd,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:0.2,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit_num:1,hit:1,hited:0.2,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
6021:{uuid:6021,name:"烈火护盾",for_hero:true,sp_name:"max_firedun",path:"3061",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedStart,EType:EType.timeEnd,fname:"max",flash:false,with:90,
debuff:0,deV:0,deC:0,deR:100,in:10,ap:100,cd:5,hit:1,hited:1,buV:0,buC:0,buR:100,speed:80,cost:10,info:"召唤烈焰保护英雄,持续10秒,每秒对范围内的敌人造成100%伤害"},
debuff:0,deV:0,deC:0,deR:100,in:10,ap:100,cd:5,hit_num:1,hit:1,hited:1,buV:0,buC:0,buR:100,speed:80,cost:10,info:"召唤烈焰保护英雄,持续10秒,每秒对范围内的敌人造成100%伤害"},
6022:{uuid:6022,name:"火球术" ,for_hero:true,sp_name:"fire",path:"3039",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
debuff:DebuffAttr.STUN,deV:0,deC:1,deR:50,in:1,ap:100,cd:5,hit:2,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧"},
debuff:DebuffAttr.STUN,deV:0,deC:1,deR:50,in:1,ap:100,cd:5,hit_num:1,hit:2,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧"},
6023:{uuid:6023,name:"龙卷风",for_hero:true, sp_name:"bwind",path:"3065",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.power,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:100,in:3,ap:100,cd:5,hit:1,hited:1,buV:0,buC:0,buR:100,speed:360,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人"},
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:100,in:3,ap:100,cd:5,hit_num:1,hit:1,hited:1,buV:0,buC:0,buR:100,speed:360,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人"},
6024:{uuid:6024,name:"寒冰箭",for_hero:true, sp_name:"arrow_blue",path:"3060",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
debuff:DebuffAttr.FROST,deV:1,deC:0,deR:100,in:1,ap:100,cd:1,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率冰冻敌人"},
debuff:DebuffAttr.FROST,deV:1,deC:0,deR:100,in:1,ap:100,cd:1,hit_num:1,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率冰冻敌人"},
6025:{uuid:6025,name:"烈焰射击",for_hero:false,sp_name:"arrow_yellow",path:"3014",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:CdType.power,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
debuff:DebuffAttr.STUN,deV:0.5,deC:0,deR:50,in:1,ap:100,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率眩晕敌人"},
debuff:DebuffAttr.STUN,deV:0.5,deC:0,deR:50,in:1,ap:100,cd:5,hit_num:1,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率眩晕敌人"},
6026:{uuid:6026,name:"火墙", for_hero:true, sp_name:"firewall",path:"3040",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.cd,AType:AType.fixedEnd,EType:EType.timeEnd,fname:"max",flash:false,with:90,
debuff:0,deV:0,deC:0,deR:100,in:10,ap:50,cd:5,hit:1,hited:1,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤一堵火墙,持续10秒,每秒造成50%攻击伤害"},
debuff:0,deV:0,deC:0,deR:100,in:10,ap:50,cd:5,hit_num:1,hit:1,hited:1,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤一堵火墙,持续10秒,每秒造成50%攻击伤害"},
6027:{uuid:6027,name:"冰刺",for_hero:true,sp_name:"icez",path:"3049",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,fname:"max",flash:false,with:90,
debuff:DebuffAttr.FROST,deV:0,deC:0,deR:100,in:1,ap:300,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤冰刺攻击敌人,造成200%攻击的伤害,20%几率冰冻敌人"},
debuff:DebuffAttr.FROST,deV:0,deC:0,deR:100,in:1,ap:300,cd:5,hit_num:1,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤冰刺攻击敌人,造成200%攻击的伤害,20%几率冰冻敌人"},
6028:{uuid:6028,name:"潮汐", for_hero:true, sp_name:"watert",path:"3070",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,fname:"max",flash:false,with:90,
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:100,in:3,ap:100,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人"},
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:100,in:3,ap:100,cd:5,hit_num:1,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人"},
6029:{uuid:6029,name:"陨石术",for_hero:true, sp_name:"max_yunshi",path:"3123",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,fname:"max",flash:false,with:90,
debuff:0,deV:0,deC:0,deR:100,in:3,ap:500,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"},
debuff:0,deV:0,deC:0,deR:100,in:3,ap:500,cd:5,hit_num:1,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"},
6030:{uuid:6030,name:"冰墙", for_hero:false, sp_name:"icet",path:"3050",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.cd,AType:AType.linear,EType:EType.animationEnd,fname:"max",flash:false,with:90,
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:100,in:1,ap:400,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤冰墙攻击敌人,造成200%攻击的伤害,50%几率击退敌人"},
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:100,in:1,ap:400,cd:5,hit_num:1,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤冰墙攻击敌人,造成200%攻击的伤害,50%几率击退敌人"},
//召唤取消
// 6031:{uuid:6031,name:"召唤骷髅",for_hero:true,sp_name:"zhaohuan",path:"3018",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
// TGroup:TGroup.Self,SType:SType.zhaohuan,act:"max",DTType:DTType.single,CdType:CdType.power,AType:AType.fixedStart,EType:EType.animationEnd,fname:"max_blue",flash:true,with:90,
// debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:70,cd:60,hit:1,hited:1,buV:0,buC:0,buR:100,speed:720,hero:5221,cost:10,info:"召唤一个骷髅战士为我方而战"},
// debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:70,cd:60,hit_num:1,hit:1,hited:1,buV:0,buC:0,buR:100,speed:720,hero:5221,cost:10,info:"召唤一个骷髅战士为我方而战"},
6032:{uuid:6032,name:"陨石风暴",for_hero:true, sp_name:"fireys",path:"3101",quality:Quality.PURPLE, TType:TType.Frontline,maxC:5,
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,fname:"max",flash:false,with:90,
debuff:0,deV:0,deC:0,deR:50,in:3,ap:500,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"},
debuff:0,deV:0,deC:0,deR:50,in:3,ap:500,cd:5,hit_num:1,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"},
6033:{uuid:6033,name:"龙卷风爆",for_hero:true, sp_name:"bwind",path:"3069",quality:Quality.PURPLE, TType:TType.Frontline,maxC:5,
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:50,in:3,ap:100,cd:5,hit:1,hited:1,buV:0,buC:0,buR:100,speed:360,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人"},
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:50,in:3,ap:100,cd:5,hit_num:1,hit:1,hited:1,buV:0,buC:0,buR:100,speed:360,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人"},
6034:{uuid:6034,name:"大潮汐", for_hero:true, sp_name:"watert",path:"3070",quality:Quality.PURPLE, TType:TType.Frontline,maxC:5,
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:CdType.power,AType:AType.fixedEnd,EType:EType.animationEnd,fname:"max",flash:false,with:90,
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:50,in:3,ap:100,cd:5,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人"},
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:50,in:3,ap:100,cd:5,hit_num:1,hit:1,hited:0.3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人"},
};

View File

@@ -97,9 +97,11 @@ export class Skill extends ecs.Entity {
// 设置技能组件属性
Object.assign(SComp, {
s_uuid: uuid,
dis:config.dis,
AType: config.AType,
speed: config.speed,
atk_count: 0,
hit_num:config.hit_num, //目前设定 根据技能不一样,几十
startPos: startPos,
targetPos: targetPos,
caster: caster,

View File

@@ -27,6 +27,7 @@ export class SkillCom extends CCComp {
scale:number = 1;
angle:number = 0;
atk_count:number = 0;
hit_num:number=0; // 范围攻击的 伤害个数
is_destroy:boolean = false;
enemys:any = [];
AType: number = 0; // 运动类型
@@ -40,6 +41,7 @@ export class SkillCom extends CCComp {
caster:any=null;
distance_x:number=0;
distance_y:number=0;
dis:number=0;
ap:number=0;
buV:number=0;
buC:number=0;

View File

@@ -1,6 +1,8 @@
import { _decorator } from "cc";
import { _decorator, UI, UITransform } from "cc";
import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { HeroViewComp } from "../../hero/HeroViewComp";
import { SkillCom } from "../SkillCom";
const { ccclass, property } = _decorator;
@@ -14,6 +16,50 @@ export class AtkComComp extends CCComp {
// this.on(ModuleEvent.Cmd, this.onHandler, this);
}
public atk(args:any){
let skill=this.node.getComponent(SkillCom)
let dis=this.node.getComponent(UITransform).width/2
let targetsInRange: HeroViewComp[] = []
// 收集范围内所有敌方目标
ecs.query(ecs.allOf(HeroViewComp)).some(e => {
const view = e.get(HeroViewComp);
if(view.fac!=skill.fac) {
const distance = Math.abs(skill.node.position.x - view.node.position.x);
if(distance <= dis) {
targetsInRange.push(view);
}
}
});
// 根据skill.hit_num决定攻击模式
if(skill.hit_num > 0) {
// 限制目标数量按距离排序选择最近的N个目标
if(targetsInRange.length > 0) {
// 按距离排序(从近到远)
targetsInRange.sort((a, b) => {
const distanceA = Math.abs(skill.node.position.x - a.node.position.x);
const distanceB = Math.abs(skill.node.position.x - b.node.position.x);
return distanceA - distanceB;
});
// 限制目标数量
const maxTargets = Math.min(skill.hit_num, targetsInRange.length);
const selectedTargets = targetsInRange.slice(0, maxTargets);
selectedTargets.forEach(target => {
skill.single_damage(target, false);
});
}
} else {
// 范围伤害:对所有范围内目标造成伤害
if(targetsInRange.length > 0) {
targetsInRange.forEach(target => {
skill.single_damage(target, false);
});
}
}
}
/** 全局消息逻辑处理 */
// private onHandler(event: string, args: any) {
// switch (event) {