diff --git a/assets/resources/game/skill/anm/atk01.anim b/assets/resources/game/skill/anm/atk01.anim index 9e200439..cd0050bb 100644 --- a/assets/resources/game/skill/anm/atk01.anim +++ b/assets/resources/game/skill/anm/atk01.anim @@ -88,7 +88,7 @@ "__type__": "cc.RealCurve", "_times": [ 0, - 0.1 + 0.10000000149011612 ], "_values": [ { @@ -129,7 +129,7 @@ "__type__": "cc.RealCurve", "_times": [ 0, - 0.1 + 0.10000000149011612 ], "_values": [ { @@ -170,7 +170,7 @@ "__type__": "cc.RealCurve", "_times": [ 0, - 0.1 + 0.10000000149011612 ], "_values": [ { @@ -267,8 +267,8 @@ { "__type__": "cc.RealCurve", "_times": [ - 0.06666666666666667, - 0.1 + 0.06666667014360428, + 0.10000000149011612 ], "_values": [ { @@ -308,8 +308,8 @@ { "__type__": "cc.RealCurve", "_times": [ - 0.06666666666666667, - 0.1 + 0.06666667014360428, + 0.10000000149011612 ], "_values": [ { @@ -349,8 +349,8 @@ { "__type__": "cc.RealCurve", "_times": [ - 0.06666666666666667, - 0.1 + 0.06666667014360428, + 0.10000000149011612 ], "_values": [ { @@ -390,8 +390,8 @@ { "__type__": "cc.RealCurve", "_times": [ - 0.06666666666666667, - 0.1 + 0.06666667014360428, + 0.10000000149011612 ], "_values": [ { diff --git a/assets/resources/game/skill/atk/atk_s1.prefab b/assets/resources/game/skill/atk/atk_s1.prefab index 7c49e4e7..4f089b5a 100644 --- a/assets/resources/game/skill/atk/atk_s1.prefab +++ b/assets/resources/game/skill/atk/atk_s1.prefab @@ -32,10 +32,13 @@ }, { "__id__": 16 + }, + { + "__id__": 18 } ], "_prefab": { - "__id__": 18 + "__id__": 20 }, "_lpos": { "__type__": "cc.Vec3", @@ -348,12 +351,49 @@ "__prefab": { "__id__": 17 }, + "atk_x": 0, + "atk_y": 0, + "runType": 2, "_id": "" }, { "__type__": "cc.CompPrefabInfo", "fileId": "35nW0iQNBH2bqkWAr3MVkQ" }, + { + "__type__": "f680dkagx9PmbfqtF463/Ua", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 19 + }, + "speed": 600, + "controlPointSide": 1, + "controlPointOffset": 0.5, + "controlPointRandomness": 0.3, + "autoRotate": false, + "showTrajectory": false, + "trajectoryColor": { + "__type__": "cc.Color", + "r": 0, + "g": 255, + "b": 0, + "a": 255 + }, + "trajectoryWidth": 3, + "easing": "linear", + "rotationSmoothness": 0.6, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "defJ3noEdMUapDOKtsHbd+" + }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/skill/atk/atk_s2.prefab b/assets/resources/game/skill/atk/atk_s2.prefab index b49caf45..af71b1f3 100644 --- a/assets/resources/game/skill/atk/atk_s2.prefab +++ b/assets/resources/game/skill/atk/atk_s2.prefab @@ -32,10 +32,13 @@ }, { "__id__": 16 + }, + { + "__id__": 18 } ], "_prefab": { - "__id__": 18 + "__id__": 20 }, "_lpos": { "__type__": "cc.Vec3", @@ -337,7 +340,7 @@ "fileId": "c2RDvksalG2acL3tyGCY0t" }, { - "__type__": "411a8xY2rNF1JLZn+Qgqfqg", + "__type__": "57aabs7TE1J5obTAZczc+64", "_name": "", "_objFlags": 0, "__editorExtras__": {}, @@ -348,13 +351,48 @@ "__prefab": { "__id__": 17 }, - "anmEnd": true, - "cbox": false, + "atk_x": 0, + "atk_y": 0, + "runType": 2, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "157f8YWOhK6pBg6CBgHHww" + "fileId": "d5JH7ab9FFTom8jDJ+NV7X" + }, + { + "__type__": "f680dkagx9PmbfqtF463/Ua", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 19 + }, + "speed": 600, + "controlPointSide": 1, + "controlPointOffset": 0.5, + "controlPointRandomness": 0.3, + "autoRotate": false, + "showTrajectory": false, + "trajectoryColor": { + "__type__": "cc.Color", + "r": 0, + "g": 255, + "b": 0, + "a": 255 + }, + "trajectoryWidth": 3, + "easing": "linear", + "rotationSmoothness": 0.6, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9dSsPtEr1Pqq67XvXHcebu" }, { "__type__": "cc.PrefabInfo", diff --git a/assets/resources/game/skill/atk/atk_s3.prefab b/assets/resources/game/skill/atk/atk_s3.prefab index 3d2a13a2..a2727b5e 100644 --- a/assets/resources/game/skill/atk/atk_s3.prefab +++ b/assets/resources/game/skill/atk/atk_s3.prefab @@ -32,10 +32,13 @@ }, { "__id__": 16 + }, + { + "__id__": 18 } ], "_prefab": { - "__id__": 18 + "__id__": 20 }, "_lpos": { "__type__": "cc.Vec3", @@ -337,7 +340,7 @@ "fileId": "c2RDvksalG2acL3tyGCY0t" }, { - "__type__": "411a8xY2rNF1JLZn+Qgqfqg", + "__type__": "57aabs7TE1J5obTAZczc+64", "_name": "", "_objFlags": 0, "__editorExtras__": {}, @@ -348,13 +351,48 @@ "__prefab": { "__id__": 17 }, - "anmEnd": true, - "cbox": false, + "atk_x": 0, + "atk_y": 0, + "runType": 2, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "157f8YWOhK6pBg6CBgHHww" + "fileId": "60LInmZXxDtKu79AshRG9j" + }, + { + "__type__": "f680dkagx9PmbfqtF463/Ua", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 19 + }, + "speed": 600, + "controlPointSide": 1, + "controlPointOffset": 0.5, + "controlPointRandomness": 0.3, + "autoRotate": false, + "showTrajectory": false, + "trajectoryColor": { + "__type__": "cc.Color", + "r": 0, + "g": 255, + "b": 0, + "a": 255 + }, + "trajectoryWidth": 3, + "easing": "linear", + "rotationSmoothness": 0.6, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "65YLwe9t9EXo5kI3HQEGhs" }, { "__type__": "cc.PrefabInfo", diff --git a/assets/script/game/common/config/SkillSet.ts b/assets/script/game/common/config/SkillSet.ts index c3396c09..8d588dd9 100644 --- a/assets/script/game/common/config/SkillSet.ts +++ b/assets/script/game/common/config/SkillSet.ts @@ -154,6 +154,11 @@ export const SkillSet: Record = { ap:100,cd:1,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:0,with:0,ready:0,endAnm:0,RType:RType.fixed, buffs:[],neAttrs:[],info:"向最前方敌人扔出石斧,造成100%攻击的伤害", }, + 6002: { + uuid:6002,name:"挥砍",sp_name:"atk_s2",AtkedName:AtkedName.atked,path:"3036",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,DType:DType.ATK, + ap:100,cd:1,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:0,with:0,ready:0,endAnm:0,RType:RType.fixed, + buffs:[],neAttrs:[],info:"向最前方敌人扔出石斧,造成100%攻击的伤害", + }, 6005: { uuid:6005,name:"火球术",sp_name:"atk_fire1",AtkedName:AtkedName.atked,path:"3039",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,DType:DType.MAGE, ap:100,cd:5,t_num:1,hit_num:1,hit:2,hitcd:0.3,speed:720,cost:20,with:90,ready:8001,endAnm:9001,RType:RType.linear, diff --git a/assets/script/game/common/config/heroSet.ts b/assets/script/game/common/config/heroSet.ts index 08bb3081..40e5c494 100644 --- a/assets/script/game/common/config/heroSet.ts +++ b/assets/script/game/common/config/heroSet.ts @@ -99,37 +99,37 @@ export const HeroInfo: Record = { // 刘邦 - 领导型战士(善于用人,知人善任) 5001:{uuid:5001,name:"刘邦",path:"hk1", fac:FacSet.HERO, kind:1, - type:HType.warrior,lv:1,hp:125,mp:85,map:10,def:9,mdef:0,ap:15,dis:100,speed:120,skills:[6001,6005], + type:HType.warrior,lv:1,hp:125,mp:85,map:10,def:9,mdef:0,ap:15,dis:100,speed:120,skills:[6001], buff:[],tal:[7101,7201,7301],info:"楚汉争霸领袖,领导统御型战士"}, // 荆轲 - 刺客(敏捷型,高速度和暴击率) 5002:{uuid:5002,name:"荆轲",path:"hc1", fac:FacSet.HERO, kind:1, - type:HType.assassin,lv:1,hp:80,mp:60,map:5,def:3,mdef:0,ap:22,dis:120,speed:180,skills:[6001,6005], + type:HType.assassin,lv:1,hp:80,mp:60,map:5,def:3,mdef:0,ap:22,dis:120,speed:180,skills:[6001], buff:[],tal:[7201],info:"战国刺客,刺杀专精敏捷型刺客"}, // 赵武灵王 - 远程射手(胡服骑射,机动型高移动速度和远程攻击) 5005:{uuid:5005,name:"赵武灵王",path:"ha1", fac:FacSet.HERO, kind:2, - type:HType.remote,lv:1,hp:100,mp:80,map:8,def:6,mdef:0,ap:18,dis:450,speed:140,skills:[6001,6005], + type:HType.remote,lv:1,hp:100,mp:80,map:8,def:6,mdef:0,ap:18,dis:450,speed:140,skills:[6001], buff:[],tal:[7002],info:"胡服骑射改革者,机动型高远程输出"}, // 张良 - 智谋法师(运筹帷幄,智谋型法师) 5007:{uuid:5007,name:"张良",path:"hh1", fac:FacSet.HERO, kind:2, - type:HType.mage,lv:1,hp:88,mp:135,map:12,def:5,mdef:0,ap:15,dis:350,speed:100,skills:[6001,6005], + type:HType.mage,lv:1,hp:88,mp:135,map:12,def:5,mdef:0,ap:15,dis:350,speed:100,skills:[6001], buff:[],tal:[7004],info:"运筹帷幄谋士,智谋型法师"}, // 屈原 - 元素法师(离骚诗韵,元素型高魔法输出) 5008:{uuid:5008,name:"屈原",path:"hm1", fac:FacSet.HERO, kind:2, - type:HType.mage,lv:1,hp:85,mp:140,map:25,def:4,mdef:0,ap:16,dis:400,speed:90,skills:[6001,6005], + type:HType.mage,lv:1,hp:85,mp:140,map:25,def:4,mdef:0,ap:16,dis:400,speed:90,skills:[6001], buff:[],tal:[7101],info:"离骚诗韵,元素型高魔法输出"}, // 孙膑 - 谋略法师(兵法谋略,谋略型法师) 5009:{uuid:5009,name:"孙膑",path:"hm2", fac:FacSet.HERO, kind:2, - type:HType.mage,lv:1,hp:92,mp:135,map:28,def:6,mdef:0,ap:14,dis:420,speed:95,skills:[6001,6005], + type:HType.mage,lv:1,hp:92,mp:135,map:28,def:6,mdef:0,ap:14,dis:420,speed:95,skills:[6001], buff:[],tal:[7202],info:"兵法谋略,谋略型法师"}, // 萧何 - 后勤辅助(后勤保障,后勤型辅助) 5010:{uuid:5010,name:"萧何",path:"hz1", fac:FacSet.HERO, kind:2, - type:HType.support,lv:1,hp:115,mp:145,map:18,def:10,mdef:0,ap:8,dis:380,speed:105,skills:[6001,6005], + type:HType.support,lv:1,hp:115,mp:145,map:18,def:10,mdef:0,ap:8,dis:380,speed:105,skills:[6001], buff:[],tal:[7006],info:"后勤保障,后勤型辅助"}, @@ -138,79 +138,79 @@ export const HeroInfo: Record = { //怪物 5201:{uuid:5201,name:"兽人战士",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.warrior,lv:1,hp:30,mp:100,map:10,def:5,mdef:0,ap:5,dis:90,speed:100,skills:[6005], + type:HType.warrior,lv:1,hp:30,mp:100,map:10,def:5,mdef:0,ap:5,dis:90,speed:100,skills:[6002], buff:[],tal:[],info:"普通怪物-战士型"}, 5202:{uuid:5202,name:"兽人刺客",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.remote,lv:1,hp:20,mp:100,map:10,def:5,mdef:0,ap:5,dis:350,speed:150,skills:[6005], + type:HType.remote,lv:1,hp:20,mp:100,map:10,def:5,mdef:0,ap:5,dis:350,speed:150,skills:[6002], buff:[],tal:[],info:"普通怪物-战士型"}, 5203:{uuid:5203,name:"兽人护卫",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.warrior,lv:1,hp:60,mp:100,map:10,def:5,mdef:0,ap:5,dis:90,speed:100,skills:[6005], + type:HType.warrior,lv:1,hp:60,mp:100,map:10,def:5,mdef:0,ap:5,dis:90,speed:100,skills:[6002], buff:[],tal:[],info:"普通怪物-战士型"}, // 1. 基础近战型 5204:{uuid:5204,name:"蝙蝠",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.warrior,lv:1,hp:28,mp:100,map:10,def:2,mdef:0,ap:6,dis:90,speed:125,skills:[6005], + type:HType.warrior,lv:1,hp:28,mp:100,map:10,def:2,mdef:0,ap:6,dis:90,speed:125,skills:[6002], buff:[],tal:[],info:"基础近战型:直接向玩家移动,接触造成伤害;中速、低血、数量多"}, 5205:{uuid:5205,name:"骷髅",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.warrior,lv:1,hp:35,mp:100,map:10,def:3,mdef:0,ap:7,dis:90,speed:120,skills:[6005], + type:HType.warrior,lv:1,hp:35,mp:100,map:10,def:3,mdef:0,ap:7,dis:90,speed:120,skills:[6002], buff:[],tal:[],info:"基础近战型:直接向玩家移动,接触造成伤害;中速、低血、数量多"}, // 2. 快速突击型 5206:{uuid:5206,name:"石像鬼",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.assassin,lv:1,hp:26,mp:100,map:10,def:3,mdef:0,ap:8,dis:120,speed:180,skills:[6005], + type:HType.assassin,lv:1,hp:26,mp:100,map:10,def:3,mdef:0,ap:8,dis:120,speed:180,skills:[6002], buff:[],tal:[],info:"快速突击型:高速直线冲锋,接触伤害;高速、低血、成群出现"}, 5207:{uuid:5207,name:"快速骷髅",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.assassin,lv:1,hp:22,mp:100,map:10,def:2,mdef:0,ap:7,dis:120,speed:200,skills:[6005], + type:HType.assassin,lv:1,hp:22,mp:100,map:10,def:2,mdef:0,ap:7,dis:120,speed:200,skills:[6002], buff:[],tal:[],info:"快速突击型:高速直线冲锋,接触伤害;高速、低血、成群出现"}, // 3. 重型坦克型 5208:{uuid:5208,name:"大型骷髅",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.warrior,lv:1,hp:140,mp:100,map:10,def:10,mdef:0,ap:10,dis:90,speed:85,skills:[6005], + type:HType.warrior,lv:1,hp:140,mp:100,map:10,def:10,mdef:0,ap:10,dis:90,speed:85,skills:[6002], buff:[],tal:[],info:"重型坦克型:缓慢逼近,高血量,中等伤害"}, 5209:{uuid:5209,name:"树人",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.warrior,lv:1,hp:160,mp:100,map:10,def:12,mdef:0,ap:12,dis:90,speed:80,skills:[6005], + type:HType.warrior,lv:1,hp:160,mp:100,map:10,def:12,mdef:0,ap:12,dis:90,speed:80,skills:[6002], buff:[],tal:[],info:"重型坦克型:缓慢逼近,高血量,中等伤害"}, // 4. 远程骚扰型 5210:{uuid:5210,name:"骷髅弓手",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.remote,lv:1,hp:60,mp:100,map:8,def:4,mdef:0,ap:12,dis:450,speed:110,skills:[6005], + type:HType.remote,lv:1,hp:60,mp:100,map:8,def:4,mdef:0,ap:12,dis:450,speed:110,skills:[6002], buff:[],tal:[],info:"远程骚扰型:保持距离发射箭矢,逼迫玩家走位"}, 5211:{uuid:5211,name:"法师骷髅",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.mage,lv:1,hp:55,mp:100,map:25,def:4,mdef:5,ap:10,dis:400,speed:105,skills:[6005], + type:HType.mage,lv:1,hp:55,mp:100,map:25,def:4,mdef:5,ap:10,dis:400,speed:105,skills:[6002], buff:[],tal:[],info:"远程骚扰型:保持距离释放法术弹幕,逼迫玩家走位"}, // 5. 特殊机制型 5212:{uuid:5212,name:"炸弹骷髅",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.assassin,lv:1,hp:30,mp:100,map:10,def:3,mdef:0,ap:25,dis:100,speed:130,skills:[6005], + type:HType.assassin,lv:1,hp:30,mp:100,map:10,def:3,mdef:0,ap:25,dis:100,speed:130,skills:[6002], buff:[],tal:[],info:"特殊机制:接近玩家后自爆造成高额伤害,需优先击杀"}, // 6. 精英/BOSS型 5213:{uuid:5213,name:"亡灵领主(精英)",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.warrior,lv:3,hp:200,mp:100,map:20,def:10,mdef:5,ap:20,dis:100,speed:110,skills:[6005], + type:HType.warrior,lv:3,hp:200,mp:100,map:20,def:10,mdef:5,ap:20,dis:100,speed:110,skills:[6002], buff:[],tal:[],info:"精英/BOSS:高血量与独特机制,波次高潮与重要经验来源"}, // 5. 特殊机制扩展 // 召唤师:持续召唤小怪(后续可在技能系统中实现 SType.zhaohuan) 5214:{uuid:5214,name:"死灵法师(召唤师)",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.mage,lv:1,hp:90,mp:160,map:22,def:4,mdef:6,ap:8,dis:380,speed:100,skills:[6005], + type:HType.mage,lv:1,hp:90,mp:160,map:22,def:4,mdef:6,ap:8,dis:380,speed:100,skills:[6002], buff:[],tal:[],info:"特殊机制:持续召唤小怪,需优先击杀"}, // 治疗者:为周围怪物回血(此处以提升治疗效果和生命回复为基础被动) // Attrs.HEAL_EFFECT=5 (RATIO=1),Attrs.HP_REGEN=3 (VALUE=0) 5215:{uuid:5215,name:"祭司(治疗者)",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.support,lv:1,hp:100,mp:160,map:18,def:5,mdef:8,ap:6,dis:350,speed:105,skills:[6005], + type:HType.support,lv:1,hp:100,mp:160,map:18,def:5,mdef:8,ap:6,dis:350,speed:105,skills:[6002], buff:[],tal:[],info:"特殊机制:为周围怪物提供治疗增益与持续回复"}, // 光环怪:为周围怪物提供增益(此处以Buff效果提升与移动速度提升为基础被动) // Attrs.BUFF_UP=60 (RATIO=1),Attrs.SPEED=63 (RATIO=1) 5216:{uuid:5216,name:"光环幽灵(光环怪)",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.support,lv:1,hp:85,mp:140,map:15,def:4,mdef:7,ap:7,dis:350,speed:110,skills:[6005], + type:HType.support,lv:1,hp:85,mp:140,map:15,def:4,mdef:7,ap:7,dis:350,speed:110,skills:[6002], buff:[],tal:[],info:"特殊机制:为周围怪物提供增益光环,加速与增益效果强化"}, }; \ No newline at end of file diff --git a/assets/script/game/common/ecs.meta b/assets/script/game/common/ecs.meta deleted file mode 100644 index 1706f684..00000000 --- a/assets/script/game/common/ecs.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "1.2.0", - "importer": "directory", - "imported": true, - "uuid": "635cbba2-f16e-4c87-b7c5-d9d2bc107de0", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/common/ecs/SingletonModuleComp.ts.meta b/assets/script/game/common/ecs/SingletonModuleComp.ts.meta deleted file mode 100644 index 6f9d5370..00000000 --- a/assets/script/game/common/ecs/SingletonModuleComp.ts.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "4.0.24", - "importer": "typescript", - "imported": true, - "uuid": "c1147d9a-3dcd-4fd0-ad87-f4d964ee62a8", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/common/ecs/position.meta b/assets/script/game/common/ecs/position.meta deleted file mode 100644 index 4a744f38..00000000 --- a/assets/script/game/common/ecs/position.meta +++ /dev/null @@ -1,12 +0,0 @@ -{ - "ver": "1.2.0", - "importer": "directory", - "imported": true, - "uuid": "d2d775f5-1dc0-455e-89d7-4a17f43170e0", - "files": [], - "subMetas": {}, - "userData": { - "compressionType": {}, - "isRemoteBundle": {} - } -} diff --git a/assets/script/game/hero/DEventComp.ts b/assets/script/game/hero/DEventComp.ts deleted file mode 100644 index 55fc9f7e..00000000 --- a/assets/script/game/hero/DEventComp.ts +++ /dev/null @@ -1,448 +0,0 @@ -import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; -import { Vec3 } from "cc"; - -/** - * ==================== 伤害事件组件 ==================== - * - * 用途: - * - 记录伤害事件的详细信息 - * - 支持多种伤害类型和效果 - * - 被伤害处理系统使用 - */ -@ecs.register('DamageEvent') -export class DamageEventComp extends ecs.Comp { - /** 伤害值 */ - damage: number = 0; - - /** 伤害类型 */ - damageType: number = 0; // 0: 物理, 1: 魔法, 2: 真实, 3: 治疗 - - /** 伤害来源实体ID */ - sourceEntityId: number = 0; - - /** 目标实体ID */ - targetEntityId: number = 0; - - /** 技能ID */ - skillId: number = 0; - - /** 伤害位置 */ - position: Vec3 = new Vec3(); - - /** 是否暴击 */ - isCritical: boolean = false; - - /** 暴击倍率 */ - criticalMultiplier: number = 2.0; - - /** 伤害减免 */ - damageReduction: number = 0; - - /** 护甲穿透 */ - armorPenetration: number = 0; - - /** 魔法抗性穿透 */ - magicPenetration: number = 0; - - /** 伤害标签 */ - damageTags: string[] = []; - - /** 附加效果 */ - effects: DamageEffectData[] = []; - - /** 是否已处理 */ - processed: boolean = false; - - /** 创建时间 */ - createTime: number = 0; - - /** 额外数据 */ - extraData: any = null; - - reset() { - this.damage = 0; - this.damageType = 0; - this.sourceEntityId = 0; - this.targetEntityId = 0; - this.skillId = 0; - this.position.set(0, 0, 0); - this.isCritical = false; - this.criticalMultiplier = 2.0; - this.damageReduction = 0; - this.armorPenetration = 0; - this.magicPenetration = 0; - this.damageTags = []; - this.effects = []; - this.processed = false; - this.createTime = 0; - this.extraData = null; - } - - /** - * 初始化伤害事件 - */ - initialize(damage: number, damageType: number, sourceId: number, targetId: number, skillId: number, position: Vec3): void { - this.damage = damage; - this.damageType = damageType; - this.sourceEntityId = sourceId; - this.targetEntityId = targetId; - this.skillId = skillId; - this.position.set(position); - this.createTime = Date.now(); - this.processed = false; - } - - /** - * 添加伤害标签 - */ - addTag(tag: string): void { - if (!this.damageTags.includes(tag)) { - this.damageTags.push(tag); - } - } - - /** - * 检查是否包含标签 - */ - hasTag(tag: string): boolean { - return this.damageTags.includes(tag); - } - - /** - * 添加附加效果 - */ - addEffect(effect: DamageEffectData): void { - this.effects.push(effect); - } - - /** - * 计算最终伤害 - */ - calculateFinalDamage(targetArmor: number, targetMagicResist: number): number { - let finalDamage = this.damage; - - // 应用暴击 - if (this.isCritical) { - finalDamage *= this.criticalMultiplier; - } - - // 应用护甲和魔抗 - if (this.damageType === 0) { // 物理伤害 - const effectiveArmor = Math.max(0, targetArmor - this.armorPenetration); - const damageMultiplier = 100 / (100 + effectiveArmor); - finalDamage *= damageMultiplier; - } else if (this.damageType === 1) { // 魔法伤害 - const effectiveMagicResist = Math.max(0, targetMagicResist - this.magicPenetration); - const damageMultiplier = 100 / (100 + effectiveMagicResist); - finalDamage *= damageMultiplier; - } - // 真实伤害和治疗不受护甲影响 - - // 应用伤害减免 - finalDamage *= (1 - this.damageReduction); - - return Math.max(0, finalDamage); - } -} - -/** - * ==================== 伤害效果数据 ==================== - * - * 用途: - * - 定义伤害附加的各种效果 - * - 如眩晕、减速、燃烧等 - */ -export class DamageEffectData { - /** 效果类型 */ - effectType: number = 0; // 0: 眩晕, 1: 减速, 2: 燃烧, 3: 冰冻, 4: 中毒 - - /** 效果持续时间 */ - duration: number = 0; - - /** 效果强度 */ - intensity: number = 0; - - /** 效果参数 */ - params: any = null; - - constructor(type: number, duration: number, intensity: number = 1, params: any = null) { - this.effectType = type; - this.duration = duration; - this.intensity = intensity; - this.params = params; - } -} - -/** - * ==================== 治疗事件组件 ==================== - * - * 用途: - * - 记录治疗事件的详细信息 - * - 支持多种治疗类型 - * - 被治疗处理系统使用 - */ -@ecs.register('HealEvent') -export class HealEventComp extends ecs.Comp { - /** 治疗值 */ - healAmount: number = 0; - - /** 治疗类型 */ - healType: number = 0; // 0: 瞬间治疗, 1: 持续治疗, 2: 护盾 - - /** 治疗来源实体ID */ - sourceEntityId: number = 0; - - /** 目标实体ID */ - targetEntityId: number = 0; - - /** 技能ID */ - skillId: number = 0; - - /** 治疗位置 */ - position: Vec3 = new Vec3(); - - /** 是否暴击治疗 */ - isCritical: boolean = false; - - /** 暴击倍率 */ - criticalMultiplier: number = 1.5; - - /** 治疗加成 */ - healBonus: number = 0; - - /** 是否已处理 */ - processed: boolean = false; - - /** 创建时间 */ - createTime: number = 0; - - reset() { - this.healAmount = 0; - this.healType = 0; - this.sourceEntityId = 0; - this.targetEntityId = 0; - this.skillId = 0; - this.position.set(0, 0, 0); - this.isCritical = false; - this.criticalMultiplier = 1.5; - this.healBonus = 0; - this.processed = false; - this.createTime = 0; - } - - /** - * 计算最终治疗量 - */ - calculateFinalHeal(): number { - let finalHeal = this.healAmount; - - // 应用暴击 - if (this.isCritical) { - finalHeal *= this.criticalMultiplier; - } - - // 应用治疗加成 - finalHeal *= (1 + this.healBonus); - - return Math.max(0, finalHeal); - } -} - -/** - * ==================== 状态效果组件 ==================== - * - * 用途: - * - 管理角色身上的各种状态效果 - * - 如BUFF、DEBUFF等 - * - 支持叠加和刷新 - */ -@ecs.register('StatusEffect') -export class StatusEffectComp extends ecs.Comp { - /** 效果ID */ - effectId: number = 0; - - /** 效果类型 */ - effectType: number = 0; - - /** 效果名称 */ - name: string = ""; - - /** 剩余持续时间 */ - remainingDuration: number = 0; - - /** 总持续时间 */ - totalDuration: number = 0; - - /** 效果强度 */ - intensity: number = 1; - - /** 叠加层数 */ - stackCount: number = 1; - - /** 最大叠加层数 */ - maxStacks: number = 1; - - /** 来源实体ID */ - sourceEntityId: number = 0; - - /** 技能ID */ - skillId: number = 0; - - /** 是否为BUFF */ - isBuff: boolean = true; - - /** 是否可驱散 */ - canDispel: boolean = true; - - /** 效果参数 */ - params: any = null; - - /** 图标路径 */ - iconPath: string = ""; - - reset() { - this.effectId = 0; - this.effectType = 0; - this.name = ""; - this.remainingDuration = 0; - this.totalDuration = 0; - this.intensity = 1; - this.stackCount = 1; - this.maxStacks = 1; - this.sourceEntityId = 0; - this.skillId = 0; - this.isBuff = true; - this.canDispel = true; - this.params = null; - this.iconPath = ""; - } - - /** - * 更新效果持续时间 - */ - updateDuration(deltaTime: number): boolean { - this.remainingDuration -= deltaTime; - return this.remainingDuration > 0; - } - - /** - * 刷新效果持续时间 - */ - refreshDuration(): void { - this.remainingDuration = this.totalDuration; - } - - /** - * 增加叠加层数 - */ - addStack(count: number = 1): void { - this.stackCount = Math.min(this.maxStacks, this.stackCount + count); - } - - /** - * 减少叠加层数 - */ - removeStack(count: number = 1): void { - this.stackCount = Math.max(0, this.stackCount - count); - } - - /** - * 获取效果进度 (0-1) - */ - getProgress(): number { - if (this.totalDuration <= 0) return 1; - return Math.max(0, 1 - (this.remainingDuration / this.totalDuration)); - } -} - -/** - * ==================== 伤害统计组件 ==================== - * - * 用途: - * - 统计伤害数据 - * - 用于战斗分析和显示 - */ -@ecs.register('DamageStats') -export class DamageStatsComp extends ecs.Comp { - /** 总伤害输出 */ - totalDamageDealt: number = 0; - - /** 总伤害承受 */ - totalDamageTaken: number = 0; - - /** 总治疗量 */ - totalHealingDone: number = 0; - - /** 暴击次数 */ - criticalHits: number = 0; - - /** 总攻击次数 */ - totalAttacks: number = 0; - - /** 击杀数 */ - kills: number = 0; - - /** 死亡数 */ - deaths: number = 0; - - /** 技能使用统计 */ - skillUsageStats: Map = new Map(); - - reset() { - this.totalDamageDealt = 0; - this.totalDamageTaken = 0; - this.totalHealingDone = 0; - this.criticalHits = 0; - this.totalAttacks = 0; - this.kills = 0; - this.deaths = 0; - this.skillUsageStats.clear(); - } - - /** - * 记录伤害输出 - */ - recordDamageDealt(damage: number, isCritical: boolean = false): void { - this.totalDamageDealt += damage; - this.totalAttacks++; - if (isCritical) { - this.criticalHits++; - } - } - - /** - * 记录伤害承受 - */ - recordDamageTaken(damage: number): void { - this.totalDamageTaken += damage; - } - - /** - * 记录治疗 - */ - recordHealing(healing: number): void { - this.totalHealingDone += healing; - } - - /** - * 记录技能使用 - */ - recordSkillUsage(skillId: number): void { - const currentCount = this.skillUsageStats.get(skillId) || 0; - this.skillUsageStats.set(skillId, currentCount + 1); - } - - /** - * 获取暴击率 - */ - getCriticalRate(): number { - return this.totalAttacks > 0 ? this.criticalHits / this.totalAttacks : 0; - } - - /** - * 获取平均伤害 - */ - getAverageDamage(): number { - return this.totalAttacks > 0 ? this.totalDamageDealt / this.totalAttacks : 0; - } -} \ No newline at end of file diff --git a/assets/script/game/hero/DEventComp.ts.meta b/assets/script/game/hero/DEventComp.ts.meta deleted file mode 100644 index 3239fa35..00000000 --- a/assets/script/game/hero/DEventComp.ts.meta +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ver": "4.0.24", - "importer": "typescript", - "imported": true, - "uuid": "92032577-e289-43f6-92f3-6d99c7ec4ce8", - "files": [], - "subMetas": {}, - "userData": {} -} diff --git a/assets/script/game/hero/HeroAtk.ts b/assets/script/game/hero/HeroAtk.ts index 4202575a..c49bc7b3 100644 --- a/assets/script/game/hero/HeroAtk.ts +++ b/assets/script/game/hero/HeroAtk.ts @@ -61,6 +61,7 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd isCrit:false, isDodge:false, } + console.log("[HeroAtkSystem] doAttack",target,dmgData) if (!targetModel || targetModel.is_dead) return reDate; // 获取技能配置 diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 1a7afdf6..6438dfa1 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -171,7 +171,7 @@ export class HeroViewComp extends CCComp { /** 受击特效 */ private in_atked(anm: string = "atked", scale: number = 1) { - var path = "game/skill/boom/" + anm; + var path = "game/skill/end/" + anm; var prefab: Prefab = oops.res.get(path, Prefab)!; var node = instantiate(prefab); node.setScale(node.scale.x * scale, node.scale.y); @@ -297,6 +297,7 @@ export class HeroViewComp extends CCComp { let SConf=SkillSet[s_uuid] this.back() this.showDamage(damage, isCrit, SConf.AtkedName); // 暴击状态由战斗系统内部处理 + console.log("[HeroViewComp] do_atked",damage,isCrit,SConf.AtkedName) } //后退 back(){ diff --git a/assets/script/game/hero/SACastSystem.ts b/assets/script/game/hero/SACastSystem.ts index fcf4251a..ce5fd8eb 100644 --- a/assets/script/game/hero/SACastSystem.ts +++ b/assets/script/game/hero/SACastSystem.ts @@ -115,7 +115,7 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat }, delay); const heroAttrs = casterEntity.get(HeroAttrsComp); - console.log(`[SACastSystem] ${heroAttrs?.hero_name ?? '未知'} 施放技能: ${config.name}`); + // console.log(`[SACastSystem] ${heroAttrs?.hero_name ?? '未知'} 施放技能: ${config.name}`); } /** @@ -149,7 +149,7 @@ export class SACastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdat const startPos = caster.node.position.clone(); const targetPos = targets[0]; // 使用第一个目标位置 - console.log(`[SACastSystem]: ${s_uuid}, 起始位置: ${startPos}, 目标位置: ${targetPos}`); + // console.log(`[SACastSystem]: ${s_uuid}, 起始位置: ${startPos}, 目标位置: ${targetPos}`); // 加载技能实体(包括预制体、组件初始化等) skill.load(startPos, parent, s_uuid, targetPos, caster); diff --git a/assets/script/game/skill/AtkConCom.ts b/assets/script/game/skill/AtkConCom.ts index 735b7870..7b5fcb41 100644 --- a/assets/script/game/skill/AtkConCom.ts +++ b/assets/script/game/skill/AtkConCom.ts @@ -103,7 +103,7 @@ export class AtkConCom extends CCComp { this.do_anim() } do_fixedStart(){ - this.node.setPosition(this.startPos.x > 360?300:this.startPos.x,this.node.position.y,0) + this.node.setPosition(this.startPos.x,this.node.position.y,0) this.do_anim() } diff --git a/assets/script/game/skill/SMoveComp.ts b/assets/script/game/skill/SMoveComp.ts index 4c05a9e0..fe1dd734 100644 --- a/assets/script/game/skill/SMoveComp.ts +++ b/assets/script/game/skill/SMoveComp.ts @@ -18,7 +18,7 @@ export class SMoveDataComp extends ecs.Comp { /** 移动持续时间 */ duration: number = 0; /** 移动方向 */ - direction: Vec3 = v3(); + scale: number = 1; /** 是否自动销毁(到达目标后) */ autoDestroy: boolean = true; s_uuid:number=0; @@ -27,13 +27,14 @@ export class SMoveDataComp extends ecs.Comp { this.targetPos.set(0, 0, 0); this.speed = 500; this.duration = 0; - this.direction.set(0, 0, 0); + this.scale=1; this.autoDestroy = true; } rePos(originalStart:Vec3){ if(!originalStart){ return } + console.log("[SMoveDataComp]rePos",originalStart,this.targetPos) // 计算延长后的目标点坐标 const originalTarget = v3(this.targetPos.x, this.targetPos.y + BoxSet.ATK_Y); const direction = new Vec3(); diff --git a/assets/script/game/skill/Skill.ts b/assets/script/game/skill/Skill.ts index bed72417..677c2693 100644 --- a/assets/script/game/skill/Skill.ts +++ b/assets/script/game/skill/Skill.ts @@ -36,7 +36,7 @@ export class Skill extends ecs.Entity { load(startPos: Vec3, parent: Node, s_uuid: number, targetPos: Vec3, caster:HeroViewComp) { const config = SkillSet[s_uuid]; - let casterAttrs=caster.ent.get(HeroAttrsComp).Attrs + if (!config) { console.error("[Skill] 技能配置不存在:", s_uuid); return; @@ -51,20 +51,15 @@ export class Skill extends ecs.Entity { } // console.log("load skill startPos",startPos) const node: Node = instantiate(prefab); - console.log("load skill node",node) + // console.log("load skill node",node) node.parent = parent; // 设置节点属性 node.setPosition(startPos); - - if(casterAttrs.fac==FacSet.MON){ - node.scale=v3(node.scale.x*-1,1,1) - }else{ - if(casterAttrs.type==HType.warrior){ - if(casterAttrs.node.scale<0){ - node.scale=v3(node.scale.x*-1,node.scale.y,1) - } - } + + if(caster.node.scale.x < 0){ + node.setScale(v3(node.scale.x*-1,node.scale.y,1)) } + // 初始视图 const SView = node.getComponent(SkillView); // 只设置必要的运行时属性,配置信息通过 SkillSet[uuid] 访问 @@ -78,14 +73,15 @@ export class Skill extends ecs.Entity { sMoveCom.startPos=startPos sMoveCom.targetPos=targetPos sMoveCom.s_uuid=s_uuid - + sMoveCom.scale=caster.node.scale.x < 0 ? -1 : 1 + + let casterAttrs=caster.ent.get(HeroAttrsComp).Attrs // 初始化数据组件 const sDataCom = this.get(SDataCom); sDataCom.group=caster.box_group sDataCom.caster=caster sDataCom.Attrs=casterAttrs sDataCom.s_uuid=s_uuid - } /** 模块资源释放 */ diff --git a/assets/script/game/skill/SkillView.ts b/assets/script/game/skill/SkillView.ts index c3ef32cd..9e1381a2 100644 --- a/assets/script/game/skill/SkillView.ts +++ b/assets/script/game/skill/SkillView.ts @@ -21,13 +21,16 @@ export class SkillView extends CCComp { @property({ type: CCInteger }) atk_x: number = 0 @property({ type: CCInteger }) - atk_y: number = 0 + @property({ type: CCInteger }) + runType: number = 0 //技能运行类型 0-线性 1-贝塞尔 2-开始位置固定 3-目标位置固定 + anim:Animation=null; group:number=0; SConf:any=null; s_uuid:number=1001 start() { + console.log("SkillView start scale",this.node.scale) this.SConf = SkillSet[this.s_uuid] this.anim=this.node.getComponent(Animation) this.node.active = true; @@ -38,13 +41,14 @@ export class SkillView extends CCComp { } const SMove=this.ent.get(SMoveDataComp) // 计算延长后的目标点坐标 - SMove.rePos(v3(this.node.position.x + this.atk_x, this.node.position.y + this.atk_y)) - - switch(this.SConf.RType){ + + switch(this.runType){ case RType.linear: + SMove.rePos(v3(this.node.position.x + this.atk_x, this.node.position.y + this.atk_y)) this.do_linear(SMove.startPos,SMove.targetPos) break case RType.bezier: + SMove.rePos(v3(this.node.position.x + this.atk_x, this.node.position.y + this.atk_y)) this.do_bezier(SMove.startPos,SMove.targetPos) break case RType.fixed: @@ -67,6 +71,7 @@ export class SkillView extends CCComp { } do_bezier(startPos:Vec3,targetPos:Vec3){ + console.log("do_bezier",startPos,targetPos) let bm=this.node.getComponent(BezierMove) this.node.angle +=10 // bm.speed=700 @@ -75,6 +80,7 @@ export class SkillView extends CCComp { bm.moveTo(targetPos) } do_linear(startPos:Vec3,targetPos:Vec3){ + console.log("do_linear",startPos,targetPos) let bm=this.node.getComponent(BezierMove) let s_x=startPos.x let s_y=startPos.y @@ -95,11 +101,13 @@ export class SkillView extends CCComp { bm.moveTo(targetPos); } do_fixedEnd(startPos:Vec3,targetPos:Vec3){ + console.log("do_fixedEnd",startPos,targetPos) this.node.setPosition(targetPos.x > 360?300:targetPos.x,this.node.position.y,0) this.do_anim() } do_fixedStart(startPos:Vec3,targetPos:Vec3){ - this.node.setPosition(startPos.x > 360?300:startPos.x,this.node.position.y,0) + console.log("do_fixedStart",startPos,targetPos) + this.node.setPosition(startPos.x,this.node.position.y,0) this.do_anim() } do_anim(){ @@ -168,11 +176,12 @@ export class SkillView extends CCComp { if (!this.SConf) return; let sData=this.ent.get(SDataCom) //伤害处理 - let dmgData=target.ent.add(DmgDataCom) + target.ent.add(DmgDataCom) + let dmgData=target.ent.get(DmgDataCom) dmgData.Attrs=sData.Attrs dmgData.caster=sData.caster dmgData.s_uuid=sData.s_uuid - + console.log("[SkillCom]:apply_damage",target,sData,dmgData) sData.hit_count++ // console.log("[SkillCom]:碰撞次数:技能次数:穿刺次数",this.hit_count,this.Config.hit,this.puncture) if(sData.hit_count>=(this.SConf.hit+sData.Attrs[Attrs.PUNCTURE])&&(this.SConf.DTType!=DTType.range)&&(this.SConf.EType!=EType.animationEnd)&&(this.SConf.EType!=EType.timeEnd)) this.ent.destroy// 技能命中次数