From a31710e2d9a91091650efc14195196f989f1cdfb Mon Sep 17 00:00:00 2001 From: panw Date: Fri, 20 Jun 2025 10:26:28 +0800 Subject: [PATCH] dd --- assets/script/game/common/config/SkillSet.ts | 83 +++++++++--------- assets/script/game/hero/SkillConComp.ts | 89 +++++++++++--------- assets/script/game/map/FightConComp.ts | 24 +++++- assets/script/game/skills/SkillCom.ts | 8 +- assets/script/todo.md | 2 +- 5 files changed, 120 insertions(+), 86 deletions(-) diff --git a/assets/script/game/common/config/SkillSet.ts b/assets/script/game/common/config/SkillSet.ts index 68b00a31..10ede595 100644 --- a/assets/script/game/common/config/SkillSet.ts +++ b/assets/script/game/common/config/SkillSet.ts @@ -1,7 +1,7 @@ export enum TargetGroup { Self = 0, // 自身 - Ally = 1, // 友方单位 - Team = 2, // 整个队伍 + Ally = 1, // 所有敌人 + Team = 2, // 所有友方 Enemy = 3, // 敌方单位 All = 4 // 所有单位 } @@ -41,10 +41,15 @@ export enum CdType { //技能释放cd: 0:技能配置的cd,1:HeroViewComp.cd 值,2:HeroViewComp.pw:0值,当HeroViewComppw==HeroViewComp.pwm值是 释放 export enum AnimType { linear = 0, // 直线 - parabolic = 1, // 抛物线 贝塞尔 - fixed = 2, // 固定位置 - fixedStart = 3, // 固定在出发点 - fixedEnd = 4, // 固定在终点 + parabolic = 1, // 抛射物 + fixedStart = 2, // 固定在出发点 + fixedEnd = 3, // 固定在终点 +} + +export enum RunType { + linear = 0, //直线 + bezier = 1, //贝塞尔 + fixed = 2, //固定 } export enum endType { @@ -134,135 +139,135 @@ 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, + TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,RunType:RunType.linear,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, + TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"atk",CdType:1,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.fixedEnd,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:2,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:0,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:2,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.fixedEnd,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.fixedStart,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.fixedStart,RunType:RunType.bezier,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, + TargetGroup:2,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.fixedEnd,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:0,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:0,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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, + TargetGroup:3,act:"max",CdType:2,AnimType:AnimType.parabolic,RunType:RunType.bezier,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%攻击的伤害"} }; \ No newline at end of file diff --git a/assets/script/game/hero/SkillConComp.ts b/assets/script/game/hero/SkillConComp.ts index 4ce0e72d..e44f0afe 100644 --- a/assets/script/game/hero/SkillConComp.ts +++ b/assets/script/game/hero/SkillConComp.ts @@ -9,6 +9,8 @@ import { BoxSet, FacSet } from '../common/config/BoxSet'; import { smc } from '../common/SingletonModuleComp'; import { CCComp } from 'db://oops-framework/module/common/CCComp'; import { FightConComp } from '../map/FightConComp'; +import { MonModelComp } from './MonModelComp'; +import { HeroModelComp } from './HeroModelComp'; const { ccclass, property } = _decorator; @ccclass('SkillCon') @@ -87,19 +89,9 @@ export class SkillConComp extends CCComp { /** 施放技能 */ castSkill(config: typeof SkillSet[keyof typeof SkillSet],count:number=1,dmg:number=0) { // console.log(view.uuid+"=>"+view.hero_name+"施放技能:"+config.uuid); - if (config.TargetGroup === TargetGroup.Enemy) { - this.HeroView.playSkillEffect(config.uuid); + this.doSkill(config,count,dmg); - } - - if (config.TargetGroup === TargetGroup.Ally) { - const targets = this.selectAllyTargets( config); - if (targets.length === 0) return; - this.doSkill(config,count,dmg); - } - if (config.TargetGroup === TargetGroup.Self) { - this.doSkill(config,count,dmg); - } + } private doSkill(config: typeof SkillSet[keyof typeof SkillSet],count:number=1,angle:number=0,dmg:number=0) { @@ -107,9 +99,27 @@ export class SkillConComp extends CCComp { if (!this.node || !this.node.isValid || !this.HeroView || !this.HeroView.node || !this.HeroView.node.isValid) { return; } + let targets:any=null + switch(config.TargetGroup){ + case TargetGroup.Enemy: //单个敌人 + targets = this.filterFrontRow(); + break + case TargetGroup.Ally: //所有敌人 + targets = this.selectAllyTargets(); + break + case TargetGroup.Self: //自身 + targets = this.HeroView.ent + break + case TargetGroup.Team: //所有友方 + + break + case TargetGroup.All: //所有单位 + + break + } + const skillEntity = ecs.getEntity(Skill); - const targets = this.selectEnemyTargets(config); if (targets.length === 0) return; const timerId = setTimeout(() => { @@ -145,46 +155,49 @@ export class SkillConComp extends CCComp { this._timers[`skill_${config.uuid}`] = timerId; } - private selectEnemyTargets(config: typeof SkillSet[keyof typeof SkillSet]): ecs.Entity[] { - const team = this.HeroView.fac; - const isEnemyTeam = team === FacSet.HERO ? FacSet.MON : FacSet.HERO; - const candidates= ecs.query(ecs.allOf(HeroViewComp)).filter(e => e.get(HeroViewComp).fac !== team); - return this.filterFrontRow(candidates, isEnemyTeam); - } + /** 筛选最前排单位 */ - private filterFrontRow(entities: ecs.Entity[], isEnemyTeam: number): ecs.Entity[] { + private filterFrontRow(): ecs.Entity[] { // 敌方最前排是x坐标最大的,我方最前排是x坐标最小的 - const keyPos = isEnemyTeam ? + let entities:any=null + if(this.HeroView.fac==FacSet.HERO){ + entities = ecs.query(ecs.allOf(MonModelComp)) + }else{ + entities = ecs.query(ecs.allOf(HeroModelComp)) + } + + let keyPos = this.HeroView.fac==FacSet.HERO ? Math.min(...entities.map(e => e.get(HeroViewComp).node.position.x)) : Math.max(...entities.map(e => e.get(HeroViewComp).node.position.x)); return entities.filter(e => Math.abs(e.get(HeroViewComp).node.position.x - keyPos) < 10 - ); + ) } - private selectAllyTargets( config: typeof SkillSet[keyof typeof SkillSet]): ecs.Entity[] { - const team = this.HeroView.fac; - const candidates= ecs.query(ecs.allOf(HeroViewComp)).filter(e => e.get(HeroViewComp).fac === team); - // 第二阶段:位置/血量等精细筛选 - switch(config.TargetType) { - case TargetType.Melee: - return candidates.filter(e => e.get(HeroViewComp).type === 0); - case TargetType.Ranged: - return candidates.filter(e => e.get(HeroViewComp).type === 1); - case TargetType.SupportClass: - return candidates.filter(e => e.get(HeroViewComp).type === 2); - case TargetType.Random: - return this.pickRandomTarget(candidates, config.count || 1); - default: - return candidates; + + private selectAllyTargets( ): ecs.Entity[] { + if(this.HeroView.fac==FacSet.HERO){ + return ecs.query(ecs.allOf(MonModelComp)) + }else{ + return ecs.query(ecs.allOf(MonModelComp)) + } } + /** 随机选择目标 */ - private pickRandomTarget(entities: ecs.Entity[], count: number): ecs.Entity[] { + private pickRandomTarget(count: number): ecs.Entity[] { + let entities:any=null + if(this.HeroView.fac==FacSet.HERO){ + entities = ecs.query(ecs.allOf(MonModelComp)) + }else{ + entities = ecs.query(ecs.allOf(HeroModelComp)) + } const shuffled = [...entities].sort(() => 0.5 - Math.random()); return shuffled.slice(0, count); } + + public clear_timer() { // console.log("clear_timer"); Object.values(this._timers).forEach(clearTimeout); diff --git a/assets/script/game/map/FightConComp.ts b/assets/script/game/map/FightConComp.ts index 55fdc3fa..5e39ff7c 100644 --- a/assets/script/game/map/FightConComp.ts +++ b/assets/script/game/map/FightConComp.ts @@ -9,6 +9,7 @@ import { ecs } from 'db://oops-framework/libs/ecs/ECS'; import { Skill } from '../skills/Skill'; import { MasterModelComp } from '../hero/MasterModel'; import { HeroViewComp } from '../hero/HeroViewComp'; +import { MonModelComp } from '../hero/MonModelComp'; const { ccclass, property } = _decorator; @ccclass('FightConComp') @@ -45,7 +46,7 @@ export class FightConComp extends Component { aoe_queues:any[]=[] // 范围伤害技能执行队列 private aoe_timer: number = 0; // 技能执行计时器 - private readonly AOE_INTERVAL: number = 0.3; // 执行间隔,单位秒 + private readonly AOE_INTERVAL: number = 0.4; // 执行间隔,单位秒 aoe_pos:Vec3=new Vec3(-280,300,0) aoe_target_pos:Vec3=new Vec3(180,0,0) @@ -175,19 +176,34 @@ export class FightConComp extends Component { console.error("[FightConComp] 主角视图组件获取失败"); return; } - + let angle=0 + let targets = this.pickRandomTarget(data.count) + let target_pos= new Vec3(0,0,0) + if(targets.length==0){ + target_pos=this.aoe_target_pos + }else{ + target_pos= new Vec3(targets[0].get(HeroViewComp).node.position.x,targets[0].get(HeroViewComp).node.position.y,0) + } + skill.load( - this.aoe_target_pos, + this.aoe_pos, this.node, data.s_uuid, - this.aoe_target_pos, + target_pos, masterView, angle, data.damage ); } + /** 随机选择目标 */ + private pickRandomTarget(count: number=1): ecs.Entity[] { + let entities = ecs.query(ecs.allOf(MonModelComp)) + const shuffled = [...entities].sort(() => 0.5 - Math.random()); + return shuffled.slice(0, count); + } + private clearAlls() { this.hero_buff=getBuffNum() this.friend_buff=getBuffNum() diff --git a/assets/script/game/skills/SkillCom.ts b/assets/script/game/skills/SkillCom.ts index e7810eeb..50bda294 100644 --- a/assets/script/game/skills/SkillCom.ts +++ b/assets/script/game/skills/SkillCom.ts @@ -4,7 +4,7 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu 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 { AnimType, endType, RunType, SkillSet } from "../common/config/SkillSet"; import { BoxSet } from "../common/config/BoxSet"; import { HeroFac, HeroSet } from "../common/config/heroSet"; import { HeroViewComp } from "../hero/HeroViewComp"; @@ -64,6 +64,8 @@ export class SkillCom extends CCComp { let bm=this.node.getComponent(BezierMove) // bm.speed=700 if(this.group==BoxSet.MONSTER) bm.controlPointSide=-1 + if(SkillSet[this.s_uuid].RunType==RunType.linear) bm.controlPointOffset=0 + bm.moveTo(this.targetPos) break; case AnimType.linear: @@ -77,14 +79,12 @@ export class SkillCom extends CCComp { this.node.setPosition(tx,this.node.position.y-300,0) } }).start() - break; - case AnimType.fixed: - break; case AnimType.fixedStart: break; case AnimType.fixedEnd: + this.node.setPosition(this.targetPos.x,this.targetPos.y,0) if(this.node.getComponent(Animation)){ let anim = this.node.getComponent(Animation); console.log("has anim",anim) diff --git a/assets/script/todo.md b/assets/script/todo.md index bab7b70e..4db252b8 100644 --- a/assets/script/todo.md +++ b/assets/script/todo.md @@ -24,7 +24,7 @@ - [ ] 卡牌设定,卡牌icon - [ ] 清理技能动画 及设置 - [ ] 伙伴特殊技能设定 -- [ ] +- [ ] 技能需要重新设计 - [ ] - [ ] - [ ]