This commit is contained in:
2025-06-20 00:25:05 +08:00
parent ff402f14ca
commit b7edf26cc9
7 changed files with 331 additions and 162 deletions

View File

@@ -86,8 +86,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -52,
"y": -2,
"x": -50,
"y": 0,
"z": 0
},
"_lrot": {
@@ -99,8 +99,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": -0.7,
"y": 0.7,
"x": -1,
"y": 1,
"z": 1
},
"_mobility": 0,

View File

@@ -13153,7 +13153,7 @@
"node": {
"__id__": 571
},
"_enabled": true,
"_enabled": false,
"__prefab": {
"__id__": 583
},

View File

@@ -3,7 +3,7 @@
*/
import { HeroList } from "./heroSet"
import { HeroSkillList } from "./SkillSet"
import { HeroSkillList, SkillSet } from "./SkillSet"
import { equip_list } from "./Equips"
//1:伙伴 2:技能 3:装备的出现概率配置
@@ -139,9 +139,14 @@ export const SuperCardsType={
}
export const SuperCardsList=[3001,3002,3101,3201,3301];
export const SuperCards={
3001:{uuid:3001,name:"附魔宝典",path:"3001",type:SuperCardsType.SPECIAL,value1:1,value2:0,value3:0,info:"攻击触发提高英雄/伙伴属性的效果,额外添加+1攻击力"},
3002:{uuid:3002,name:"附魔宝典",path:"3002",type:SuperCardsType.SPECIAL,value1:1,value2:0,value3:0,info:"攻击触发高英雄/伙伴属性的效果,额外添加+1生命值"},
3101:{uuid:3101,name:"火球风暴",path:"3101",type:SuperCardsType.AOE,value1:10,value2:300,value3:10,info:"召唤大量火球攻击敌人,每个火球对敌人造成英雄攻击力的300%伤害,并造成易伤(下10次伤害)"},
3201:{uuid:3201,name:"极速充能",path:"3201",type:SuperCardsType.BUFF,value1:10,value2:100,value3:0,info:"你的英雄/伙伴接下来的10次普通攻击速度提升100%"},
3301:{uuid:3301,name:"冰霜风暴",path:"3301",type:SuperCardsType.DEBUFF,value1:30,value2:10,value3:0,info:"场上敌人获得30%的易伤,(下10次伤害)"},
3001:{uuid:3001,name:"附魔宝典",path:"3001",type:SuperCardsType.SPECIAL,value1:1,value2:0,value3:0,
info:"攻击触发高英雄/伙伴属性的效果,额外添加+1攻击力"},
3002:{uuid:3002,name:"附魔宝典",path:"3002",type:SuperCardsType.SPECIAL,value1:1,value2:0,value3:0,
info:"攻击触发高英雄/伙伴属性的效果,额外添加+1生命值"},
3101:{uuid:3101,name:"火球风暴",path:"3101",type:SuperCardsType.AOE,value1:SkillSet[6029].uuid,value2:3,value3:0,
info:"召唤大量火球攻击敌人,每个火球对敌人造成英雄攻击力的300%伤害"},
3201:{uuid:3201,name:"极速充能",path:"3201",type:SuperCardsType.BUFF,value1:10,value2:100,value3:0,
info:"你的英雄/伙伴接下来的10次普通攻击速度提升100%"},
3301:{uuid:3301,name:"冰霜风暴",path:"3301",type:SuperCardsType.DEBUFF,value1:30,value2:10,value3:0,
info:"场上敌人获得30%的易伤,(下10次伤害)"},
}

View File

