From 1482e9989a06145ee3971eaee6d6897c190fea73 Mon Sep 17 00:00:00 2001 From: panw Date: Fri, 8 Aug 2025 16:36:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=BF=87=E5=B8=A7=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=20=E5=AE=9E=E7=8E=B0=E6=8A=80=E8=83=BD=E7=9A=84=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E4=BC=A4=E5=AE=B3=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/resources/game/skills/anm/atk2.anim | 43 +++++++- assets/resources/game/skills/atk2.prefab | 100 +++-------------- .../resources/game/skills/max_fireatk.prefab | 101 +++++------------- assets/script/game/common/config/SkillSet.ts | 54 +++++----- assets/script/game/skills/Skill.ts | 2 + assets/script/game/skills/SkillCom.ts | 2 + assets/script/game/skills/com/AtkCom.ts | 48 ++++++++- 7 files changed, 157 insertions(+), 193 deletions(-) diff --git a/assets/resources/game/skills/anm/atk2.anim b/assets/resources/game/skills/anm/atk2.anim index f7996ca5..5db18485 100644 --- a/assets/resources/game/skills/anm/atk2.anim +++ b/assets/resources/game/skills/anm/atk2.anim @@ -31,7 +31,48 @@ } ], "_exoticAnimation": null, - "_events": [], + "_events": [ + { + "frame": 0.20833333333333334, + "func": "", + "params": [] + }, + { + "frame": 0.20833333333333334, + "func": "atk", + "params": [] + }, + { + "frame": 0.375, + "func": "", + "params": [] + }, + { + "frame": 0.375, + "func": "atk", + "params": [] + }, + { + "frame": 0.5416666666666666, + "func": "", + "params": [] + }, + { + "frame": 0.5416666666666666, + "func": "atk", + "params": [] + }, + { + "frame": 0.7916666666666666, + "func": "", + "params": [] + }, + { + "frame": 0.7916666666666666, + "func": "atk", + "params": [] + } + ], "_embeddedPlayers": [], "_additiveSettings": { "__id__": 31 diff --git a/assets/resources/game/skills/atk2.prefab b/assets/resources/game/skills/atk2.prefab index bcbc391c..c781ab8d 100644 --- a/assets/resources/game/skills/atk2.prefab +++ b/assets/resources/game/skills/atk2.prefab @@ -24,21 +24,21 @@ ], "_active": true, "_components": [ + { + "__id__": 8 + }, + { + "__id__": 10 + }, { "__id__": 12 }, { "__id__": 14 - }, - { - "__id__": 16 - }, - { - "__id__": 18 } ], "_prefab": { - "__id__": 20 + "__id__": 16 }, "_lpos": { "__type__": "cc.Vec3", @@ -85,16 +85,10 @@ }, { "__id__": 5 - }, - { - "__id__": 7 - }, - { - "__id__": 9 } ], "_prefab": { - "__id__": 11 + "__id__": 7 }, "_lpos": { "__type__": "cc.Vec3", @@ -198,74 +192,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "12eKc8gltBz50frJCS5+ww" }, - { - "__type__": "cc.RigidBody2D", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 2 - }, - "_enabled": true, - "__prefab": { - "__id__": 8 - }, - "enabledContactListener": false, - "bullet": false, - "awakeOnLoad": true, - "_group": 1, - "_type": 2, - "_allowSleep": true, - "_gravityScale": 1, - "_linearDamping": 0, - "_angularDamping": 0, - "_linearVelocity": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_angularVelocity": 0, - "_fixedRotation": false, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "98cPYmJhNA4J/GZdhUWQGv" - }, - { - "__type__": "cc.BoxCollider2D", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 2 - }, - "_enabled": true, - "__prefab": { - "__id__": 10 - }, - "tag": 0, - "_group": 1, - "_density": 1, - "_sensor": false, - "_friction": 0.2, - "_restitution": 0, - "_offset": { - "__type__": "cc.Vec2", - "x": 43.5, - "y": 48.5 - }, - "_size": { - "__type__": "cc.Size", - "width": 87, - "height": 97 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "63V4BzNKRDzYi3gYIKcuRs" - }, { "__type__": "cc.PrefabInfo", "root": { @@ -289,11 +215,11 @@ }, "_enabled": true, "__prefab": { - "__id__": 13 + "__id__": 9 }, "_contentSize": { "__type__": "cc.Size", - "width": 240, + "width": 180, "height": 100 }, "_anchorPoint": { @@ -317,7 +243,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 15 + "__id__": 11 }, "_id": "" }, @@ -335,7 +261,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 17 + "__id__": 13 }, "playOnLoad": true, "_clips": [ @@ -365,7 +291,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 19 + "__id__": 15 }, "_id": "" }, diff --git a/assets/resources/game/skills/max_fireatk.prefab b/assets/resources/game/skills/max_fireatk.prefab index 11728371..e43fa3e3 100644 --- a/assets/resources/game/skills/max_fireatk.prefab +++ b/assets/resources/game/skills/max_fireatk.prefab @@ -50,13 +50,10 @@ }, { "__id__": 40 - }, - { - "__id__": 42 } ], "_prefab": { - "__id__": 44 + "__id__": 42 }, "_lpos": { "__type__": "cc.Vec3", @@ -73,8 +70,8 @@ }, "_lscale": { "__type__": "cc.Vec3", - "x": 1.4, - "y": 1.4, + "x": 1, + "y": 1, "z": 1 }, "_mobility": 0, @@ -766,7 +763,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 120, + "width": 320, "height": 80 }, "_anchorPoint": { @@ -798,74 +795,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "8ahZv91itPcYJm8S0veHYl" }, - { - "__type__": "cc.RigidBody2D", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 37 - }, - "enabledContactListener": true, - "bullet": false, - "awakeOnLoad": true, - "_group": 1, - "_type": 1, - "_allowSleep": false, - "_gravityScale": 1, - "_linearDamping": 0, - "_angularDamping": 0, - "_linearVelocity": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_angularVelocity": 0, - "_fixedRotation": false, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "59HK6AcrdOhbxkRsbxWQ3l" - }, - { - "__type__": "cc.BoxCollider2D", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 39 - }, - "tag": 0, - "_group": 4, - "_density": 1, - "_sensor": true, - "_friction": 0.2, - "_restitution": 0, - "_offset": { - "__type__": "cc.Vec2", - "x": 0, - "y": 0 - }, - "_size": { - "__type__": "cc.Size", - "width": 180, - "height": 80 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "e4gDUfAyNDN6GrEPB169Le" - }, { "__type__": "f680dkagx9PmbfqtF463/Ua", "_name": "", @@ -876,7 +805,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 41 + "__id__": 37 }, "speed": 600, "controlPointSide": 1, @@ -910,7 +839,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 43 + "__id__": 39 }, "playOnLoad": true, "_clips": [ @@ -929,6 +858,24 @@ "__type__": "cc.CompPrefabInfo", "fileId": "b2FPQXFCNH7alJWxanESql" }, + { + "__type__": "b1d8e1ZA0dLtqufhidnFK/K", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 41 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "3f9AguZxZMjI22amsER6pF" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/script/game/common/config/SkillSet.ts b/assets/script/game/common/config/SkillSet.ts index 3d986de2..3d3bfa2e 100644 --- a/assets/script/game/common/config/SkillSet.ts +++ b/assets/script/game/common/config/SkillSet.ts @@ -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%几率击退敌人"}, }; \ No newline at end of file diff --git a/assets/script/game/skills/Skill.ts b/assets/script/game/skills/Skill.ts index 5ffa7d65..3646a249 100644 --- a/assets/script/game/skills/Skill.ts +++ b/assets/script/game/skills/Skill.ts @@ -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, diff --git a/assets/script/game/skills/SkillCom.ts b/assets/script/game/skills/SkillCom.ts index 5ada5d93..5a1ee993 100644 --- a/assets/script/game/skills/SkillCom.ts +++ b/assets/script/game/skills/SkillCom.ts @@ -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; diff --git a/assets/script/game/skills/com/AtkCom.ts b/assets/script/game/skills/com/AtkCom.ts index a1b4db4b..09ae9040 100644 --- a/assets/script/game/skills/com/AtkCom.ts +++ b/assets/script/game/skills/com/AtkCom.ts @@ -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) {