@@ -122,6 +122,7 @@ mhp:增加最大生命比例
hp:增加当前生命比例
cd:buff/debuff持续时间
buff_cd:buff/debuff触发时间
hited:伤害时间
shield:增加护盾占最大生命比例
speed:移动速度
@@ -132,37 +133,136 @@ info:技能描述
*/
export const HeroSkillList = [6001,6001,6001,6001,6001,6001]
export const SkillSet = {
6001:{uuid:6001,name:"凛冬之触",sp_name:"greenball",path:"6001",TargetType:TargetType.Frontline,TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害"},
6002:{uuid:6002,name:"烈焰之怒",sp_name:"greenball",path:"6002",TargetType:TargetType.Frontline,TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人释放火焰弹,造成100%攻击的伤害"},
6003:{uuid:6003,name:"奥术冲击",sp_name:"greenball",path:"6003",TargetType:TargetType.Frontline,TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人释放魔法弹,造成100%攻击的伤害"},
6004:{uuid:6004,name:"神圣裁决",sp_name:"greenball",path:"6004",TargetType:TargetType.Frontline,TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人释放圣光弹,造成100%攻击的伤害"},
6005:{uuid:6005,name:"破空斩击",sp_name:"patk",path:"6005",TargetType:TargetType.Frontline,TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:50,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"攻击前方直线100码内的敌人造成50%伤害"},
6006:{uuid:6006,name:"穿心箭矢",sp_name:"arrow",path:"6006",TargetType:TargetType.Frontline,TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人释放箭矢,造成100%攻击的伤害"},
6007:{uuid:6007,name:"铁斧打击",sp_name:"mon_ft",path:"6007",TargetType:TargetType.Frontline,TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"},
6008:{uuid:6008,name:"木棍打击",sp_name:"mon_ly",path:"6008",TargetType:TargetType.Frontline,TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人扔出木棍,造成100%攻击的伤害"},
6009:{uuid:6009,name:"飞刀打击",sp_name:"mon_xd",path:"6009",TargetType:TargetType.Frontline,TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人扔出飞刀,造成100%攻击的伤害"},
6010:{uuid:6010,name:"石斧打击",sp_name:"mon_sf",path:"6010",TargetType:TargetType.Frontline,TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
6011:{uuid:6011,name:"烈火呼吸",sp_name:"firequan",path:"6011",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:3,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:0.5,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤烈焰攻击前方敌人,造成200%攻击的伤害,烈焰维持3秒"},
6012:{uuid:6012,name:"大火球" ,sp_name:"fire",path:"6012",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.linear,endType:1,fname:"max",flash:false,with:50,debuff:2,depb:20,debtime:2,derate:100,in:1,count:1,def:0,apup:0,ap:300,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧"},
6013:{uuid:6013,name:"火墙", sp_name:"firewall",path:"6013",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:4,endType:1,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:10,count:1,def:0,apup:0,ap:50,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"在最前方敌人位置,召唤一堵火墙,持续10秒,每秒造成50%攻击伤害"},
6014:{uuid:6014,name:"寒冰箭", sp_name:"arrow_blue",path:"6014",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.linear,endType:1,fname:"max",flash:false,with:50,debuff:1,depb:20,debtime:2,derate:0,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率冰冻敌人"},
6015:{uuid:6015,name:"烈焰射击",sp_name:"arrow_yellow",path:"6015",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,debuff:3,depb:20,debtime:2,derate:0,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率眩晕敌人"},
6016:{uuid:6016,name:"龙卷风", sp_name:"bwind",path:"6016",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.linear,endType:1,fname:"max",flash:false,with:50,debuff:8,depb:50,debtime:1,derate:0,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人"},
6017:{uuid:6017,name:"生命之泉",sp_name:"heath",path:"6017",TargetType:TargetType.Frontline,TargetGroup:2,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max_blue",flash:true,with:50,debuff:0,depb:0,debtime:0,derate:0,in:5,count:1,def:0,apup:0,ap:100,mhp:0,hp:3,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"5秒持续为全体友方恢复施法者最大生命值15%的生命"},
6018:{uuid:6018,name:"神圣护盾",sp_name:"shield",path:"6018",TargetType:TargetType.Frontline,TargetGroup:0,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:30,speed:720,sonsk:0,hero:0,info:"召唤圣盾保护自己,可以抵御3次攻击"},
6019:{uuid:6019,name:"战争咆哮",sp_name:"apup",path:"6019",TargetType:TargetType.Frontline,TargetGroup:2,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max_red",flash:true,with:50,debuff:0,depb:0,debtime:0,derate:0,in:1,count:1,def:0,apup:20,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"为全体友方增加施法者攻击力20%的攻击"},
6021:{uuid:6021,name:"死亡射击",sp_name:"shoot2",path:"6021",TargetType:2,TargetGroup:3,act:"max",CdType:2,AnimType:4,endType:0,fname:"max_blue",flash:true,with:50,debuff:0,depb:0,debtime:0,derate:0,in:1,count:1,def:0,apup:0,ap:600,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"攻击最后方的敌人,造成600%攻击的伤害"},
6022:{uuid:6022,name:"寒霜之矛",sp_name:"icez",path:"6022",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,debuff:1,depb:50,debtime:2,derate:0,in:1,count:1,def:0,apup:0,ap:300,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"在最前方敌人位置,召唤冰刺攻击敌人,造成200%攻击的伤害,20%几率冰冻敌人"},
6023:{uuid:6023,name:"冰墙", sp_name:"icet",path:"6023",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,debuff:8,depb:50,debtime:1,derate:0,in:1,count:1,def:0,apup:0,ap:400,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"在最前方敌人位置,召唤冰墙攻击敌人,造成200%攻击的伤害,50%几率击退敌人"},
6024:{uuid:6024,name:"旋风斩", sp_name:"fwind",path:"6024",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:3,endType:1,fname:"max_red",flash:false,with:50,debuff:8,depb:50,debtime:1,derate:0,in:2,count:1,def:0,apup:0,ap:80,mhp:0,hp:0,cd:5,buff_cd:0.5,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"旋转武器对周围的敌人造成80%攻击,2秒内旋转4次"},
6025:{uuid:6025,name:"火焰漩涡",sp_name:"fireball",path:"6025",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,debuff:8,depb:50,debtime:1,derate:0,in:3,count:1,def:0,apup:0,ap:500,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤一个能量球射向前方敌人,对遇到的第一个敌人造成500%攻击的伤害,并击退"},
6026:{uuid:6026,name:"潮汐", sp_name:"watert",path:"6026",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,debuff:8,depb:50,debtime:2,derate:0,in:3,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"在最前方敌人位置,召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人"},
6027:{uuid:6027,name:"国王霸气",sp_name:"kingba",path:"6027",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:3,endType:1,fname:"max",flash:false,with:50,debuff:8,depb:100,debtime:2,derate:0,in:3,count:1,def:0,apup:2,ap:400,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"释放霸气攻击周围敌人,造成400%伤害,并100%几率击退敌人"},
6028:{uuid:6028,name:"自然庇佑",sp_name:"heath2",path:"6028",TargetType:TargetType.Frontline,TargetGroup:2,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max_blue",flash:true,with:50,debuff:0,depb:0,debtime:0,derate:0,in:2,count:1,def:0,apup:0,ap:100,mhp:0,hp:10,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"为全体友方恢复施法者最大生命值10%的生命,和抵御1次攻击的护盾"},
6029:{uuid:6029,name:"陨石术", sp_name:"fireys",path:"6029",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:4,endType:1,fname:"max",flash:false,with:50,debuff:8,depb:50,debtime:2,derate:0,in:3,count:1,def:0,apup:0,ap:500,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"},
6030:{uuid:6030,name:"闪电呼吸",sp_name:"dianquan",path:"6030",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:3,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:0.5,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤闪电攻击前方敌人,造成200%攻击的伤害,烈焰维持3秒"},
6031:{uuid:6031,name:"召唤仆从",sp_name:"zhaohuan",path:"6031",TargetType:TargetType.Frontline,TargetGroup:0,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max_blue",flash:true,with:50,debuff:0,depb:0,debtime:0,derate:0,in:2,count:1,def:20,apup:0,ap:70,mhp:0,hp:70,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:5211,info:"召唤一个与施法者等级相同的骷髅战士为我方而战"},
6032:{uuid:6032,name:"自愈", sp_name:"heath_small",path:"6032",TargetType:TargetType.Frontline,TargetGroup:0,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,debuff:0,depb:0,debtime:0,derate:0,in:2,count:1,def:0,apup:0,ap:100,mhp:0,hp:5,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"主动:自己回复自身5%最大生命值的生命"},
6033:{uuid:6033,name:"震地裂击",sp_name:"cuida",path:"6033",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,debuff:4,depb:100,debtime:1,derate:20,in:1,count:1,def:0,apup:0,ap:500,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:6035,hero:0,info:"捶爆前方目标,造成300%攻击的伤害震慑敌人本局内全部敌方降低对方10%攻击力"},
6034:{uuid:6034,name:"风暴之矢",sp_name:"bingyu",path:"6034",TargetType:TargetType.Frontline,TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,debuff:4,depb:100,debtime:1,derate:20,in:1,count:1,def:0,apup:0,ap:80,mhp:0,hp:0,cd:5,buff_cd:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"射出能量暴风箭攻击最前方范围敌人,每波造成80%攻击的伤害"}
6001:{uuid:6001,name:"凛冬之触",sp_name:"greenball",path:"6001",TargetType:TargetType.Frontline,
TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害"},
6002:{uuid:6002,name:"烈焰之怒",sp_name:"greenball",path:"6002",TargetType:TargetType.Frontline,
TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人释放火焰弹,造成100%攻击的伤害"},
6003:{uuid:6003,name:"奥术冲击",sp_name:"greenball",path:"6003",TargetType:TargetType.Frontline,
TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人释放魔法弹,造成100%攻击的伤害"},
6004:{uuid:6004,name:"神圣裁决",sp_name:"greenball",path:"6004",TargetType:TargetType.Frontline,
TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人释放圣光弹,造成100%攻击的伤害"},
6005:{uuid:6005,name:"破空斩击",sp_name:"patk",path:"6005",TargetType:TargetType.Frontline,
TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:50,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"攻击前方直线100码内的敌人造成50%伤害"},
6006:{uuid:6006,name:"穿心箭矢",sp_name:"arrow",path:"6006",TargetType:TargetType.Frontline,
TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人释放箭矢,造成100%攻击的伤害"},
6007:{uuid:6007,name:"铁斧打击",sp_name:"mon_ft",path:"6007",TargetType:TargetType.Frontline,
TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"最前方敌人扔出铁斧,造成100%攻击的伤害"},
6008:{uuid:6008,name:"木棍打击",sp_name:"mon_ly",path:"6008",TargetType:TargetType.Frontline,
TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人扔出木棍,造成100%攻击的伤害"},
6009:{uuid:6009,name:"飞刀打击",sp_name:"mon_xd",path:"6009",TargetType:TargetType.Frontline,
TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人扔出飞刀,造成100%攻击的伤害"},
6010:{uuid:6010,name:"石斧打击",sp_name:"mon_sf",path:"6010",TargetType:TargetType.Frontline,
TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,endType:3,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
6011:{uuid:6011,name:"烈火呼吸",sp_name:"firequan",path:"6011",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:3,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:0.5,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤烈焰攻击前方敌人,造成200%攻击的伤害,烈焰维持3秒"},
6012:{uuid:6012,name:"大火球" ,sp_name:"fire",path:"6012",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.linear,endType:1,fname:"max",flash:false,with:50,
debuff:2,depb:20,debtime:2,derate:100,in:1,count:1,def:0,apup:0,ap:300,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧"},
6013:{uuid:6013,name:"火墙", sp_name:"firewall",path:"6013",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:4,endType:1,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:10,count:1,def:0,apup:0,ap:50,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"在最前方敌人位置,召唤一堵火墙,持续10秒,每秒造成50%攻击伤害"},
6014:{uuid:6014,name:"寒冰箭", sp_name:"arrow_blue",path:"6014",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.linear,endType:1,fname:"max",flash:false,with:50,
debuff:1,depb:20,debtime:2,derate:0,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率冰冻敌人"},
6015:{uuid:6015,name:"烈焰射击",sp_name:"arrow_yellow",path:"6015",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,
debuff:3,depb:20,debtime:2,derate:0,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率眩晕敌人"},
6016:{uuid:6016,name:"龙卷风", sp_name:"bwind",path:"6016",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.linear,endType:1,fname:"max",flash:false,with:50,
debuff:8,depb:50,debtime:1,derate:0,in:1,count:1,def:0,apup:0,ap:200,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人"},
6017:{uuid:6017,name:"生命之泉",sp_name:"heath",path:"6017",TargetType:TargetType.Frontline,
TargetGroup:2,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max_blue",flash:true,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:5,count:1,def:0,apup:0,ap:100,mhp:0,hp:3,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"5秒持续为全体友方恢复施法者最大生命值15%的生命"},
6018:{uuid:6018,name:"神圣护盾",sp_name:"shield",path:"6018",TargetType:TargetType.Frontline,
TargetGroup:0,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:0.8,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:30,speed:720,sonsk:0,hero:0,info:"召唤圣盾保护自己,可以抵御3次攻击"},
6019:{uuid:6019,name:"战争咆哮",sp_name:"apup",path:"6019",TargetType:TargetType.Frontline,
TargetGroup:2,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max_red",flash:true,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:1,count:1,def:0,apup:20,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"为全体友方增加施法者攻击力20%的攻击"},
6021:{uuid:6021,name:"死亡射击",sp_name:"shoot2",path:"6021",TargetType:2,
TargetGroup:3,act:"max",CdType:2,AnimType:4,endType:0,fname:"max_blue",flash:true,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:1,count:1,def:0,apup:0,ap:600,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"攻击最后方的敌人,造成600%攻击的伤害"},
6022:{uuid:6022,name:"寒霜之矛",sp_name:"icez",path:"6022",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,
debuff:1,depb:50,debtime:2,derate:0,in:1,count:1,def:0,apup:0,ap:300,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"在最前方敌人位置,召唤冰刺攻击敌人,造成200%攻击的伤害,20%几率冰冻敌人"},
6023:{uuid:6023,name:"冰墙", sp_name:"icet",path:"6023",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,
debuff:8,depb:50,debtime:1,derate:0,in:1,count:1,def:0,apup:0,ap:400,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"在最前方敌人位置,召唤冰墙攻击敌人,造成200%攻击的伤害,50%几率击退敌人"},
6024:{uuid:6024,name:"旋风斩", sp_name:"fwind",path:"6024",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:3,endType:1,fname:"max_red",flash:false,with:50,
debuff:8,depb:50,debtime:1,derate:0,in:2,count:1,def:0,apup:0,ap:80,mhp:0,hp:0,cd:5,buff_cd:0.5,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"旋转武器对周围的敌人造成80%攻击,2秒内旋转4次"},
6025:{uuid:6025,name:"火焰漩涡",sp_name:"fireball",path:"6025",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,
debuff:8,depb:50,debtime:1,derate:0,in:3,count:1,def:0,apup:0,ap:500,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤一个能量球射向前方敌人,对遇到的第一个敌人造成500%攻击的伤害,并击退"},
6026:{uuid:6026,name:"潮汐", sp_name:"watert",path:"6026",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,
debuff:8,depb:50,debtime:2,derate:0,in:3,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"在最前方敌人位置,召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人"},
6027:{uuid:6027,name:"国王霸气",sp_name:"kingba",path:"6027",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:3,endType:1,fname:"max",flash:false,with:50,
debuff:8,depb:100,debtime:2,derate:0,in:3,count:1,def:0,apup:2,ap:400,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"释放霸气攻击周围敌人,造成400%伤害,并100%几率击退敌人"},
6028:{uuid:6028,name:"自然庇佑",sp_name:"heath2",path:"6028",TargetType:TargetType.Frontline,
TargetGroup:2,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max_blue",flash:true,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:2,count:1,def:0,apup:0,ap:100,mhp:0,hp:10,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"为全体友方恢复施法者最大生命值10%的生命,和抵御1次攻击的护盾"},
6029:{uuid:6029,name:"陨石术", sp_name:"fireys",path:"6029",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.fixedEnd,endType:1,fname:"max",flash:false,with:50,
debuff:8,depb:50,debtime:2,derate:0,in:3,count:1,def:0,apup:0,ap:500,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"},
6030:{uuid:6030,name:"闪电呼吸",sp_name:"dianquan",path:"6030",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:3,count:1,def:0,apup:0,ap:100,mhp:0,hp:0,cd:5,buff_cd:0.5,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"召唤闪电攻击前方敌人,造成200%攻击的伤害,烈焰维持3秒"},
6031:{uuid:6031,name:"召唤仆从",sp_name:"zhaohuan",path:"6031",TargetType:TargetType.Frontline,
TargetGroup:0,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max_blue",flash:true,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:2,count:1,def:20,apup:0,ap:70,mhp:0,hp:70,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:5211,info:"召唤一个与施法者等级相同的骷髅战士为我方而战"},
6032:{uuid:6032,name:"自愈", sp_name:"heath_small",path:"6032",TargetType:TargetType.Frontline,
TargetGroup:0,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,
debuff:0,depb:0,debtime:0,derate:0,in:2,count:1,def:0,apup:0,ap:100,mhp:0,hp:5,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"主动:自己回复自身5%最大生命值的生命"},
6033:{uuid:6033,name:"震地裂击",sp_name:"cuida",path:"6033",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,
debuff:4,depb:100,debtime:1,derate:20,in:1,count:1,def:0,apup:0,ap:500,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:6035,hero:0,info:"捶爆前方目标造成300%攻击的伤害震慑敌人本局内全部敌方降低对方10%攻击力"},
6034:{uuid:6034,name:"风暴之矢",sp_name:"bingyu",path:"6034",TargetType:TargetType.Frontline,
TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,endType:1,fname:"max",flash:false,with:50,
debuff:4,depb:100,debtime:1,derate:20,in:1,count:1,def:0,apup:0,ap:80,mhp:0,hp:0,cd:5,buff_cd:1,
hited:0.3,shield:0,speed:720,sonsk:0,hero:0,info:"射出能量暴风箭攻击最前方范围敌人,每波造成80%攻击的伤害"}
};

View File

@@ -1,10 +1,14 @@
import { _decorator, Component, Node } from 'cc';
import { _decorator, Component, Node, Vec3 } from 'cc';
import { oops } from 'db://oops-framework/core/Oops';
import { GameEvent } from '../common/config/GameEvent';
import { geDebuffNum, getBuffNum, BuffAttr, DebuffAttr } from '../common/config/SkillSet';
import { Timer } from 'db://oops-framework/core/common/timer/Timer';
import { FightSet } from '../common/config/Mission';
import { SuperCards, SuperCardsType } from '../common/config/CardSet';
import { ecs } from 'db://oops-framework/libs/ecs/ECS';
import { Skill } from '../skills/Skill';
import { MasterModelComp } from '../hero/MasterModel';
import { HeroViewComp } from '../hero/HeroViewComp';
const { ccclass, property } = _decorator;
@ccclass('FightConComp')
@@ -38,6 +42,16 @@ export class FightConComp extends Component {
card_atk_add:number=0 //卡牌特效 攻击提高攻击力效果 额外添加值
card_hp_add:number=0 //卡牌特效 攻击提高生命值效果 额外添加值
aoe_queues:any[]=[] // 范围伤害技能执行队列
private aoe_timer: number = 0; // 技能执行计时器
private readonly AOE_INTERVAL: number = 0.3; // 执行间隔,单位秒
aoe_pos:Vec3=new Vec3(-280,300,0)
aoe_target_pos:Vec3=new Vec3(180,0,0)
buff_pos:Vec3=new Vec3(-280,100,0)
debuff_pos:Vec3=new Vec3(-280,100,0)
onLoad(){
// console.log("fight con start")
oops.message.on(GameEvent.EquipChange,this.equip_change,this)
@@ -133,7 +147,10 @@ export class FightConComp extends Component {
}
break
case SuperCardsType.AOE:
this.aoe_queues.push({
s_uuid:SuperCards[data.uuid].value1,
count:SuperCards[data.uuid].value2,
damage:SuperCards[data.uuid].value3})
break
case SuperCardsType.BUFF:
@@ -143,6 +160,33 @@ export class FightConComp extends Component {
}
}
private aoe_skill_execute(data:any){
let skill=ecs.getEntity<Skill>(Skill)
let master = ecs.query(ecs.allOf(MasterModelComp))
// 检查必要参数
if (!master || master.length === 0) {
console.error("[FightConComp] 未找到主角实体");
return;
}
let masterView = master[0].get(HeroViewComp);
if (!masterView) {
console.error("[FightConComp] 主角视图组件获取失败");
return;
}
let angle=0
skill.load(
this.aoe_target_pos,
this.node,
data.s_uuid,
this.aoe_target_pos,
masterView,
angle,
data.damage
);
}
private clearAlls() {
this.hero_buff=getBuffNum()
@@ -168,10 +212,24 @@ export class FightConComp extends Component {
this.atk_add_master_hp=0
this.card_atk_add=0
this.card_hp_add=0
this.aoe_queues = [] // 清空技能队列
this.aoe_timer = 0 // 重置计时器
}
update(deltaTime: number) {
// 更新技能执行计时器
if (this.aoe_queues.length > 0) {
this.aoe_timer += deltaTime;
if (this.aoe_timer >= this.AOE_INTERVAL) {
this.aoe_timer = 0;
let skill = this.aoe_queues[0];
this.aoe_skill_execute(skill);
skill.count--;
if (skill.count <= 0) {
this.aoe_queues.shift(); // 移除已完成的技能
}
}
}
}
}

View File

@@ -31,50 +31,81 @@ export class Skill extends ecs.Entity {
angle:number=0,
dmg:number=0
) {
let FIGHTCON=parent.getComponent(FightConComp);
const config = SkillSet[uuid];
if (!config) return;
if (!config) {
console.error("[Skill] 技能配置不存在:", uuid);
return;
}
// 检查施法者
if (!caster) {
console.error("[Skill] 施法者为空");
return;
}
// 加载预制体
const path = `game/skills/${config.sp_name}`;
const prefab = oops.res.get(path, Prefab);
if (!prefab) {
console.error("[Skill] 预制体加载失败:", path);
return;
}
const node = instantiate(prefab);
// 设置节点属性
node.parent = parent;
node.setPosition(startPos);
node.angle+=angle
// console.log("加载预制体:",startPos,targetPos)
console.log("[Skill]:node=>",startPos)
// 添加技能组件
const skillComp = node.getComponent(SkillCom); // 初始化技能参数
skillComp.ap = caster.ap+dmg;
const SComp = node.getComponent(SkillCom); // 初始化技能参数
if (!SComp) {
console.error("[Skill] 技能组件获取失败");
return;
}
console.log("[Skill]:caster=>",caster,config.name+"scomp=>",SComp,"fightcon=>",FIGHTCON)
// 确保caster有必要的属性
if (typeof caster.ap === 'undefined') {
console.error("[Skill] caster.ap 未定义");
return;
}
if (typeof caster.box_group === 'undefined') {
console.error("[Skill] caster.box_group 未定义");
return;
}
SComp.ap = caster.ap*config.ap/100;
if(caster.fac==0){
if(caster.is_master){
skillComp.ap=Math.floor(skillComp.ap*(100+FIGHTCON.hero_buff.ATK)/100);
SComp.ap=Math.floor(SComp.ap*(100+FIGHTCON.hero_buff.ATK)/100);
}else{
skillComp.ap=Math.floor(skillComp.ap*(100+FIGHTCON.friend_buff.ATK)/100);
SComp.ap=Math.floor(SComp.ap*(100+FIGHTCON.friend_buff.ATK)/100);
}
}else{
skillComp.ap=Math.floor(skillComp.ap*(100-FIGHTCON.enemy_buff.ATK)/100);
SComp.ap=Math.floor(SComp.ap*(100-FIGHTCON.enemy_buff.ATK)/100);
}
skillComp.s_uuid = uuid;
skillComp.animType = config.AnimType;
skillComp.endType = config.endType;
skillComp.speed = config.speed;
skillComp.inTime = config.in;
skillComp.atk_count = 0;
skillComp.startPos = startPos
skillComp.targetPos =targetPos
skillComp.caster = caster;
skillComp.prefabName = config.sp_name;
skillComp.group = caster.box_group;
skillComp.fac= caster.box_group==BoxSet.HERO?0:caster.box_group==BoxSet.MONSTER?1:2;
SComp.ap=(100+dmg)/100*SComp.ap // master 主将 技能额外百分比加成
console.log("[Skill]:caster.box_group=>",caster.box_group,config.name+"scomp.group=>",SComp.group)
// 设置技能组件属性
Object.assign(SComp, {
s_uuid: uuid,
animType: config.AnimType,
speed: config.speed,
atk_count: 0,
startPos: startPos,
targetPos: targetPos,
caster: caster,
prefabName: config.sp_name,
group: caster.box_group,
fac: caster.fac,
animName: config.animName
});
// console.log(config.sp_name+"技能配置",skillComp);
// 初始化动画名称
skillComp.animName = config.animName; // 从配置获取动画名称
this.add(skillComp);
this.add(SComp);
}
}

View File

@@ -1,16 +1,16 @@
import { _decorator,Collider2D ,Contact2DType,v3,IPhysics2DContact,Vec3, tween, math, RigidBody2D} from "cc";
import { _decorator,Collider2D ,Contact2DType,v3,IPhysics2DContact,Vec3, tween, math, RigidBody2D, Animation, sp} 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 { smc } from "../common/SingletonModuleComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { GameEvent } from "../common/config/GameEvent";
import { AnimType, endType, SkillSet } from "../common/config/SkillSet";
import { EndAnmCom } from './EndAnmCom';
import { BoxSet } from "../common/config/BoxSet";
import { HeroFac, HeroSet } from "../common/config/heroSet";
import { HeroViewComp } from "../hero/HeroViewComp";
import { BezierMove } from "../BezierMove/BezierMove";
import { FightConComp } from "../map/FightConComp";
import { MonModelComp } from "../hero/MonModelComp";
const { ccclass, property } = _decorator;
@@ -29,8 +29,6 @@ export class SkillCom extends CCComp {
is_destroy:boolean = false;
enemys:any = [];
animType: number = 0; // 运动类型
endType: number = 0; // 结束类型
inTime: number = 0; // 持续时间
startPos: Vec3 = v3(); // 起始位置
targetPos: Vec3 = v3(); // 目标位置
duration: number = 0; // 技能持续时间
@@ -55,32 +53,56 @@ export class SkillCom extends CCComp {
oops.message.on(GameEvent.MissionEnd, this.doDestroy, this);
this.node.active = true;
let collider = this.getComponent(Collider2D);
// console.log(this.group +"技能 collider ",collider);
collider.group = this.group;
if (collider) {
if(collider) {
collider.group = this.group;
collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
}
if(SkillSet[this.s_uuid].AnimType==AnimType.parabolic){
this.node.angle +=10
let bm=this.node.getComponent(BezierMove)
// bm.speed=700
if(this.group==BoxSet.MONSTER) bm.controlPointSide=-1
bm.moveTo(this.targetPos)
}
if(SkillSet[this.s_uuid].AnimType==AnimType.linear){
let tx =400
if(this.group==BoxSet.MONSTER){
tx=-400
this.node.scale=v3(this.node.scale.x*-1,1,1)
// console.log(this.group +"技能 collider ",collider);
switch(SkillSet[this.s_uuid].AnimType){
case AnimType.parabolic:
this.node.angle +=10
let bm=this.node.getComponent(BezierMove)
// bm.speed=700
if(this.group==BoxSet.MONSTER) bm.controlPointSide=-1
bm.moveTo(this.targetPos)
break;
case AnimType.linear:
let tx =400
if(this.group==BoxSet.MONSTER){
tx=-400
this.node.scale=v3(this.node.scale.x*-1,1,1)
}
tween(this.node).to(1, { position:v3(tx,this.node.position.y,0)},{
onComplete: (target?: object) => {
this.node.setPosition(tx,this.node.position.y-300,0)
}
}).start()
break;
case AnimType.fixed:
break;
case AnimType.fixedStart:
break;
case AnimType.fixedEnd:
if(this.node.getComponent(Animation)){
let anim = this.node.getComponent(Animation);
console.log("has anim",anim)
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
}
if(this.node.getChildByName('anm')){
if(this.node.getChildByName('anm').getComponent('sp.Skeleton')){
var spine = this.node.getChildByName('anm').getComponent('sp.Skeleton') as sp.Skeleton;
console.log("has spine",spine)
spine.setCompleteListener((trackEntry) => {
this.onAnimationFinished()
console.log("[track %s][animation %s] complete: %s", trackEntry.trackIndex);
});
}
}
break;
}
tween(this.node).to(1, { position:v3(tx,this.node.position.y,0)},{
onComplete: (target?: object) => {
this.node.setPosition(tx,this.node.position.y-300,0)
}
}).start()
}
// let dir_x = this.targetPos.x > this.node.position.x ? 1 : -1
// this.node.scale = v3(dir_x,1,1)
// 根据目标位置设置节点朝向
@@ -120,6 +142,21 @@ export class SkillCom extends CCComp {
// this.startMovement();
// console.log("skill start",this.node.parent)
}
onAnimationFinished(){
let remainingDamage = this.ap;
remainingDamage=remainingDamage*(100-this.FIGHTCON.enemy_buff.DEF+this.FIGHTCON.enemy_debuff.BURN)/100
let enemys=ecs.query(ecs.allOf(MonModelComp))
console.log("onAnimationFinished",enemys)
enemys.forEach(entity => {
let view=entity.get(HeroViewComp)
if(view){
view.do_atked(remainingDamage)
}
});
this.is_destroy=true
}
onBeginContact (seCol: Collider2D, oCol: Collider2D) {
// console.log(this.scale+"碰撞开始 ",seCol,oCol);
@@ -141,22 +178,6 @@ export class SkillCom extends CCComp {
private startMovement() {
switch(SkillSet[this.s_uuid].AnimType) {
case AnimType.parabolic:
this.startBezierMove();
break;
case AnimType.fixed:
this.startFixedMove();
break;
case AnimType.fixedStart:
this.startFixedStartMove();
break;
case AnimType.fixedEnd:
this.startFixedEndMove();
break;
}
}
private startLinearMove(dt: number) {
@@ -188,51 +209,7 @@ export class SkillCom extends CCComp {
// }).start();
}
private startFixedMove() {
if (this.endType === endType.timeEnd) {
tween(this.node)
.delay(this.inTime)
.call(() => this.is_destroy = true)
.start();
} else if (this.endType === endType.animationEnd) {
if (!this.node.getComponent(EndAnmCom)) {
this.node.addComponent(EndAnmCom);
}
}
}
private startFixedStartMove() {
// console.log("开始固定起点运动")
this.node.position = this.startPos;
if (this.endType === endType.timeEnd) {
// console.log("开始固定起点运动=>time:"+this.inTime)
tween(this.node)
.delay(this.inTime)
.call(() => this.is_destroy = true)
.start();
} else if (this.endType === endType.animationEnd) {
if (!this.node.getComponent(EndAnmCom)) {
this.node.addComponent(EndAnmCom);
}
}
}
private startFixedEndMove() {
// console.log("开始固定终点运动")
this.node.position = this.targetPos;
if (this.endType === endType.timeEnd) {
// console.log("开始固定终点运动=>time:"+this.inTime)
tween(this.node)
.delay(this.inTime)
.call(() => this.is_destroy = true)
.start();
} else if (this.endType === endType.animationEnd) {
if (!this.node.getComponent(EndAnmCom)) {
this.node.addComponent(EndAnmCom);
}
}
}
public static bezierTo(target: any, duration: number, c1: Vec3, c2: Vec3, to: Vec3, opts: any) {
opts = opts || Object.create(null);
/*
@@ -285,9 +262,7 @@ export class SkillCom extends CCComp {
reset() {
this.is_destroy = false;
this.animType = 0;
this.endType = 0;
this.speed = 0;
this.inTime = 0;
this.startPos.set();
this.targetPos.set();
this.moveDirection = null; // 重置移动方向