From 78d4b10a88327c91e9d10a551c88a6f7d07b1c52 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 10:09:20 +0800 Subject: [PATCH 01/15] =?UTF-8?q?fix(skill):=20=E4=BF=AE=E6=AD=A3=E6=8A=80?= =?UTF-8?q?=E8=83=BD=E6=94=BB=E5=87=BB=E5=8A=9B=E8=AE=A1=E7=AE=97=E6=9C=AA?= =?UTF-8?q?=E9=99=A4=E4=BB=A5100=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复技能攻击力(AP)计算时未将百分比转换为小数的问题。原代码直接使用 sAp (百分比值) 与基础攻击力相乘,导致计算结果过大。现在将 sAp 除以 100 以正确计算实际攻击力值。 --- .../resources/game/skill/buff/tooltip.prefab | 904 +++++++++++++----- assets/script/game/skill/Skill.ts | 2 +- 2 files changed, 684 insertions(+), 222 deletions(-) diff --git a/assets/resources/game/skill/buff/tooltip.prefab b/assets/resources/game/skill/buff/tooltip.prefab index f5c85017..ca2c6ce3 100644 --- a/assets/resources/game/skill/buff/tooltip.prefab +++ b/assets/resources/game/skill/buff/tooltip.prefab @@ -28,38 +28,41 @@ "__id__": 38 }, { - "__id__": 64 + "__id__": 56 }, { - "__id__": 76 + "__id__": 82 }, { - "__id__": 86 + "__id__": 94 }, { - "__id__": 96 + "__id__": 104 }, { - "__id__": 112 + "__id__": 114 }, { - "__id__": 128 + "__id__": 130 + }, + { + "__id__": 146 } ], "_active": true, "_components": [ { - "__id__": 146 + "__id__": 164 }, { - "__id__": 148 + "__id__": 166 }, { - "__id__": 150 + "__id__": 168 } ], "_prefab": { - "__id__": 152 + "__id__": 170 }, "_lpos": { "__type__": "cc.Vec3", @@ -92,7 +95,7 @@ }, { "__type__": "cc.Node", - "_name": "loss_life", + "_name": "hloss", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -103,7 +106,7 @@ "__id__": 3 } ], - "_active": false, + "_active": true, "_components": [ { "__id__": 17 @@ -204,7 +207,7 @@ "__id__": 3 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 5 @@ -221,7 +224,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -38.61234375, + "x": -26.94734375, "y": 0, "z": 0 }, @@ -262,8 +265,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 7.29, - "height": 30 + "width": 8.75, + "height": 35 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -274,7 +277,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "2ajrO1xTFEYZuYSqyA/gFk" + "fileId": "81Hd5FCmNKELbTy3PUR0Ga" }, { "__type__": "cc.Label", @@ -293,18 +296,18 @@ "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, + "r": 247, + "g": 133, + "b": 133, "a": 255 }, "_string": "-", "_horizontalAlign": 2, "_verticalAlign": 1, - "_actualFontSize": 25, - "_fontSize": 25, + "_actualFontSize": 30, + "_fontSize": 30, "_fontFamily": "Arial", - "_lineHeight": 30, + "_lineHeight": 35, "_overflow": 0, "_enableWrapText": true, "_font": { @@ -345,7 +348,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "5blJTGFB5Nr7RaOdgY7oSl" + "fileId": "8cYaMikZtKAo5zVDcuh7fG" }, { "__type__": "cc.Widget", @@ -361,7 +364,7 @@ }, "_alignFlags": 8, "_target": null, - "_left": -11.00734375, + "_left": -11.73734375, "_right": 0, "_top": 0, "_bottom": 0, @@ -381,7 +384,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "2bzZSFzzNHsr1gOfSoasCQ" + "fileId": "32wpgDC0BBV758yjr4s+r+" }, { "__type__": "cc.PrefabInfo", @@ -391,7 +394,7 @@ "asset": { "__id__": 0 }, - "fileId": "64+y/YDVRNJLoFjvaUMODr", + "fileId": "5clIOO919D4JsHp6rnR+ot", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -410,8 +413,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 62.5, - "height": 30 + "width": 39.17, + "height": 35 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -422,7 +425,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "4fnaaefIBPd5VZkadvVuL+" + "fileId": "e9OugIC/pDHpANqS/vmzCi" }, { "__type__": "cc.Label", @@ -442,17 +445,17 @@ "_color": { "__type__": "cc.Color", "r": 255, - "g": 255, - "b": 255, + "g": 68, + "b": 68, "a": 255 }, - "_string": "10.0kK", + "_string": "10K", "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 25, - "_fontSize": 25, + "_actualFontSize": 30, + "_fontSize": 30, "_fontFamily": "Arial", - "_lineHeight": 30, + "_lineHeight": 35, "_overflow": 0, "_enableWrapText": true, "_font": { @@ -493,7 +496,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "9eU3zaRn9LQaYvHbXZrQOn" + "fileId": "7618CoHGdFnLKZwqySHp4r" }, { "__type__": "cc.PrefabInfo", @@ -503,7 +506,7 @@ "asset": { "__id__": 0 }, - "fileId": "56T8q4G/xCpo4gdb82Y18Y", + "fileId": "9cuYQ4TQVJ87f84GeMDR/D", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null @@ -534,7 +537,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "48URscTW9Mj7bFwcYDjafC" + "fileId": "0aZKwYHpFGOKdsh7OwWNIX" }, { "__type__": "cc.PrefabInfo", @@ -544,14 +547,14 @@ "asset": { "__id__": 0 }, - "fileId": "79aw18DVlI1rY7RmoSUkYE", + "fileId": "d2kKoCvhtGNr8P0juBog+I", "instance": null, "targetOverrides": null, "nestedPrefabInstanceRoots": null }, { "__type__": "cc.Node", - "_name": "add_life", + "_name": "loss_life", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -562,7 +565,7 @@ "__id__": 21 } ], - "_active": false, + "_active": true, "_components": [ { "__id__": 35 @@ -663,7 +666,7 @@ "__id__": 21 }, "_children": [], - "_active": true, + "_active": false, "_components": [ { "__id__": 23 @@ -680,7 +683,7 @@ }, "_lpos": { "__type__": "cc.Vec3", - "x": -24.35, + "x": -19.44734375, "y": 0, "z": 0 }, @@ -721,8 +724,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 9.03, - "height": 30 + "width": 8.75, + "height": 35 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -733,7 +736,7 @@ }, { "__type__": "cc.CompPrefabInfo", - "fileId": "5e+vN/MtNJPZBTWtMoNeVb" + "fileId": "2ajrO1xTFEYZuYSqyA/gFk" }, { "__type__": "cc.Label", @@ -750,6 +753,465 @@ "_customMaterial": null, "_srcBlendFactor": 2, "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "-", + "_horizontalAlign": 2, + "_verticalAlign": 1, + "_actualFontSize": 30, + "_fontSize": 30, + "_fontFamily": "Arial", + "_lineHeight": 35, + "_overflow": 0, + "_enableWrapText": true, + "_font": { + "__uuid__": "eca7fc51-87d0-4bb0-89e1-aa9c39411bc6", + "__expectedType__": "cc.BitmapFont" + }, + "_isSystemFontUsed": false, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 2, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 1, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5blJTGFB5Nr7RaOdgY7oSl" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 22 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "_alignFlags": 8, + "_target": null, + "_left": -11.73734375, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "2bzZSFzzNHsr1gOfSoasCQ" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "64+y/YDVRNJLoFjvaUMODr", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": { + "__id__": 31 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 24.17, + "height": 35 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "4fnaaefIBPd5VZkadvVuL+" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": { + "__id__": 33 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_string": "10", + "_horizontalAlign": 1, + "_verticalAlign": 1, + "_actualFontSize": 30, + "_fontSize": 30, + "_fontFamily": "Arial", + "_lineHeight": 35, + "_overflow": 0, + "_enableWrapText": true, + "_font": { + "__uuid__": "eca7fc51-87d0-4bb0-89e1-aa9c39411bc6", + "__expectedType__": "cc.BitmapFont" + }, + "_isSystemFontUsed": false, + "_spacingX": 0, + "_isItalic": false, + "_isBold": false, + "_isUnderline": false, + "_underlineHeight": 2, + "_cacheMode": 2, + "_enableOutline": true, + "_outlineColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_outlineWidth": 1, + "_enableShadow": false, + "_shadowColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_shadowOffset": { + "__type__": "cc.Vec2", + "x": 2, + "y": 2 + }, + "_shadowBlur": 2, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "9eU3zaRn9LQaYvHbXZrQOn" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "56T8q4G/xCpo4gdb82Y18Y", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 20 + }, + "_enabled": true, + "__prefab": { + "__id__": 36 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "48URscTW9Mj7bFwcYDjafC" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "79aw18DVlI1rY7RmoSUkYE", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "add_life", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 39 + } + ], + "_active": false, + "_components": [ + { + "__id__": 53 + } + ], + "_prefab": { + "__id__": 55 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "hp", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 38 + }, + "_children": [ + { + "__id__": 40 + } + ], + "_active": true, + "_components": [ + { + "__id__": 48 + }, + { + "__id__": 50 + } + ], + "_prefab": { + "__id__": 52 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 39 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 41 + }, + { + "__id__": 43 + }, + { + "__id__": 45 + } + ], + "_prefab": { + "__id__": 47 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -29.231, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 40 + }, + "_enabled": true, + "__prefab": { + "__id__": 42 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 12.64, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5e+vN/MtNJPZBTWtMoNeVb" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 40 + }, + "_enabled": true, + "__prefab": { + "__id__": 44 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", "r": 82, @@ -760,10 +1222,10 @@ "_string": "+", "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 25, - "_fontSize": 25, + "_actualFontSize": 35, + "_fontSize": 35, "_fontFamily": "Arial", - "_lineHeight": 30, + "_lineHeight": 40, "_overflow": 0, "_enableWrapText": true, "_font": { @@ -812,15 +1274,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 22 + "__id__": 40 }, "_enabled": true, "__prefab": { - "__id__": 28 + "__id__": 46 }, "_alignFlags": 8, "_target": null, - "_left": -10.290000000000003, + "_left": -13.261000000000006, "_right": 0, "_top": 0, "_bottom": 0, @@ -861,16 +1323,16 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 21 + "__id__": 39 }, "_enabled": true, "__prefab": { - "__id__": 31 + "__id__": 49 }, "_contentSize": { "__type__": "cc.Size", - "width": 37.15, - "height": 30 + "width": 44.58, + "height": 35 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -889,11 +1351,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 21 + "__id__": 39 }, "_enabled": true, "__prefab": { - "__id__": 33 + "__id__": 51 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -908,10 +1370,10 @@ "_string": "500", "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 25, - "_fontSize": 25, + "_actualFontSize": 30, + "_fontSize": 30, "_fontFamily": "Arial", - "_lineHeight": 30, + "_lineHeight": 35, "_overflow": 0, "_enableWrapText": true, "_font": { @@ -973,11 +1435,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 20 + "__id__": 38 }, "_enabled": true, "__prefab": { - "__id__": 36 + "__id__": 54 }, "_contentSize": { "__type__": "cc.Size", @@ -1018,17 +1480,17 @@ }, "_children": [ { - "__id__": 39 + "__id__": 57 } ], "_active": false, "_components": [ { - "__id__": 61 + "__id__": 79 } ], "_prefab": { - "__id__": 63 + "__id__": 81 }, "_lpos": { "__type__": "cc.Vec3", @@ -1065,27 +1527,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 38 + "__id__": 56 }, "_children": [ { - "__id__": 40 + "__id__": 58 }, { - "__id__": 48 + "__id__": 66 } ], "_active": true, "_components": [ { - "__id__": 56 + "__id__": 74 }, { - "__id__": 58 + "__id__": 76 } ], "_prefab": { - "__id__": 60 + "__id__": 78 }, "_lpos": { "__type__": "cc.Vec3", @@ -1122,27 +1584,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 39 + "__id__": 57 }, "_children": [], "_active": true, "_components": [ { - "__id__": 41 + "__id__": 59 }, { - "__id__": 43 + "__id__": 61 }, { - "__id__": 45 + "__id__": 63 } ], "_prefab": { - "__id__": 47 + "__id__": 65 }, "_lpos": { "__type__": "cc.Vec3", - "x": -54.79, + "x": -64.72, "y": 3.745, "z": 0 }, @@ -1175,11 +1637,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 40 + "__id__": 58 }, "_enabled": true, "__prefab": { - "__id__": 42 + "__id__": 60 }, "_contentSize": { "__type__": "cc.Size", @@ -1203,11 +1665,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 40 + "__id__": 58 }, "_enabled": true, "__prefab": { - "__id__": 44 + "__id__": 62 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1251,11 +1713,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 40 + "__id__": 58 }, "_enabled": true, "__prefab": { - "__id__": 46 + "__id__": 64 }, "_alignFlags": 8, "_target": null, @@ -1300,23 +1762,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 39 + "__id__": 57 }, "_children": [], "_active": false, "_components": [ { - "__id__": 49 + "__id__": 67 }, { - "__id__": 51 + "__id__": 69 }, { - "__id__": 53 + "__id__": 71 } ], "_prefab": { - "__id__": 55 + "__id__": 73 }, "_lpos": { "__type__": "cc.Vec3", @@ -1353,11 +1815,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 48 + "__id__": 66 }, "_enabled": true, "__prefab": { - "__id__": 50 + "__id__": 68 }, "_contentSize": { "__type__": "cc.Size", @@ -1381,11 +1843,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 48 + "__id__": 66 }, "_enabled": true, "__prefab": { - "__id__": 52 + "__id__": 70 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1449,11 +1911,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 48 + "__id__": 66 }, "_enabled": true, "__prefab": { - "__id__": 54 + "__id__": 72 }, "_alignFlags": 8, "_target": null, @@ -1498,15 +1960,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 39 + "__id__": 57 }, "_enabled": true, "__prefab": { - "__id__": 57 + "__id__": 75 }, "_contentSize": { "__type__": "cc.Size", - "width": 59.58, + "width": 79.44, "height": 40 }, "_anchorPoint": { @@ -1526,11 +1988,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 39 + "__id__": 57 }, "_enabled": true, "__prefab": { - "__id__": 59 + "__id__": 77 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1538,15 +2000,15 @@ "_color": { "__type__": "cc.Color", "r": 255, - "g": 0, - "b": 0, + "g": 68, + "b": 68, "a": 255 }, "_string": "9999", "_horizontalAlign": 1, "_verticalAlign": 1, - "_actualFontSize": 30, - "_fontSize": 30, + "_actualFontSize": 40, + "_fontSize": 40, "_fontFamily": "Arial", "_lineHeight": 40, "_overflow": 0, @@ -1610,11 +2072,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 38 + "__id__": 56 }, "_enabled": true, "__prefab": { - "__id__": 62 + "__id__": 80 }, "_contentSize": { "__type__": "cc.Size", @@ -1655,20 +2117,20 @@ }, "_children": [ { - "__id__": 65 + "__id__": 83 } ], "_active": false, "_components": [ { - "__id__": 71 + "__id__": 89 }, { - "__id__": 73 + "__id__": 91 } ], "_prefab": { - "__id__": 75 + "__id__": 93 }, "_lpos": { "__type__": "cc.Vec3", @@ -1705,20 +2167,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 64 + "__id__": 82 }, "_children": [], "_active": true, "_components": [ { - "__id__": 66 + "__id__": 84 }, { - "__id__": 68 + "__id__": 86 } ], "_prefab": { - "__id__": 70 + "__id__": 88 }, "_lpos": { "__type__": "cc.Vec3", @@ -1755,11 +2217,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 65 + "__id__": 83 }, "_enabled": true, "__prefab": { - "__id__": 67 + "__id__": 85 }, "_contentSize": { "__type__": "cc.Size", @@ -1783,11 +2245,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 65 + "__id__": 83 }, "_enabled": true, "__prefab": { - "__id__": 69 + "__id__": 87 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1864,11 +2326,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 64 + "__id__": 82 }, "_enabled": true, "__prefab": { - "__id__": 72 + "__id__": 90 }, "_contentSize": { "__type__": "cc.Size", @@ -1892,11 +2354,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 64 + "__id__": 82 }, "_enabled": true, "__prefab": { - "__id__": 74 + "__id__": 92 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1951,17 +2413,17 @@ }, "_children": [ { - "__id__": 77 + "__id__": 95 } ], "_active": false, "_components": [ { - "__id__": 83 + "__id__": 101 } ], "_prefab": { - "__id__": 85 + "__id__": 103 }, "_lpos": { "__type__": "cc.Vec3", @@ -1998,20 +2460,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 76 + "__id__": 94 }, "_children": [], "_active": true, "_components": [ { - "__id__": 78 + "__id__": 96 }, { - "__id__": 80 + "__id__": 98 } ], "_prefab": { - "__id__": 82 + "__id__": 100 }, "_lpos": { "__type__": "cc.Vec3", @@ -2048,11 +2510,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 77 + "__id__": 95 }, "_enabled": true, "__prefab": { - "__id__": 79 + "__id__": 97 }, "_contentSize": { "__type__": "cc.Size", @@ -2076,11 +2538,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 77 + "__id__": 95 }, "_enabled": true, "__prefab": { - "__id__": 81 + "__id__": 99 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2157,11 +2619,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 76 + "__id__": 94 }, "_enabled": true, "__prefab": { - "__id__": 84 + "__id__": 102 }, "_contentSize": { "__type__": "cc.Size", @@ -2202,17 +2664,17 @@ }, "_children": [ { - "__id__": 87 + "__id__": 105 } ], "_active": false, "_components": [ { - "__id__": 93 + "__id__": 111 } ], "_prefab": { - "__id__": 95 + "__id__": 113 }, "_lpos": { "__type__": "cc.Vec3", @@ -2249,20 +2711,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 86 + "__id__": 104 }, "_children": [], "_active": true, "_components": [ { - "__id__": 88 + "__id__": 106 }, { - "__id__": 90 + "__id__": 108 } ], "_prefab": { - "__id__": 92 + "__id__": 110 }, "_lpos": { "__type__": "cc.Vec3", @@ -2299,11 +2761,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 87 + "__id__": 105 }, "_enabled": true, "__prefab": { - "__id__": 89 + "__id__": 107 }, "_contentSize": { "__type__": "cc.Size", @@ -2327,11 +2789,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 87 + "__id__": 105 }, "_enabled": true, "__prefab": { - "__id__": 91 + "__id__": 109 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2408,11 +2870,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 86 + "__id__": 104 }, "_enabled": true, "__prefab": { - "__id__": 94 + "__id__": 112 }, "_contentSize": { "__type__": "cc.Size", @@ -2453,20 +2915,20 @@ }, "_children": [ { - "__id__": 97 + "__id__": 115 }, { - "__id__": 103 + "__id__": 121 } ], "_active": false, "_components": [ { - "__id__": 109 + "__id__": 127 } ], "_prefab": { - "__id__": 111 + "__id__": 129 }, "_lpos": { "__type__": "cc.Vec3", @@ -2503,20 +2965,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 96 + "__id__": 114 }, "_children": [], "_active": true, "_components": [ { - "__id__": 98 + "__id__": 116 }, { - "__id__": 100 + "__id__": 118 } ], "_prefab": { - "__id__": 102 + "__id__": 120 }, "_lpos": { "__type__": "cc.Vec3", @@ -2553,11 +3015,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 97 + "__id__": 115 }, "_enabled": true, "__prefab": { - "__id__": 99 + "__id__": 117 }, "_contentSize": { "__type__": "cc.Size", @@ -2581,11 +3043,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 97 + "__id__": 115 }, "_enabled": true, "__prefab": { - "__id__": 101 + "__id__": 119 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2642,20 +3104,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 96 + "__id__": 114 }, "_children": [], "_active": true, "_components": [ { - "__id__": 104 + "__id__": 122 }, { - "__id__": 106 + "__id__": 124 } ], "_prefab": { - "__id__": 108 + "__id__": 126 }, "_lpos": { "__type__": "cc.Vec3", @@ -2692,11 +3154,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 103 + "__id__": 121 }, "_enabled": true, "__prefab": { - "__id__": 105 + "__id__": 123 }, "_contentSize": { "__type__": "cc.Size", @@ -2720,11 +3182,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 103 + "__id__": 121 }, "_enabled": true, "__prefab": { - "__id__": 107 + "__id__": 125 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2801,11 +3263,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 96 + "__id__": 114 }, "_enabled": true, "__prefab": { - "__id__": 110 + "__id__": 128 }, "_contentSize": { "__type__": "cc.Size", @@ -2846,20 +3308,20 @@ }, "_children": [ { - "__id__": 113 + "__id__": 131 }, { - "__id__": 119 + "__id__": 137 } ], "_active": false, "_components": [ { - "__id__": 125 + "__id__": 143 } ], "_prefab": { - "__id__": 127 + "__id__": 145 }, "_lpos": { "__type__": "cc.Vec3", @@ -2896,20 +3358,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 112 + "__id__": 130 }, "_children": [], "_active": true, "_components": [ { - "__id__": 114 + "__id__": 132 }, { - "__id__": 116 + "__id__": 134 } ], "_prefab": { - "__id__": 118 + "__id__": 136 }, "_lpos": { "__type__": "cc.Vec3", @@ -2946,11 +3408,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 113 + "__id__": 131 }, "_enabled": true, "__prefab": { - "__id__": 115 + "__id__": 133 }, "_contentSize": { "__type__": "cc.Size", @@ -2974,11 +3436,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 113 + "__id__": 131 }, "_enabled": true, "__prefab": { - "__id__": 117 + "__id__": 135 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3035,20 +3497,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 112 + "__id__": 130 }, "_children": [], "_active": true, "_components": [ { - "__id__": 120 + "__id__": 138 }, { - "__id__": 122 + "__id__": 140 } ], "_prefab": { - "__id__": 124 + "__id__": 142 }, "_lpos": { "__type__": "cc.Vec3", @@ -3085,11 +3547,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 119 + "__id__": 137 }, "_enabled": true, "__prefab": { - "__id__": 121 + "__id__": 139 }, "_contentSize": { "__type__": "cc.Size", @@ -3113,11 +3575,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 119 + "__id__": 137 }, "_enabled": true, "__prefab": { - "__id__": 123 + "__id__": 141 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3194,11 +3656,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 112 + "__id__": 130 }, "_enabled": true, "__prefab": { - "__id__": 126 + "__id__": 144 }, "_contentSize": { "__type__": "cc.Size", @@ -3239,17 +3701,17 @@ }, "_children": [ { - "__id__": 129 + "__id__": 147 } ], "_active": false, "_components": [ { - "__id__": 143 + "__id__": 161 } ], "_prefab": { - "__id__": 145 + "__id__": 163 }, "_lpos": { "__type__": "cc.Vec3", @@ -3286,24 +3748,24 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 128 + "__id__": 146 }, "_children": [ { - "__id__": 130 + "__id__": 148 } ], "_active": true, "_components": [ { - "__id__": 138 + "__id__": 156 }, { - "__id__": 140 + "__id__": 158 } ], "_prefab": { - "__id__": 142 + "__id__": 160 }, "_lpos": { "__type__": "cc.Vec3", @@ -3340,23 +3802,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 129 + "__id__": 147 }, "_children": [], "_active": true, "_components": [ { - "__id__": 131 + "__id__": 149 }, { - "__id__": 133 + "__id__": 151 }, { - "__id__": 135 + "__id__": 153 } ], "_prefab": { - "__id__": 137 + "__id__": 155 }, "_lpos": { "__type__": "cc.Vec3", @@ -3393,11 +3855,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 130 + "__id__": 148 }, "_enabled": true, "__prefab": { - "__id__": 132 + "__id__": 150 }, "_contentSize": { "__type__": "cc.Size", @@ -3421,11 +3883,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 130 + "__id__": 148 }, "_enabled": true, "__prefab": { - "__id__": 134 + "__id__": 152 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3492,11 +3954,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 130 + "__id__": 148 }, "_enabled": true, "__prefab": { - "__id__": 136 + "__id__": 154 }, "_alignFlags": 8, "_target": null, @@ -3541,11 +4003,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 129 + "__id__": 147 }, "_enabled": true, "__prefab": { - "__id__": 139 + "__id__": 157 }, "_contentSize": { "__type__": "cc.Size", @@ -3569,11 +4031,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 129 + "__id__": 147 }, "_enabled": true, "__prefab": { - "__id__": 141 + "__id__": 159 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3653,11 +4115,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 128 + "__id__": 146 }, "_enabled": true, "__prefab": { - "__id__": 144 + "__id__": 162 }, "_contentSize": { "__type__": "cc.Size", @@ -3698,7 +4160,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 147 + "__id__": 165 }, "_contentSize": { "__type__": "cc.Size", @@ -3726,7 +4188,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 149 + "__id__": 167 }, "_id": "" }, @@ -3744,7 +4206,7 @@ }, "_enabled": false, "__prefab": { - "__id__": 151 + "__id__": 169 }, "playOnLoad": true, "_clips": [ diff --git a/assets/script/game/skill/Skill.ts b/assets/script/game/skill/Skill.ts index af6e0e0a..c6e2f69c 100644 --- a/assets/script/game/skill/Skill.ts +++ b/assets/script/game/skill/Skill.ts @@ -210,7 +210,7 @@ export class Skill extends ecs.Entity { const sBck = (config.bck ?? 0)+SUp.bck*skill_lv; const sAp =config.ap+SUp.ap*skill_lv; const sHit=config.hit_count+SUp.hit_count*skill_lv + cAttrsComp.puncture - sDataCom.Attrs[Attrs.ap] = Math.floor(cAttrsComp.ap*sAp); + sDataCom.Attrs[Attrs.ap] = Math.floor(cAttrsComp.ap*sAp/100); sDataCom.Attrs[Attrs.critical] = cAttrsComp.critical + sCrt; sDataCom.Attrs[Attrs.freeze_chance] = cAttrsComp.freeze_chance + sFrz; sDataCom.Attrs[Attrs.back_chance] = cAttrsComp.back_chance + sBck; From abcbeff9abaf364f473695aa43e751d77217f663 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 10:16:31 +0800 Subject: [PATCH 02/15] =?UTF-8?q?feat:=20=E4=B8=BA=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=B7=BB=E5=8A=A0=E9=98=B5=E8=90=A5=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 扩展 Tooltip 系统以支持根据伤害来源的阵营(英雄或怪物)显示不同的文本标签。修改 HeroViewComp 调用时传递阵营信息,TooltipCom 根据阵营选择对应的本地化键名。同时调整了工具提示预制件的默认激活状态和文本颜色。 --- assets/resources/game/skill/buff/tooltip.prefab | 8 ++++---- assets/script/game/hero/HeroViewComp.ts | 2 +- assets/script/game/skill/Tooltip.ts | 6 +++--- assets/script/game/skill/TooltipCom.ts | 8 +++++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/assets/resources/game/skill/buff/tooltip.prefab b/assets/resources/game/skill/buff/tooltip.prefab index ca2c6ce3..2ff08b71 100644 --- a/assets/resources/game/skill/buff/tooltip.prefab +++ b/assets/resources/game/skill/buff/tooltip.prefab @@ -106,7 +106,7 @@ "__id__": 3 } ], - "_active": true, + "_active": false, "_components": [ { "__id__": 17 @@ -565,7 +565,7 @@ "__id__": 21 } ], - "_active": true, + "_active": false, "_components": [ { "__id__": 35 @@ -2000,8 +2000,8 @@ "_color": { "__type__": "cc.Color", "r": 255, - "g": 68, - "b": 68, + "g": 140, + "b": 0, "a": 255 }, "_string": "9999", diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index e50514d2..981aa2bd 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -286,7 +286,7 @@ export class HeroViewComp extends CCComp { // 起点设为怪物中心位置 + 20偏移 let ny = this.node.position.y + halfHeight + 20; let pos = v3(x, ny, 0); - Tooltip.load(pos, type, value, s_uuid, this.node.parent); + Tooltip.load(pos, type, value, s_uuid, this.node.parent, 1, this.model?.fac ?? FacSet.MON); } /** 护盾吸收提示 */ diff --git a/assets/script/game/skill/Tooltip.ts b/assets/script/game/skill/Tooltip.ts index cac8743c..928fe884 100644 --- a/assets/script/game/skill/Tooltip.ts +++ b/assets/script/game/skill/Tooltip.ts @@ -1,6 +1,6 @@ import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; -import { BoxSet } from "../common/config/GameSet"; +import { BoxSet, FacSet } from "../common/config/GameSet"; import { SkillSet } from "../common/config/SkillSet"; import { smc } from "../common/SingletonModuleComp"; import { TooltipCom } from "./TooltipCom"; @@ -60,7 +60,7 @@ export class Tooltip extends ecs.Entity { this.remove(TooltipCom); super.destroy(); } - static load(pos: Vec3 = Vec3.ZERO,type:number=1,vaule:string="",s_uuid:number=1001,parent:any=null,cd:number=1) { + static load(pos: Vec3 = Vec3.ZERO,type:number=1,vaule:string="",s_uuid:number=1001,parent:any=null,cd:number=1,fac:number=FacSet.MON) { let node: Node; if (Tooltip.pool.size() > 0) { node = Tooltip.pool.get()!; @@ -75,7 +75,7 @@ export class Tooltip extends ecs.Entity { node.active = true; var sv = node.getComponent(TooltipCom)!; - sv.init(type, vaule, s_uuid); + sv.init(type, vaule, s_uuid, fac); // this.add(sv); // 不要添加到单例实体上,否则会覆盖或导致单例被销毁 } diff --git a/assets/script/game/skill/TooltipCom.ts b/assets/script/game/skill/TooltipCom.ts index 97157dc0..053d39cf 100644 --- a/assets/script/game/skill/TooltipCom.ts +++ b/assets/script/game/skill/TooltipCom.ts @@ -2,7 +2,7 @@ import { _decorator, Collider2D, Contact2DType, v3, IPhysics2DContact, Vec3, twe import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { SkillSet } from "../common/config/SkillSet"; -import { TooltipTypes } from "../common/config/GameSet"; +import { FacSet, TooltipTypes } from "../common/config/GameSet"; import { Tooltip } from "./Tooltip"; const { ccclass, property } = _decorator; @@ -14,6 +14,7 @@ export class TooltipCom extends CCComp { stype: number = 1; // 1:减少生命值,2:增加生命值,3:技能图标 value: string = ""; s_uuid: number = 1001; + fac: number = FacSet.MON; // 动画参数配置 private readonly popDuration = 0.15; @@ -28,10 +29,11 @@ export class TooltipCom extends CCComp { } /** 初始化并播放动画 */ - init(type: number, value: string, uuid: number) { + init(type: number, value: string, uuid: number, fac: number = FacSet.MON) { this.stype = type; this.value = value; this.s_uuid = uuid; + this.fac = fac; // 初始化或获取 UIOpacity 组件 this._uiOpacity = this.node.getComponent(UIOpacity); @@ -76,7 +78,7 @@ export class TooltipCom extends CCComp { case TooltipTypes.life: // 普通伤害 this.node.setPosition(v3(this.node.position.x + offsetX, currentY)); this.node.setSiblingIndex(topSiblingIndex); - this.setupLabel("loss_life", "hp", this.value); + this.setupLabel(this.fac === FacSet.HERO ? "hloss" : "loss_life", "hp", this.value); scaleMax = 1.5; break; case TooltipTypes.health: // 治疗 From 382f6d2b32355aa9e254982c8d8a72608c4a9825 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 10:25:12 +0800 Subject: [PATCH 03/15] =?UTF-8?q?fix(=E6=8A=80=E8=83=BD):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=8A=80=E8=83=BD=E7=AD=89=E7=BA=A7=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E9=94=99=E8=AF=AF=EF=BC=8C=E9=BB=98=E8=AE=A4=E7=AD=89=E7=BA=A7?= =?UTF-8?q?=E4=BB=8E1=E6=94=B9=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将技能相关计算的默认等级从1统一修正为0,确保等级计算逻辑的一致性。具体包括: - HeroAttrsComp.getSkillLevel() 方法在无效技能ID时返回0 - Hero实体构建技能模型时使用Math.max确保最低等级为0 - SDataCom组件初始化skill_lv为0 - Skill实体加载时skill_lv参数默认值改为0,计算时使用Math.max(0, skill_lv) --- assets/script/game/hero/Hero.ts | 4 ++-- assets/script/game/hero/HeroAttrsComp.ts | 4 ++-- assets/script/game/skill/SDataCom.ts | 4 ++-- assets/script/game/skill/Skill.ts | 14 +++++++------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index 425af663..4b2999b4 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -83,8 +83,8 @@ export class Hero extends ecs.Entity { for (const key in hero.skills) { const skill = hero.skills[key]; if (!skill) continue; - //用于增量 计算最终技能等级:英雄等级与技能初始等级均从1开始,需各减1抵消,故-2 - model.skills[skill.uuid] = { ...skill, lv: skill.lv + hero_lv - 2, ccd: skill.cd }; + //用于增量 计算最终技能等级:英雄等级与技能初始等级均从1开始,需各减1抵消,故-2,最低等级时0 + model.skills[skill.uuid] = { ...skill, lv: Math.max(0,skill.lv + hero_lv - 2), ccd: skill.cd }; } model.updateSkillDistanceCache(); diff --git a/assets/script/game/hero/HeroAttrsComp.ts b/assets/script/game/hero/HeroAttrsComp.ts index 33774450..29b2d39c 100644 --- a/assets/script/game/hero/HeroAttrsComp.ts +++ b/assets/script/game/hero/HeroAttrsComp.ts @@ -139,8 +139,8 @@ export class HeroAttrsComp extends ecs.Comp { return this.frost_end_time > 0 } getSkillLevel(skillId: number): number { - if (!skillId) return 1; - return this.skills[skillId]?.lv ?? 1; + if (!skillId) return 0; + return this.skills[skillId]?.lv ?? 0; } getSkillIds(): number[] { diff --git a/assets/script/game/skill/SDataCom.ts b/assets/script/game/skill/SDataCom.ts index 586db0aa..a2de7063 100644 --- a/assets/script/game/skill/SDataCom.ts +++ b/assets/script/game/skill/SDataCom.ts @@ -11,7 +11,7 @@ export class SDataCom extends ecs.Comp { group:BoxSet=BoxSet.HERO fac: number = 0; // 0:hero 1:monster s_uuid:number=0 - skill_lv:number=1 + skill_lv:number=0 ext_dmg:number=0 //额外伤害 dmg_ratio:number=1 //伤害比例 hit_count:number=0 //击中数量 @@ -21,7 +21,7 @@ export class SDataCom extends ecs.Comp { this.group=BoxSet.HERO this.fac=0 this.s_uuid=0 - this.skill_lv=1 + this.skill_lv=0 this.casterEid = -1; this.hit_count=0 this.max_hit_count=0 diff --git a/assets/script/game/skill/Skill.ts b/assets/script/game/skill/Skill.ts index c6e2f69c..ec249583 100644 --- a/assets/script/game/skill/Skill.ts +++ b/assets/script/game/skill/Skill.ts @@ -101,7 +101,7 @@ export class Skill extends ecs.Entity { this.addComponents(SMoveDataComp); } load(startPos: Vec3, parent: Node, s_uuid: number, targetPos: Vec3, - caster:HeroViewComp,cAttrsComp:HeroAttrsComp, skill_lv:number=1, ext_dmg:number=0) { + caster:HeroViewComp,cAttrsComp:HeroAttrsComp, skill_lv:number=0, ext_dmg:number=0) { const config = SkillSet[s_uuid]; if (!config) { mLogger.error(this.debugMode, 'Skill', "[Skill] 技能配置不存在:", s_uuid); @@ -205,17 +205,17 @@ export class Skill extends ecs.Entity { sDataCom.casterEid=caster.ent.eid sDataCom.Attrs = {}; const SUp=SkillUpList[s_uuid] ? SkillUpList[s_uuid]:SkillUpList[1001]; - const sCrt = (config.crt ?? 0)+SUp.crt*skill_lv; - const sFrz = (config.frz ?? 0)+SUp.frz*skill_lv; - const sBck = (config.bck ?? 0)+SUp.bck*skill_lv; - const sAp =config.ap+SUp.ap*skill_lv; - const sHit=config.hit_count+SUp.hit_count*skill_lv + cAttrsComp.puncture + const sCrt = (config.crt ?? 0)+(SUp.crt*skill_lv); + const sFrz = (config.frz ?? 0)+(SUp.frz*skill_lv); + const sBck = (config.bck ?? 0)+(SUp.bck*skill_lv); + const sAp =config.ap+(SUp.ap*skill_lv); + const sHit=config.hit_count+(SUp.hit_count*skill_lv) + cAttrsComp.puncture sDataCom.Attrs[Attrs.ap] = Math.floor(cAttrsComp.ap*sAp/100); sDataCom.Attrs[Attrs.critical] = cAttrsComp.critical + sCrt; sDataCom.Attrs[Attrs.freeze_chance] = cAttrsComp.freeze_chance + sFrz; sDataCom.Attrs[Attrs.back_chance] = cAttrsComp.back_chance + sBck; sDataCom.s_uuid=s_uuid - sDataCom.skill_lv = Math.max(1, skill_lv); + sDataCom.skill_lv = Math.max(0, skill_lv); sDataCom.fac=cAttrsComp.fac sDataCom.ext_dmg=ext_dmg sDataCom.hit_count = 0 From b51a68bc8f8da7cbee137d52fc7c2f57d662babd Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 10:31:07 +0800 Subject: [PATCH 04/15] =?UTF-8?q?fix(=E6=8A=80=E8=83=BD):=20=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E5=8F=8B=E6=96=B9=E6=8A=80=E8=83=BD=E6=95=88=E6=9E=9C?= =?UTF-8?q?=E4=B8=ADAP=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将AP加成除以100以匹配正确的数值比例,避免技能效果过强 --- assets/script/game/hero/SCastSystem.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/script/game/hero/SCastSystem.ts b/assets/script/game/hero/SCastSystem.ts index a619cfde..8cee4320 100644 --- a/assets/script/game/hero/SCastSystem.ts +++ b/assets/script/game/hero/SCastSystem.ts @@ -195,7 +195,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate private applyFriendlySkillEffects(_s_uuid: number, _skillLv: number, config: SkillConfig, _heroView: HeroViewComp, _cAttrsComp: HeroAttrsComp, targets: HeroViewComp[], _targetPos: Vec3 | null) { const kind = config.kind ?? SkillKind.Support; const sUp = SkillUpList[_s_uuid] ?? SkillUpList[1001]; - const sAp =config.ap+sUp.ap*_skillLv; + const sAp =(config.ap+sUp.ap*_skillLv)/100; const sHit=config.hit_count+sUp.hit_count*_skillLv; const selectedTargets = this.pickRandomFriendlyTargets(targets, sHit); const applyTargets = kind === SkillKind.Heal ? this.sortTargetsByLowestHp(selectedTargets) : selectedTargets; @@ -204,10 +204,11 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate const model = target.ent.get(HeroAttrsComp); if (!model || model.is_dead) continue; if (kind === SkillKind.Heal && sAp !== 0) { - const addHp = model.add_hp(sAp*_cAttrsComp.ap); + const addHp = Math.floor(model.add_hp(sAp*_cAttrsComp.ap)); target.health(addHp); } else if (kind === SkillKind.Shield && sAp !== 0) { - model.add_shield(sAp*_cAttrsComp.ap); + const addShield = Math.floor(sAp*_cAttrsComp.ap); + model.add_shield(addShield); } if (!config.buffs || config.buffs.length === 0) continue; for (const buffConf of config.buffs) { From c3badecd7130792dcd9190e4d45d1e220b60b20a Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 10:39:47 +0800 Subject: [PATCH 05/15] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E6=8A=80?= =?UTF-8?q?=E8=83=BDAP=E7=99=BE=E5=88=86=E6=AF=94=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复技能AP百分比计算逻辑,移除重复除以100的操作。在Skill.ts中移除多余注释,在SCastSystem.ts中正确计算治疗量,确保技能AP作为百分比值正确处理。 --- assets/script/game/hero/SCastSystem.ts | 5 +++-- assets/script/game/skill/Skill.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/script/game/hero/SCastSystem.ts b/assets/script/game/hero/SCastSystem.ts index 8cee4320..a598771c 100644 --- a/assets/script/game/hero/SCastSystem.ts +++ b/assets/script/game/hero/SCastSystem.ts @@ -195,7 +195,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate private applyFriendlySkillEffects(_s_uuid: number, _skillLv: number, config: SkillConfig, _heroView: HeroViewComp, _cAttrsComp: HeroAttrsComp, targets: HeroViewComp[], _targetPos: Vec3 | null) { const kind = config.kind ?? SkillKind.Support; const sUp = SkillUpList[_s_uuid] ?? SkillUpList[1001]; - const sAp =(config.ap+sUp.ap*_skillLv)/100; + const sAp =config.ap+sUp.ap*_skillLv; const sHit=config.hit_count+sUp.hit_count*_skillLv; const selectedTargets = this.pickRandomFriendlyTargets(targets, sHit); const applyTargets = kind === SkillKind.Heal ? this.sortTargetsByLowestHp(selectedTargets) : selectedTargets; @@ -204,7 +204,8 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate const model = target.ent.get(HeroAttrsComp); if (!model || model.is_dead) continue; if (kind === SkillKind.Heal && sAp !== 0) { - const addHp = Math.floor(model.add_hp(sAp*_cAttrsComp.ap)); + const addHp = Math.floor(sAp*_cAttrsComp.ap/100);//技能的ap是百分值 需要/100 + model.add_hp(addHp); target.health(addHp); } else if (kind === SkillKind.Shield && sAp !== 0) { const addShield = Math.floor(sAp*_cAttrsComp.ap); diff --git a/assets/script/game/skill/Skill.ts b/assets/script/game/skill/Skill.ts index ec249583..5c8d2282 100644 --- a/assets/script/game/skill/Skill.ts +++ b/assets/script/game/skill/Skill.ts @@ -210,7 +210,7 @@ export class Skill extends ecs.Entity { const sBck = (config.bck ?? 0)+(SUp.bck*skill_lv); const sAp =config.ap+(SUp.ap*skill_lv); const sHit=config.hit_count+(SUp.hit_count*skill_lv) + cAttrsComp.puncture - sDataCom.Attrs[Attrs.ap] = Math.floor(cAttrsComp.ap*sAp/100); + sDataCom.Attrs[Attrs.ap] = Math.floor(cAttrsComp.ap*sAp/100); //技能的ap是百分值 需要/100 而且需要再最终计算总ap时再/100,不然会出现ap为90%变0 sDataCom.Attrs[Attrs.critical] = cAttrsComp.critical + sCrt; sDataCom.Attrs[Attrs.freeze_chance] = cAttrsComp.freeze_chance + sFrz; sDataCom.Attrs[Attrs.back_chance] = cAttrsComp.back_chance + sBck; From b62e6649cba3f8bb8d4f8ef4a5a24e0fc16be655 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 10:44:37 +0800 Subject: [PATCH 06/15] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E7=94=9F?= =?UTF-8?q?=E5=91=BD=E5=80=BC=E7=89=B9=E6=95=88=E8=A7=A6=E5=8F=91=E9=98=88?= =?UTF-8?q?=E5=80=BC=E4=BB=8E99=E6=94=B9=E4=B8=BA20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免低生命值时频繁触发特效和提示,优化游戏体验。 --- assets/script/game/hero/HeroViewComp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 981aa2bd..642a9f44 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -367,7 +367,7 @@ export class HeroViewComp extends CCComp { health(hp: number = 0) { // ✅ 仅显示特效和提示,不调用 hp_show() - if(hp<=99) return; + if(hp<=20) return; this.heathed(); this.hp_tip(TooltipTypes.health, hp.toFixed(0)); this.lastBarUpdateTime = Date.now() / 1000; From 33e549d22c25cff3a5744f3e742acd0cc04a45c9 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 14:29:54 +0800 Subject: [PATCH 07/15] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8A=80?= =?UTF-8?q?=E8=83=BD=E5=86=B7=E5=8D=B4=E6=97=B6=E9=97=B4=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=92=8C=E6=B2=BB=E7=96=97=E7=89=B9=E6=95=88=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将技能初始化时的冷却时间设为0,避免首次使用时需要等待完整冷却 - 修正HeroViewComp中health方法错误调用heathed属性而非方法的问题 --- assets/script/game/hero/Hero.ts | 2 +- assets/script/game/hero/HeroViewComp.ts | 2 +- assets/script/game/hero/Mon.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index 4b2999b4..4dbf3023 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -84,7 +84,7 @@ export class Hero extends ecs.Entity { const skill = hero.skills[key]; if (!skill) continue; //用于增量 计算最终技能等级:英雄等级与技能初始等级均从1开始,需各减1抵消,故-2,最低等级时0 - model.skills[skill.uuid] = { ...skill, lv: Math.max(0,skill.lv + hero_lv - 2), ccd: skill.cd }; + model.skills[skill.uuid] = { ...skill, lv: Math.max(0,skill.lv + hero_lv - 2), ccd: 0 }; } model.updateSkillDistanceCache(); diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 642a9f44..a3fe7ada 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -368,7 +368,7 @@ export class HeroViewComp extends CCComp { health(hp: number = 0) { // ✅ 仅显示特效和提示,不调用 hp_show() if(hp<=20) return; - this.heathed(); + this.heathed this.hp_tip(TooltipTypes.health, hp.toFixed(0)); this.lastBarUpdateTime = Date.now() / 1000; } diff --git a/assets/script/game/hero/Mon.ts b/assets/script/game/hero/Mon.ts index e90d3bee..f9fb74a1 100644 --- a/assets/script/game/hero/Mon.ts +++ b/assets/script/game/hero/Mon.ts @@ -145,7 +145,7 @@ export class Monster extends ecs.Entity { for (const key in hero.skills) { const skill = hero.skills[key]; if (!skill) continue; - model.skills[skill.uuid] = { ...skill, ccd: skill.cd }; + model.skills[skill.uuid] = { ...skill, ccd: 0 }; } model.updateSkillDistanceCache(); //根据刷怪控制脚本对ap和hp进行加强 From 23cc99257993bf65dadad47baa5c0bf5666dde02 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 14:31:06 +0800 Subject: [PATCH 08/15] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20HeroViewComp?= =?UTF-8?q?=20=E4=B8=AD=20health=20=E6=96=B9=E6=B3=95=E5=86=85=E7=9A=84?= =?UTF-8?q?=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/script/game/hero/HeroViewComp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index a3fe7ada..642a9f44 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -368,7 +368,7 @@ export class HeroViewComp extends CCComp { health(hp: number = 0) { // ✅ 仅显示特效和提示,不调用 hp_show() if(hp<=20) return; - this.heathed + this.heathed(); this.hp_tip(TooltipTypes.health, hp.toFixed(0)); this.lastBarUpdateTime = Date.now() / 1000; } From 1fa2be19f7f607a494b935d17c915c5d19b86148 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 14:40:04 +0800 Subject: [PATCH 09/15] =?UTF-8?q?refactor(hero):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=8B=B1=E9=9B=84=E4=B8=8E=E6=80=AA=E7=89=A9=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E4=B8=8E=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 统一英雄与怪物实体加载流程,增强代码可读性与维护性 - 为 Hero.ts 与 Mon.ts 添加详细方法级注释,说明组件职责与关键逻辑 - 在配置文件中将攻击速度(as)注释更新为技能冷却(skills[0].cd),使配置项含义更清晰 - 修复怪物技能等级未随怪物等级提升的问题,使其与英雄逻辑保持一致 - 优化对象池管理,增加容量统计与调试信息 --- assets/script/game/common/config/heroSet.ts | 12 +-- assets/script/game/hero/Hero.ts | 74 ++++++++++++------ assets/script/game/hero/Mon.ts | 83 +++++++++++++++------ 3 files changed, 120 insertions(+), 49 deletions(-) diff --git a/assets/script/game/common/config/heroSet.ts b/assets/script/game/common/config/heroSet.ts index 56fb9f4f..33fce2bb 100644 --- a/assets/script/game/common/config/heroSet.ts +++ b/assets/script/game/common/config/heroSet.ts @@ -86,12 +86,12 @@ export interface HSkillInfo { * skills[0]是普通攻击技能 * skills[1]是等级1时的技能,skills[2]是等级2时的技能,skills[3]是等级3时的技能,最多3级 * - * 属性基准(cards_lv:1,lv:1) : SPEED:120,AP:30 |HP:300|as:1 - * 坦克(cards_lv:1,lv:1) : SPEED:180,AP:25 |HP:450|as:0.75 - * 近战dps(cards_lv:1,lv:1) : SPEED:180,AP:50 |HP:250|as:1.1 - * 远程dps(cards_lv:1,lv:1) : SPEED:120,AP:60 |HP:150|as:1.3 - *远程法dps(cards_lv:1,lv:1) : SPEED:100,AP:60 |HP:150|as:1.4 - * 远程辅助(cards_lv:1,lv:1) : SPEED:100,AP:20 |HP:150|as:1 + * 属性基准(cards_lv:1,lv:1) : SPEED:120,AP:30 | HP:300 | skills[0].cd=1 + * 坦克(cards_lv:1,lv:1) : SPEED:180,AP:25 | HP:450 | skills[0].cd=0.75 + * 近战dps(cards_lv:1,lv:1) : SPEED:180,AP:50 | HP:250 | skills[0].cd=1.1 + * 远程dps(cards_lv:1,lv:1) : SPEED:120,AP:60 | HP:150 | skills[0].cd=1.3 + *远程法dps(cards_lv:1,lv:1) : SPEED:100,AP:60 | HP:150 | skills[0].cd=1.4 + * 远程辅助(cards_lv:1,lv:1) : SPEED:100,AP:20 | HP:150 | skills[0].cd=1 */ export const HeroInfo: Record = { diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index 4dbf3023..ca71cf72 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -10,14 +10,20 @@ import { GameEvent } from "../common/config/GameEvent"; import { Attrs} from "../common/config/HeroAttrs"; import { MoveComp } from "./MoveComp"; import { mLogger } from "../common/Logger"; -/** 角色实体 */ +/** 英雄实体:负责英雄节点创建、属性初始化、入场动画与销毁流程 */ @ecs.register(`Hero`) export class Hero extends ecs.Entity { + /** 英雄数据组件引用 */ HeroModel!: HeroAttrsComp; + /** 英雄表现组件引用 */ View!: HeroViewComp; + /** 英雄移动组件引用 */ HeroMove!: MoveComp; - debugMode: boolean = false; // 是否启用调试模式 + /** 调试开关,开启后输出实体层级等调试信息 */ + debugMode: boolean = false; + + /** 注册实体必需组件:移动 + 属性 */ protected init() { this.addComponents( MoveComp, @@ -25,88 +31,111 @@ export class Hero extends ecs.Entity { ); } + /** 销毁实体并释放视图节点,防止残留碰撞体与显示对象 */ destroy(): void { - // 销毁节点,防止视觉残留 + // 优先销毁节点,避免实体销毁后场景仍残留可见对象 const view = this.get(HeroViewComp); if (view && view.node && view.node.isValid) { view.node.destroy(); } + // 手动移除组件,确保 ecs 侧引用及时释放 this.remove(HeroViewComp); this.remove(HeroAttrsComp); super.destroy(); } - /** 加载角色 */ + /** + * 加载并初始化英雄 + * 1) 创建节点并挂到 HERO 层 + * 2) 初始化表现与属性数据 + * 3) 播放下落入场并在落地后启用碰撞与移动 + */ load(pos: Vec3 = Vec3.ZERO,scale:number = 1,uuid:number=1001, dropToY:number = pos.y,hero_lv:number=1) { + // 英雄始终朝右,表现缩放固定为正向 scale = 1 + // 英雄等级在当前规则下上限为 3,避免超配表范围 if(hero_lv>3) hero_lv=3 - // 查找空闲英雄槽位 + // 英雄尺寸随等级做轻量放大,强化成长反馈 let size=1+0.1*hero_lv + // 根据配置路径加载英雄预制体 var path = "game/heros/"+HeroInfo[uuid].path; var prefab: Prefab = oops.res.get(path, Prefab)!; var node = instantiate(prefab); var scene = smc.map.MapView.scene; + // 统一挂到实体显示层 HERO 节点下 node.parent = scene.entityLayer!.node!.getChildByName("HERO")!; const collider = node.getComponent(BoxCollider2D); - if (collider) collider.enabled = false; // 先禁用 + // 入场过程暂不参与碰撞,防止半空触发战斗逻辑 + if (collider) collider.enabled = false; node.setScale(size*node.scale.x,size*node.scale.y); node.setPosition(pos) - // 🔥 设置初始 SiblingIndex - 英雄基础层级 + 位置偏移 - + // 输出节点层级信息,便于排查遮挡与渲染顺序问题 mLogger.log(this.debugMode,"hero",node.getSiblingIndex()); var hv = node.getComponent(HeroViewComp)!; const model = this.get(HeroAttrsComp); - let hero = HeroInfo[uuid]; // 共用英雄数据 + // 从配置中读取英雄静态数据 + let hero = HeroInfo[uuid]; - // 设置 View 层属性(表现相关) + // 视图层参数:朝向与碰撞阵营 hv.scale = 1; hv.box_group = BoxSet.HERO; - // 设置 Model 层属性(数据相关) + // 模型层参数:身份、阵营、等级、职业 model.hero_uuid = uuid; model.hero_name = hero.name; model.lv = hero_lv; model.type = hero.type; model.fac = FacSet.HERO; - // 只有主角才挂载天赋组件 - - // ✅ 初始化技能数据(迁移到 HeroSkillsComp) - // 设置基础属性 + // 基础属性按等级倍率初始化 model.ap = hero.ap*model.lv; model.hp= model.hp_max = hero.hp*model.lv; model.speed = hero.speed; + + // 构建技能表并注入运行时冷却字段 ccd model.skills = {}; for (const key in hero.skills) { const skill = hero.skills[key]; if (!skill) continue; - //用于增量 计算最终技能等级:英雄等级与技能初始等级均从1开始,需各减1抵消,故-2,最低等级时0 + // 最终技能等级 = 初始技能等级 + 英雄等级增量,且下限为 0 model.skills[skill.uuid] = { ...skill, lv: Math.max(0,skill.lv + hero_lv - 2), ccd: 0 }; } + // 缓存技能射程等派生数据,减少战斗帧内重复计算 model.updateSkillDistanceCache(); - // 初始化 buff/debuff 系统 + // 初始化属性系统(buff/debuff 等动态属性容器) model.initAttrs(); + + // 将视图组件注册到实体,打通逻辑与表现 this.add(hv); + // 广播主角召唤事件,触发外部系统监听逻辑 oops.message.dispatchEvent(GameEvent.MasterCalled,{uuid:uuid}) + + // 初始化移动组件:方向、目标 X、站位基准 Y const move = this.get(MoveComp); - move.direction = 1; // 向右移动 + move.direction = 1; move.targetX = resolveFormationTargetX(model.fac, model.type); move.baseY = dropToY; move.moving = false; + + // 依据下落距离自适应入场时长,保证手感稳定 const dropDistance = Math.abs(pos.y - dropToY); const dropDuration = Math.max(0.18, Math.min(0.38, dropDistance / 1200)); + + // 停止旧动画后执行下落 tween,避免复用节点时动画叠加 Tween.stopAllByTarget(node); tween(node) .to(dropDuration, { position: v3(pos.x, dropToY, 0) }) .call(() => { if (!node || !node.isValid) return; + // 落地后锁定最终位置,切换到落地完成状态 node.setPosition(pos.x, dropToY, 0); hv.playEnd("down"); move.moving = true; + // 落地后再启用碰撞,避免空中阶段触发伤害结算 if (collider) { collider.enabled = true; collider.group = BoxSet.HERO; @@ -114,26 +143,29 @@ export class Hero extends ecs.Entity { } }) .start(); + // 维护关卡内英雄数量统计 smc.vmdata.mission_data.hero_num++ } + /** 重置入口:复用 destroy 的释放流程 */ reset() { - // 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放 super.destroy(); } } +/** 英雄生命周期系统:监听实体进入与移除并输出调试日志 */ @ecs.register('HeroLifecycleSystem') export class HeroLifecycleSystem extends ecs.ComblockSystem implements ecs.IEntityEnterSystem, ecs.IEntityRemoveSystem { + /** 仅处理拥有 MoveComp 的实体 */ filter() { return ecs.allOf(MoveComp); } + /** 实体进入世界时记录日志 */ entityEnter(e: ecs.Entity): void { - // 英雄实体创建时的特殊处理 const heroAttrs = e.get(HeroAttrsComp); if (heroAttrs) { mLogger.log(heroAttrs.debugMode, 'HeroLifecycle', `英雄进入世界: ${heroAttrs.hero_name}`); @@ -142,8 +174,8 @@ export class HeroLifecycleSystem extends ecs.ComblockSystem } } + /** 实体离开世界时记录日志 */ entityRemove(e: ecs.Entity): void { - // 英雄实体销毁时的清理工作 const heroAttrs = e.get(HeroAttrsComp); if (heroAttrs) { mLogger.log(heroAttrs.debugMode, 'HeroLifecycle', `英雄离开世界: ${heroAttrs.hero_name}`); diff --git a/assets/script/game/hero/Mon.ts b/assets/script/game/hero/Mon.ts index f9fb74a1..e14c8b7d 100644 --- a/assets/script/game/hero/Mon.ts +++ b/assets/script/game/hero/Mon.ts @@ -8,18 +8,26 @@ import { HeroAttrsComp } from "./HeroAttrsComp"; import { HeroViewComp } from "./HeroViewComp"; import { MoveComp } from "./MoveComp"; import { mLogger } from "../common/Logger"; -/** 角色实体 */ +/** 怪物实体:负责怪物对象池复用、属性初始化、入场动画与回收 */ @ecs.register(`Monster`) export class Monster extends ecs.Entity { + /** 怪物数据组件引用 */ HeroModel!: HeroAttrsComp; + /** 怪物表现组件引用 */ HeroView!: HeroViewComp; + /** 怪物移动组件引用 */ MonMove!: MoveComp; - private debugMode: boolean = false; // 是否启用调试模式 + /** 调试开关,控制生命周期日志输出 */ + private debugMode: boolean = false; - // 多键对象池:Map + /** 多键对象池:key 为 prefab 路径,value 为对应节点池 */ static pools: Map = new Map(); + /** 单个路径的池容量上限 */ static readonly MAX_POOL_SIZE: number = 12; + /** 所有路径合计池容量上限 */ static readonly MAX_POOL_TOTAL: number = 60; + + /** 计算当前所有对象池节点总量 */ private static totalPoolSize(): number { let total = 0; this.pools.forEach((pool) => { @@ -28,6 +36,7 @@ export class Monster extends ecs.Entity { return total; } + /** 从指定路径对象池取可用节点,取不到返回 null */ static getFromPool(path: string): Node | null { if (this.pools.has(path)) { const pool = this.pools.get(path)!; @@ -41,6 +50,7 @@ export class Monster extends ecs.Entity { return null; } + /** 节点回收到对象池,超上限则直接销毁 */ static putToPool(path: string, node: Node) { if (!node || !node.isValid) return; if (!this.pools.has(path)) { @@ -54,6 +64,7 @@ export class Monster extends ecs.Entity { pool.put(node); } + /** 清空所有对象池并销毁池内节点 */ static clearPools() { this.pools.forEach((pool) => { while (pool.size() > 0) { @@ -67,6 +78,7 @@ export class Monster extends ecs.Entity { this.pools.clear(); } + /** 获取对象池统计信息,用于调试与容量监控 */ static getPoolStats() { let total = 0; this.pools.forEach((pool) => { @@ -80,6 +92,7 @@ export class Monster extends ecs.Entity { }; } + /** 注册实体必需组件:移动 + 属性 */ protected init() { this.addComponents( MoveComp, @@ -87,8 +100,9 @@ export class Monster extends ecs.Entity { ); } + /** 销毁实体:优先回收节点,然后释放组件 */ destroy(): void { - // 回收节点到对象池 + // 按英雄路径回收到对象池,提升高频刷怪性能 const model = this.get(HeroAttrsComp); const view = this.get(HeroViewComp); if (model && view && view.node && view.node.isValid) { @@ -96,28 +110,39 @@ export class Monster extends ecs.Entity { Monster.putToPool(path, view.node); } + // 手动移除组件,避免 ecs 引用滞留 this.remove(HeroViewComp); this.remove(HeroAttrsComp); super.destroy(); } - /** 加载角色 */ - load(pos: Vec3 = Vec3.ZERO,scale:number = 1,uuid:number=1001, is_boss:boolean=false, dropToY:number = pos.y) { + /** + * 加载并初始化怪物 + * 1) 优先对象池复用节点,减少实例化开销 + * 2) 初始化表现、属性、技能与阵营 + * 3) 播放下落入场并在落地后启用碰撞与移动 + */ + load(pos: Vec3 = Vec3.ZERO,scale:number = 1,uuid:number=1001, is_boss:boolean=false, dropToY:number = pos.y,mon_lv:number=1) { + // 怪物默认朝左,表现缩放固定为负向 scale=-1 + // 当前怪物尺寸固定,保留变量便于后续扩展 let size=1 var scene = smc.map.MapView.scene; + // 根据配置读取怪物预制体路径 var path = "game/heros/"+HeroInfo[uuid].path; - // 尝试从池中获取 + // 优先从对象池取节点,未命中时再实例化 let node = Monster.getFromPool(path); if (!node) { var prefab: Prefab = oops.res.get(path, Prefab)!; node = instantiate(prefab); } + // 统一挂到实体显示层 HERO 节点下 node.parent = scene.entityLayer!.node!.getChildByName("HERO")!; var view = node.getComponent(HeroViewComp)!; const collider = node.getComponent(BoxCollider2D); + // 入场期间关闭碰撞,防止下落时提前参与战斗 if (collider) { collider.enabled = false; } @@ -125,54 +150,64 @@ export class Monster extends ecs.Entity { node.setScale(size*node.scale.x,size*node.scale.y); node.setPosition(pos) const model = this.get(HeroAttrsComp); - let hero = HeroInfo[uuid]; // 共用英雄数据 - // 设置 View 层属性(表现相关) + // 从配置表获取怪物静态数据 + let hero = HeroInfo[uuid]; + // 视图层参数:朝向与碰撞阵营 view.scale = scale; view.box_group = BoxSet.MONSTER; - // 设置 Model 层属性 基础属性 + // 模型层参数:身份、阵营、基础数值 model.hero_uuid = uuid; model.hero_name = hero.name; model.hp = model.hp_max = hero.hp; model.ap = hero.ap; - model.speed = hero.speed; // 使用成长后的速度 + model.speed = hero.speed; model.type = hero.type; model.fac = FacSet.MON; + // 标记是否 Boss,非 Boss 默认记作杂兵 model.is_boss =is_boss if(!model.is_boss){ model.is_kalami = true; } + + // 构建技能表并注入运行时冷却字段 ccd model.skills = {}; for (const key in hero.skills) { const skill = hero.skills[key]; if (!skill) continue; - model.skills[skill.uuid] = { ...skill, ccd: 0 }; + // 最终技能等级 = 初始技能等级 + 怪物等级增量,且下限为 0 + model.skills[skill.uuid] = { ...skill, lv: Math.max(0,skill.lv + mon_lv - 2), ccd: 0 }; } + // 缓存技能射程等派生数据,减少战斗帧内重复计算 model.updateSkillDistanceCache(); - //根据刷怪控制脚本对ap和hp进行加强 - - + // 注册视图组件并重置对象池复用状态 this.add(view); - // 重置视图状态(对象池复用时必须) view.init(); + // 广播怪物加载事件,供刷怪与战斗系统联动 oops.message.dispatchEvent("monster_load",this) - // 初始化移动参数,包括线路和生成顺序 + // 初始化移动参数:方向、目标 X、站位基准 Y const move = this.get(MoveComp); move.reset(); - move.direction = -1; // 向左移动 + move.direction = -1; move.targetX = Math.max(-320, Math.min(320, pos.x)); move.baseY = dropToY; move.moving = false; + + // 依据下落距离自适应入场时长,确保观感一致 const dropDistance = Math.abs(pos.y - dropToY); const dropDuration = Math.max(0.18, Math.min(0.38, dropDistance / 1200)); + + // 停止旧动画后执行下落 tween,避免复用节点时动画叠加 Tween.stopAllByTarget(node); tween(node) .to(dropDuration, { position: v3(pos.x, dropToY, 0) }) .call(() => { if (!node || !node.isValid) return; + // 落地后锁定最终位置,切换到落地完成状态 node.setPosition(pos.x, dropToY, 0); view.playEnd("down"); move.moving = true; + // 落地后启用怪物碰撞分组 if (collider) { collider.enabled = true; collider.group = BoxSet.MONSTER; @@ -180,27 +215,31 @@ export class Monster extends ecs.Entity { } }) .start(); + // 维护关卡内怪物数量统计 smc.vmdata.mission_data.mon_num++ } + /** 重置入口:复用 destroy 的释放流程 */ reset() { - // 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放 super.destroy(); } } +/** 怪物生命周期系统:监听实体进入与移除并输出调试日志 */ @ecs.register('MonLifecycleSystem') export class MonLifecycleSystem extends ecs.ComblockSystem implements ecs.IEntityEnterSystem, ecs.IEntityRemoveSystem { - debugMode: boolean = false; // 是否启用调试模式 + /** 调试开关,控制系统日志输出 */ + debugMode: boolean = false; + /** 仅处理拥有 MoveComp 的实体 */ filter() { return ecs.allOf(MoveComp); } + /** 实体进入世界时记录日志 */ entityEnter(e: ecs.Entity): void { - // 怪物实体创建时的特殊处理 const heroAttrs = e.get(HeroAttrsComp); if (heroAttrs) { mLogger.log(this.debugMode, 'MonLifecycleSystem', `怪物进入世界: ${heroAttrs.hero_name}`); @@ -209,8 +248,8 @@ export class MonLifecycleSystem extends ecs.ComblockSystem } } + /** 实体离开世界时记录日志 */ entityRemove(e: ecs.Entity): void { - // 怪物实体销毁时的清理工作 const heroAttrs = e.get(HeroAttrsComp); if (heroAttrs) { mLogger.log(this.debugMode, 'MonLifecycleSystem', `怪物离开世界: ${heroAttrs.hero_name}`); From 90bf8f7f7cf8529e7599fd9c693a12fe92e6574c Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 14:42:40 +0800 Subject: [PATCH 10/15] =?UTF-8?q?refactor:=20=E5=90=88=E5=B9=B6=E8=8B=B1?= =?UTF-8?q?=E9=9B=84=E4=B8=8E=E6=80=AA=E7=89=A9=E7=9A=84=E7=94=9F=E5=91=BD?= =?UTF-8?q?=E5=91=A8=E6=9C=9F=E7=B3=BB=E7=BB=9F=E4=B8=BA=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除 MonLifecycleSystem,将其功能整合至 HeroLifecycleSystem 并重命名为 BattleEntityLifecycleSystem。新系统根据实体的 fac 属性区分英雄与怪物,输出相应的调试日志,消除了重复代码并提高了维护性。 --- assets/script/game/hero/Hero.ts | 24 +++++++++++++++++------- assets/script/game/hero/Mon.ts | 33 --------------------------------- 2 files changed, 17 insertions(+), 40 deletions(-) diff --git a/assets/script/game/hero/Hero.ts b/assets/script/game/hero/Hero.ts index ca71cf72..2ae5f494 100644 --- a/assets/script/game/hero/Hero.ts +++ b/assets/script/game/hero/Hero.ts @@ -154,9 +154,9 @@ export class Hero extends ecs.Entity { } -/** 英雄生命周期系统:监听实体进入与移除并输出调试日志 */ -@ecs.register('HeroLifecycleSystem') -export class HeroLifecycleSystem extends ecs.ComblockSystem +/** 统一生命周期系统:按 fac 区分英雄与怪物并输出日志 */ +@ecs.register('BattleEntityLifecycleSystem') +export class BattleEntityLifecycleSystem extends ecs.ComblockSystem implements ecs.IEntityEnterSystem, ecs.IEntityRemoveSystem { /** 仅处理拥有 MoveComp 的实体 */ @@ -164,23 +164,33 @@ export class HeroLifecycleSystem extends ecs.ComblockSystem return ecs.allOf(MoveComp); } + /** 基于阵营生成日志名称 */ + private resolveLabel(heroAttrs: HeroAttrsComp | null) { + if (!heroAttrs) return "未知"; + if (heroAttrs.fac === FacSet.HERO) return "英雄"; + if (heroAttrs.fac === FacSet.MON) return "怪物"; + return "未知"; + } + /** 实体进入世界时记录日志 */ entityEnter(e: ecs.Entity): void { const heroAttrs = e.get(HeroAttrsComp); + const label = this.resolveLabel(heroAttrs); if (heroAttrs) { - mLogger.log(heroAttrs.debugMode, 'HeroLifecycle', `英雄进入世界: ${heroAttrs.hero_name}`); + mLogger.log(heroAttrs.debugMode, 'BattleEntityLifecycle', `${label}进入世界: ${heroAttrs.hero_name}`); } else { - mLogger.log(true, 'HeroLifecycle', `英雄进入世界: 实体ID ${e.eid}`); + mLogger.log(true, 'BattleEntityLifecycle', `${label}进入世界: 实体ID ${e.eid}`); } } /** 实体离开世界时记录日志 */ entityRemove(e: ecs.Entity): void { const heroAttrs = e.get(HeroAttrsComp); + const label = this.resolveLabel(heroAttrs); if (heroAttrs) { - mLogger.log(heroAttrs.debugMode, 'HeroLifecycle', `英雄离开世界: ${heroAttrs.hero_name}`); + mLogger.log(heroAttrs.debugMode, 'BattleEntityLifecycle', `${label}离开世界: ${heroAttrs.hero_name}`); } else { - mLogger.log(true, 'HeroLifecycle', `英雄离开世界: 实体ID ${e.eid}`); + mLogger.log(true, 'BattleEntityLifecycle', `${label}离开世界: 实体ID ${e.eid}`); } } } diff --git a/assets/script/game/hero/Mon.ts b/assets/script/game/hero/Mon.ts index e14c8b7d..8f3f68a5 100644 --- a/assets/script/game/hero/Mon.ts +++ b/assets/script/game/hero/Mon.ts @@ -7,7 +7,6 @@ import { HeroInfo } from "../common/config/heroSet"; import { HeroAttrsComp } from "./HeroAttrsComp"; import { HeroViewComp } from "./HeroViewComp"; import { MoveComp } from "./MoveComp"; -import { mLogger } from "../common/Logger"; /** 怪物实体:负责怪物对象池复用、属性初始化、入场动画与回收 */ @ecs.register(`Monster`) export class Monster extends ecs.Entity { @@ -226,35 +225,3 @@ export class Monster extends ecs.Entity { } } -/** 怪物生命周期系统:监听实体进入与移除并输出调试日志 */ -@ecs.register('MonLifecycleSystem') -export class MonLifecycleSystem extends ecs.ComblockSystem - implements ecs.IEntityEnterSystem, ecs.IEntityRemoveSystem { - /** 调试开关,控制系统日志输出 */ - debugMode: boolean = false; - - /** 仅处理拥有 MoveComp 的实体 */ - filter() { - return ecs.allOf(MoveComp); - } - - /** 实体进入世界时记录日志 */ - entityEnter(e: ecs.Entity): void { - const heroAttrs = e.get(HeroAttrsComp); - if (heroAttrs) { - mLogger.log(this.debugMode, 'MonLifecycleSystem', `怪物进入世界: ${heroAttrs.hero_name}`); - } else { - mLogger.log(this.debugMode, 'MonLifecycleSystem', `怪物进入世界: 实体ID ${e.eid}`); - } - } - - /** 实体离开世界时记录日志 */ - entityRemove(e: ecs.Entity): void { - const heroAttrs = e.get(HeroAttrsComp); - if (heroAttrs) { - mLogger.log(this.debugMode, 'MonLifecycleSystem', `怪物离开世界: ${heroAttrs.hero_name}`); - } else { - mLogger.log(this.debugMode, 'MonLifecycleSystem', `怪物离开世界: 实体ID ${e.eid}`); - } - } -} From f6f3896f29817dc24394bb06a4e731a54d10cc5c Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 15:31:12 +0800 Subject: [PATCH 11/15] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E5=A4=9A?= =?UTF-8?q?=E7=A7=8D=E9=A2=9C=E8=89=B2=E6=8A=80=E8=83=BD=E7=90=83=E9=A2=84?= =?UTF-8?q?=E5=88=B6=E4=BD=93=E5=92=8C=E5=8A=A8=E7=94=BB=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加红、蓝、绿、黄色技能球及其对应的动画文件,并新增 ball_fire2 预制体 修复 arrow_blue.prefab 中 Sprite 组件的 _type 属性设置 --- .../game/skill/anm/atk/ball_blue.anim | 100 +++++ .../game/skill/anm/atk/ball_blue.anim.meta | 13 + .../game/skill/anm/atk/ball_fire-001.anim | 95 +++++ .../skill/anm/atk/ball_fire-001.anim.meta | 13 + .../game/skill/anm/atk/ball_red.anim | 100 +++++ .../game/skill/anm/atk/ball_red.anim.meta | 13 + .../game/skill/anm/atk/ball_yellow.anim | 100 +++++ .../game/skill/anm/atk/ball_yellow.anim.meta | 13 + .../game/skill/atk/arrow_blue.prefab | 2 +- .../resources/game/skill/atk/ball_blue.prefab | 372 ++++++++++++++++++ .../game/skill/atk/ball_blue.prefab.meta | 13 + .../game/skill/atk/ball_fire2.prefab | 372 ++++++++++++++++++ .../game/skill/atk/ball_fire2.prefab.meta | 13 + .../game/skill/atk/ball_green.prefab | 372 ++++++++++++++++++ .../game/skill/atk/ball_green.prefab.meta | 13 + .../resources/game/skill/atk/ball_red.prefab | 372 ++++++++++++++++++ .../game/skill/atk/ball_red.prefab.meta | 13 + 17 files changed, 1988 insertions(+), 1 deletion(-) create mode 100644 assets/resources/game/skill/anm/atk/ball_blue.anim create mode 100644 assets/resources/game/skill/anm/atk/ball_blue.anim.meta create mode 100644 assets/resources/game/skill/anm/atk/ball_fire-001.anim create mode 100644 assets/resources/game/skill/anm/atk/ball_fire-001.anim.meta create mode 100644 assets/resources/game/skill/anm/atk/ball_red.anim create mode 100644 assets/resources/game/skill/anm/atk/ball_red.anim.meta create mode 100644 assets/resources/game/skill/anm/atk/ball_yellow.anim create mode 100644 assets/resources/game/skill/anm/atk/ball_yellow.anim.meta create mode 100644 assets/resources/game/skill/atk/ball_blue.prefab create mode 100644 assets/resources/game/skill/atk/ball_blue.prefab.meta create mode 100644 assets/resources/game/skill/atk/ball_fire2.prefab create mode 100644 assets/resources/game/skill/atk/ball_fire2.prefab.meta create mode 100644 assets/resources/game/skill/atk/ball_green.prefab create mode 100644 assets/resources/game/skill/atk/ball_green.prefab.meta create mode 100644 assets/resources/game/skill/atk/ball_red.prefab create mode 100644 assets/resources/game/skill/atk/ball_red.prefab.meta diff --git a/assets/resources/game/skill/anm/atk/ball_blue.anim b/assets/resources/game/skill/anm/atk/ball_blue.anim new file mode 100644 index 00000000..bce99ac6 --- /dev/null +++ b/assets/resources/game/skill/anm/atk/ball_blue.anim @@ -0,0 +1,100 @@ +[ + { + "__type__": "cc.AnimationClip", + "_name": "ball_blue", + "_objFlags": 0, + "__editorExtras__": { + "embeddedPlayerGroups": [] + }, + "_native": "", + "sample": 12, + "speed": 1, + "wrapMode": 2, + "enableTrsBlending": false, + "_duration": 0.3333333333333333, + "_hash": 500763545, + "_tracks": [ + { + "__id__": 1 + } + ], + "_exoticAnimation": null, + "_events": [], + "_embeddedPlayers": [], + "_additiveSettings": { + "__id__": 7 + }, + "_auxiliaryCurveEntries": [] + }, + { + "__type__": "cc.animation.ObjectTrack", + "_binding": { + "__type__": "cc.animation.TrackBinding", + "path": { + "__id__": 2 + }, + "proxy": null + }, + "_channel": { + "__id__": 5 + } + }, + { + "__type__": "cc.animation.TrackPath", + "_paths": [ + { + "__id__": 3 + }, + { + "__id__": 4 + }, + "spriteFrame" + ] + }, + { + "__type__": "cc.animation.HierarchyPath", + "path": "Node" + }, + { + "__type__": "cc.animation.ComponentPath", + "component": "cc.Sprite" + }, + { + "__type__": "cc.animation.Channel", + "_curve": { + "__id__": 6 + } + }, + { + "__type__": "cc.ObjectCurve", + "_times": [ + 0, + 0.08333333333333333, + 0.16666666666666666, + 0.25 + ], + "_values": [ + { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@a4e22", + "__expectedType__": "cc.SpriteFrame" + }, + { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@2b0ce", + "__expectedType__": "cc.SpriteFrame" + }, + { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@29738", + "__expectedType__": "cc.SpriteFrame" + }, + { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@faf10", + "__expectedType__": "cc.SpriteFrame" + } + ] + }, + { + "__type__": "cc.AnimationClipAdditiveSettings", + "enabled": false, + "refClip": null + } +] \ No newline at end of file diff --git a/assets/resources/game/skill/anm/atk/ball_blue.anim.meta b/assets/resources/game/skill/anm/atk/ball_blue.anim.meta new file mode 100644 index 00000000..4792735f --- /dev/null +++ b/assets/resources/game/skill/anm/atk/ball_blue.anim.meta @@ -0,0 +1,13 @@ +{ + "ver": "2.0.3", + "importer": "animation-clip", + "imported": true, + "uuid": "863d7ce6-3da1-47c6-9c99-9a6af94dfcfc", + "files": [ + ".cconb" + ], + "subMetas": {}, + "userData": { + "name": "ball_blue" + } +} diff --git a/assets/resources/game/skill/anm/atk/ball_fire-001.anim b/assets/resources/game/skill/anm/atk/ball_fire-001.anim new file mode 100644 index 00000000..f416e00b --- /dev/null +++ b/assets/resources/game/skill/anm/atk/ball_fire-001.anim @@ -0,0 +1,95 @@ +[ + { + "__type__": "cc.AnimationClip", + "_name": "ball_fire-001", + "_objFlags": 0, + "__editorExtras__": { + "embeddedPlayerGroups": [] + }, + "_native": "", + "sample": 12, + "speed": 1, + "wrapMode": 2, + "enableTrsBlending": false, + "_duration": 0.25, + "_hash": 500763545, + "_tracks": [ + { + "__id__": 1 + } + ], + "_exoticAnimation": null, + "_events": [], + "_embeddedPlayers": [], + "_additiveSettings": { + "__id__": 7 + }, + "_auxiliaryCurveEntries": [] + }, + { + "__type__": "cc.animation.ObjectTrack", + "_binding": { + "__type__": "cc.animation.TrackBinding", + "path": { + "__id__": 2 + }, + "proxy": null + }, + "_channel": { + "__id__": 5 + } + }, + { + "__type__": "cc.animation.TrackPath", + "_paths": [ + { + "__id__": 3 + }, + { + "__id__": 4 + }, + "spriteFrame" + ] + }, + { + "__type__": "cc.animation.HierarchyPath", + "path": "Node" + }, + { + "__type__": "cc.animation.ComponentPath", + "component": "cc.Sprite" + }, + { + "__type__": "cc.animation.Channel", + "_curve": { + "__id__": 6 + } + }, + { + "__type__": "cc.ObjectCurve", + "_times": [ + 0, + 0.08333333333333333, + 0.16666666666666666 + ], + "_values": [ + { + "__uuid__": "2423272e-e63b-4736-b15b-30b40cf98a23@59ec8", + "__expectedType__": "cc.SpriteFrame" + }, + { + "__uuid__": "2423272e-e63b-4736-b15b-30b40cf98a23@3a170", + "__expectedType__": "cc.SpriteFrame" + }, + { + "__uuid__": "2423272e-e63b-4736-b15b-30b40cf98a23@482b5", + "__expectedType__": "cc.SpriteFrame" + } + ] + }, + { + "__type__": "cc.AnimationClipAdditiveSettings", + "enabled": false, + "refClip": null + } +] \ No newline at end of file diff --git a/assets/resources/game/skill/anm/atk/ball_fire-001.anim.meta b/assets/resources/game/skill/anm/atk/ball_fire-001.anim.meta new file mode 100644 index 00000000..686d8944 --- /dev/null +++ b/assets/resources/game/skill/anm/atk/ball_fire-001.anim.meta @@ -0,0 +1,13 @@ +{ + "ver": "2.0.3", + "importer": "animation-clip", + "imported": true, + "uuid": "e4ff9dbb-37f1-49d6-b656-b42ceb67f1a7", + "files": [ + ".cconb" + ], + "subMetas": {}, + "userData": { + "name": "ball_fire-001" + } +} diff --git a/assets/resources/game/skill/anm/atk/ball_red.anim b/assets/resources/game/skill/anm/atk/ball_red.anim new file mode 100644 index 00000000..259e94c4 --- /dev/null +++ b/assets/resources/game/skill/anm/atk/ball_red.anim @@ -0,0 +1,100 @@ +[ + { + "__type__": "cc.AnimationClip", + "_name": "ball_red", + "_objFlags": 0, + "__editorExtras__": { + "embeddedPlayerGroups": [] + }, + "_native": "", + "sample": 12, + "speed": 1, + "wrapMode": 2, + "enableTrsBlending": false, + "_duration": 0.3333333333333333, + "_hash": 500763545, + "_tracks": [ + { + "__id__": 1 + } + ], + "_exoticAnimation": null, + "_events": [], + "_embeddedPlayers": [], + "_additiveSettings": { + "__id__": 7 + }, + "_auxiliaryCurveEntries": [] + }, + { + "__type__": "cc.animation.ObjectTrack", + "_binding": { + "__type__": "cc.animation.TrackBinding", + "path": { + "__id__": 2 + }, + "proxy": null + }, + "_channel": { + "__id__": 5 + } + }, + { + "__type__": "cc.animation.TrackPath", + "_paths": [ + { + "__id__": 3 + }, + { + "__id__": 4 + }, + "spriteFrame" + ] + }, + { + "__type__": "cc.animation.HierarchyPath", + "path": "Node" + }, + { + "__type__": "cc.animation.ComponentPath", + "component": "cc.Sprite" + }, + { + "__type__": "cc.animation.Channel", + "_curve": { + "__id__": 6 + } + }, + { + "__type__": "cc.ObjectCurve", + "_times": [ + 0, + 0.08333333333333333, + 0.16666666666666666, + 0.25 + ], + "_values": [ + { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@a22e7", + "__expectedType__": "cc.SpriteFrame" + }, + { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@20740", + "__expectedType__": "cc.SpriteFrame" + }, + { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@35944", + "__expectedType__": "cc.SpriteFrame" + }, + { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@b9343", + "__expectedType__": "cc.SpriteFrame" + } + ] + }, + { + "__type__": "cc.AnimationClipAdditiveSettings", + "enabled": false, + "refClip": null + } +] \ No newline at end of file diff --git a/assets/resources/game/skill/anm/atk/ball_red.anim.meta b/assets/resources/game/skill/anm/atk/ball_red.anim.meta new file mode 100644 index 00000000..f2cb30b5 --- /dev/null +++ b/assets/resources/game/skill/anm/atk/ball_red.anim.meta @@ -0,0 +1,13 @@ +{ + "ver": "2.0.3", + "importer": "animation-clip", + "imported": true, + "uuid": "d567be4c-7211-471d-b278-c6487f41d3a8", + "files": [ + ".cconb" + ], + "subMetas": {}, + "userData": { + "name": "ball_red" + } +} diff --git a/assets/resources/game/skill/anm/atk/ball_yellow.anim b/assets/resources/game/skill/anm/atk/ball_yellow.anim new file mode 100644 index 00000000..7803789b --- /dev/null +++ b/assets/resources/game/skill/anm/atk/ball_yellow.anim @@ -0,0 +1,100 @@ +[ + { + "__type__": "cc.AnimationClip", + "_name": "ball_yellow", + "_objFlags": 0, + "__editorExtras__": { + "embeddedPlayerGroups": [] + }, + "_native": "", + "sample": 12, + "speed": 1, + "wrapMode": 2, + "enableTrsBlending": false, + "_duration": 0.3333333333333333, + "_hash": 500763545, + "_tracks": [ + { + "__id__": 1 + } + ], + "_exoticAnimation": null, + "_events": [], + "_embeddedPlayers": [], + "_additiveSettings": { + "__id__": 7 + }, + "_auxiliaryCurveEntries": [] + }, + { + "__type__": "cc.animation.ObjectTrack", + "_binding": { + "__type__": "cc.animation.TrackBinding", + "path": { + "__id__": 2 + }, + "proxy": null + }, + "_channel": { + "__id__": 5 + } + }, + { + "__type__": "cc.animation.TrackPath", + "_paths": [ + { + "__id__": 3 + }, + { + "__id__": 4 + }, + "spriteFrame" + ] + }, + { + "__type__": "cc.animation.HierarchyPath", + "path": "Node" + }, + { + "__type__": "cc.animation.ComponentPath", + "component": "cc.Sprite" + }, + { + "__type__": "cc.animation.Channel", + "_curve": { + "__id__": 6 + } + }, + { + "__type__": "cc.ObjectCurve", + "_times": [ + 0, + 0.08333333333333333, + 0.16666666666666666, + 0.25 + ], + "_values": [ + { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@1b09a", + "__expectedType__": "cc.SpriteFrame" + }, + { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@341ae", + "__expectedType__": "cc.SpriteFrame" + }, + { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@6459e", + "__expectedType__": "cc.SpriteFrame" + }, + { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@820a5", + "__expectedType__": "cc.SpriteFrame" + } + ] + }, + { + "__type__": "cc.AnimationClipAdditiveSettings", + "enabled": false, + "refClip": null + } +] \ No newline at end of file diff --git a/assets/resources/game/skill/anm/atk/ball_yellow.anim.meta b/assets/resources/game/skill/anm/atk/ball_yellow.anim.meta new file mode 100644 index 00000000..34ca44b5 --- /dev/null +++ b/assets/resources/game/skill/anm/atk/ball_yellow.anim.meta @@ -0,0 +1,13 @@ +{ + "ver": "2.0.3", + "importer": "animation-clip", + "imported": true, + "uuid": "b7ae2d93-c955-4027-9e7d-959233b51b04", + "files": [ + ".cconb" + ], + "subMetas": {}, + "userData": { + "name": "ball_yellow" + } +} diff --git a/assets/resources/game/skill/atk/arrow_blue.prefab b/assets/resources/game/skill/atk/arrow_blue.prefab index 574cadbf..7f87505f 100644 --- a/assets/resources/game/skill/atk/arrow_blue.prefab +++ b/assets/resources/game/skill/atk/arrow_blue.prefab @@ -176,7 +176,7 @@ "__uuid__": "2423272e-e63b-4736-b15b-30b40cf98a23@25994", "__expectedType__": "cc.SpriteFrame" }, - "_type": 1, + "_type": 0, "_fillType": 0, "_sizeMode": 1, "_fillCenter": { diff --git a/assets/resources/game/skill/atk/ball_blue.prefab b/assets/resources/game/skill/atk/ball_blue.prefab new file mode 100644 index 00000000..69a554bd --- /dev/null +++ b/assets/resources/game/skill/atk/ball_blue.prefab @@ -0,0 +1,372 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "ball_blue", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "ball_blue", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 8 + }, + { + "__id__": 10 + }, + { + "__id__": 12 + }, + { + "__id__": 14 + }, + { + "__id__": 16 + } + ], + "_prefab": { + "__id__": 18 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Node", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + }, + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 7 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 4 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 64, + "height": 64 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "93pNmvtQlLSqtTgIepyEmA" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@a4e22", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "12eKc8gltBz50frJCS5+ww" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "3arqAMBz1MvoXBzeDaL5M/", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 50, + "height": 50 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "63NP9yq3hEUKD/OZZZ5t7x" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 11 + }, + "playOnLoad": true, + "_clips": [ + { + "__uuid__": "863d7ce6-3da1-47c6-9c99-9a6af94dfcfc", + "__expectedType__": "cc.AnimationClip" + } + ], + "_defaultClip": { + "__uuid__": "863d7ce6-3da1-47c6-9c99-9a6af94dfcfc", + "__expectedType__": "cc.AnimationClip" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c2RDvksalG2acL3tyGCY0t" + }, + { + "__type__": "57aabs7TE1J5obTAZczc+64", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 13 + }, + "atk_x": 10, + "atk_y": 15, + "debugMode": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "60LInmZXxDtKu79AshRG9j" + }, + { + "__type__": "cc.RigidBody2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 15 + }, + "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": "e1yBA625RLwLhzo6bLYW7j" + }, + { + "__type__": "cc.BoxCollider2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 17 + }, + "tag": 0, + "_group": 1, + "_density": 1, + "_sensor": true, + "_friction": 0.2, + "_restitution": 0, + "_offset": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_size": { + "__type__": "cc.Size", + "width": 20, + "height": 100 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "43ZDJfXX9AX73gyytKQZWm" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c46/YsCPVOJYA4mWEpNYRx", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/game/skill/atk/ball_blue.prefab.meta b/assets/resources/game/skill/atk/ball_blue.prefab.meta new file mode 100644 index 00000000..73f1c253 --- /dev/null +++ b/assets/resources/game/skill/atk/ball_blue.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "7420247a-adb4-4ca4-9eab-e7457c7dc4ca", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "ball_blue" + } +} diff --git a/assets/resources/game/skill/atk/ball_fire2.prefab b/assets/resources/game/skill/atk/ball_fire2.prefab new file mode 100644 index 00000000..80b7247c --- /dev/null +++ b/assets/resources/game/skill/atk/ball_fire2.prefab @@ -0,0 +1,372 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "ball_fire2", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "ball_fire2", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 8 + }, + { + "__id__": 10 + }, + { + "__id__": 12 + }, + { + "__id__": 14 + }, + { + "__id__": 16 + } + ], + "_prefab": { + "__id__": 18 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Node", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + }, + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 7 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0.7071067811865475, + "w": 0.7071067811865476 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": -0.7, + "y": 0.7, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 90 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 4 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 119, + "height": 167 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "93pNmvtQlLSqtTgIepyEmA" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "2423272e-e63b-4736-b15b-30b40cf98a23@59ec8", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": { + "__uuid__": "2423272e-e63b-4736-b15b-30b40cf98a23", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "12eKc8gltBz50frJCS5+ww" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "3arqAMBz1MvoXBzeDaL5M/", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 50, + "height": 50 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "63NP9yq3hEUKD/OZZZ5t7x" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 11 + }, + "playOnLoad": true, + "_clips": [ + { + "__uuid__": "e4ff9dbb-37f1-49d6-b656-b42ceb67f1a7", + "__expectedType__": "cc.AnimationClip" + } + ], + "_defaultClip": { + "__uuid__": "e4ff9dbb-37f1-49d6-b656-b42ceb67f1a7", + "__expectedType__": "cc.AnimationClip" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c2RDvksalG2acL3tyGCY0t" + }, + { + "__type__": "57aabs7TE1J5obTAZczc+64", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 13 + }, + "atk_x": 10, + "atk_y": 15, + "debugMode": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "60LInmZXxDtKu79AshRG9j" + }, + { + "__type__": "cc.RigidBody2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 15 + }, + "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": "e1yBA625RLwLhzo6bLYW7j" + }, + { + "__type__": "cc.BoxCollider2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 17 + }, + "tag": 0, + "_group": 1, + "_density": 1, + "_sensor": true, + "_friction": 0.2, + "_restitution": 0, + "_offset": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_size": { + "__type__": "cc.Size", + "width": 50, + "height": 50 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "43ZDJfXX9AX73gyytKQZWm" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c46/YsCPVOJYA4mWEpNYRx", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/game/skill/atk/ball_fire2.prefab.meta b/assets/resources/game/skill/atk/ball_fire2.prefab.meta new file mode 100644 index 00000000..5e69ead3 --- /dev/null +++ b/assets/resources/game/skill/atk/ball_fire2.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "ab7926ea-3e90-48e2-864d-b0a29cee1c9a", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "ball_fire2" + } +} diff --git a/assets/resources/game/skill/atk/ball_green.prefab b/assets/resources/game/skill/atk/ball_green.prefab new file mode 100644 index 00000000..fea96fd0 --- /dev/null +++ b/assets/resources/game/skill/atk/ball_green.prefab @@ -0,0 +1,372 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "ball_green", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "ball_green", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 8 + }, + { + "__id__": 10 + }, + { + "__id__": 12 + }, + { + "__id__": 14 + }, + { + "__id__": 16 + } + ], + "_prefab": { + "__id__": 18 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Node", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + }, + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 7 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 4 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 64, + "height": 64 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "93pNmvtQlLSqtTgIepyEmA" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@1b09a", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "12eKc8gltBz50frJCS5+ww" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "3arqAMBz1MvoXBzeDaL5M/", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 50, + "height": 50 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "63NP9yq3hEUKD/OZZZ5t7x" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 11 + }, + "playOnLoad": true, + "_clips": [ + { + "__uuid__": "b7ae2d93-c955-4027-9e7d-959233b51b04", + "__expectedType__": "cc.AnimationClip" + } + ], + "_defaultClip": { + "__uuid__": "b7ae2d93-c955-4027-9e7d-959233b51b04", + "__expectedType__": "cc.AnimationClip" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c2RDvksalG2acL3tyGCY0t" + }, + { + "__type__": "57aabs7TE1J5obTAZczc+64", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 13 + }, + "atk_x": 10, + "atk_y": 15, + "debugMode": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "60LInmZXxDtKu79AshRG9j" + }, + { + "__type__": "cc.RigidBody2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 15 + }, + "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": "e1yBA625RLwLhzo6bLYW7j" + }, + { + "__type__": "cc.BoxCollider2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 17 + }, + "tag": 0, + "_group": 1, + "_density": 1, + "_sensor": true, + "_friction": 0.2, + "_restitution": 0, + "_offset": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_size": { + "__type__": "cc.Size", + "width": 20, + "height": 100 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "43ZDJfXX9AX73gyytKQZWm" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c46/YsCPVOJYA4mWEpNYRx", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/game/skill/atk/ball_green.prefab.meta b/assets/resources/game/skill/atk/ball_green.prefab.meta new file mode 100644 index 00000000..291fc173 --- /dev/null +++ b/assets/resources/game/skill/atk/ball_green.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "0ddcc956-2a13-4d96-bd0c-22c33f659f7b", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "ball_green" + } +} diff --git a/assets/resources/game/skill/atk/ball_red.prefab b/assets/resources/game/skill/atk/ball_red.prefab new file mode 100644 index 00000000..76c57bbd --- /dev/null +++ b/assets/resources/game/skill/atk/ball_red.prefab @@ -0,0 +1,372 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "ball_red", + "_objFlags": 0, + "__editorExtras__": {}, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "persistent": false + }, + { + "__type__": "cc.Node", + "_name": "ball_red", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 8 + }, + { + "__id__": 10 + }, + { + "__id__": 12 + }, + { + "__id__": 14 + }, + { + "__id__": 16 + } + ], + "_prefab": { + "__id__": 18 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Node", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + }, + { + "__id__": 5 + } + ], + "_prefab": { + "__id__": 7 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 4 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 64, + "height": 64 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "93pNmvtQlLSqtTgIepyEmA" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 2 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6@a22e7", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 1, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": { + "__uuid__": "3d46f945-3f07-477e-a95a-b49557d552c6", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "12eKc8gltBz50frJCS5+ww" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "3arqAMBz1MvoXBzeDaL5M/", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 9 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 50, + "height": 50 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "63NP9yq3hEUKD/OZZZ5t7x" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 11 + }, + "playOnLoad": true, + "_clips": [ + { + "__uuid__": "d567be4c-7211-471d-b278-c6487f41d3a8", + "__expectedType__": "cc.AnimationClip" + } + ], + "_defaultClip": { + "__uuid__": "d567be4c-7211-471d-b278-c6487f41d3a8", + "__expectedType__": "cc.AnimationClip" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c2RDvksalG2acL3tyGCY0t" + }, + { + "__type__": "57aabs7TE1J5obTAZczc+64", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 13 + }, + "atk_x": 10, + "atk_y": 15, + "debugMode": true, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "60LInmZXxDtKu79AshRG9j" + }, + { + "__type__": "cc.RigidBody2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 15 + }, + "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": "e1yBA625RLwLhzo6bLYW7j" + }, + { + "__type__": "cc.BoxCollider2D", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1 + }, + "_enabled": true, + "__prefab": { + "__id__": 17 + }, + "tag": 0, + "_group": 1, + "_density": 1, + "_sensor": true, + "_friction": 0.2, + "_restitution": 0, + "_offset": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_size": { + "__type__": "cc.Size", + "width": 20, + "height": 100 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "43ZDJfXX9AX73gyytKQZWm" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c46/YsCPVOJYA4mWEpNYRx", + "instance": null, + "targetOverrides": null + } +] \ No newline at end of file diff --git a/assets/resources/game/skill/atk/ball_red.prefab.meta b/assets/resources/game/skill/atk/ball_red.prefab.meta new file mode 100644 index 00000000..4da8cf40 --- /dev/null +++ b/assets/resources/game/skill/atk/ball_red.prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.50", + "importer": "prefab", + "imported": true, + "uuid": "7256c23c-9a9a-46d8-90e8-d2a64a421114", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": { + "syncNodeName": "ball_red" + } +} From 41ac41554cbb1d28635545dccc4df60b6e298e53 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 15:36:35 +0800 Subject: [PATCH 12/15] =?UTF-8?q?feat(game):=20=E6=9B=B4=E6=96=B0=E8=8B=B1?= =?UTF-8?q?=E9=9B=84=E3=80=81=E6=8A=80=E8=83=BD=E5=92=8C=E6=80=AA=E7=89=A9?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增怪物类型 RANGED 和 MAGE,并调整怪物列表和Boss配置 - 重新分配英雄技能ID,更新多个英雄的技能配置 - 调整技能视觉效果,更新技能图标、动画和描述 - 重构怪物配置,移除部分怪物并调整属性 --- assets/script/Main.ts | 10 +-- assets/script/game/common/config/SkillSet.ts | 45 ++++++----- assets/script/game/common/config/heroSet.ts | 85 ++++++++++---------- assets/script/game/map/RogueConfig.ts | 14 ++-- 4 files changed, 78 insertions(+), 76 deletions(-) diff --git a/assets/script/Main.ts b/assets/script/Main.ts index 4cae125c..bb5c2a5b 100644 --- a/assets/script/Main.ts +++ b/assets/script/Main.ts @@ -12,11 +12,11 @@ const { ccclass, property } = _decorator; @ccclass('Main') export class Main extends Root { start() { - PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb - |EPhysics2DDrawFlags.Pair - |EPhysics2DDrawFlags.CenterOfMass - |EPhysics2DDrawFlags.Joint - |EPhysics2DDrawFlags.Shape; + // PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb + // |EPhysics2DDrawFlags.Pair + // |EPhysics2DDrawFlags.CenterOfMass + // |EPhysics2DDrawFlags.Joint + // |EPhysics2DDrawFlags.Shape; } protected async run() { smc.initialize = ecs.getEntity(Initialize); diff --git a/assets/script/game/common/config/SkillSet.ts b/assets/script/game/common/config/SkillSet.ts index 8edc22de..7437b476 100644 --- a/assets/script/game/common/config/SkillSet.ts +++ b/assets/script/game/common/config/SkillSet.ts @@ -167,6 +167,7 @@ export const SkillSet: Record = { DTType:DTType.single,ap:100,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.linear,EType:EType.collision,buffs:[],info:"对单个造成100%攻击的伤害", }, + //大招 6002: { uuid:6002,name:"闪光攻击",sp_name:"atk_s2",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"blues",endAnm:"",act:"max", DTType:DTType.single,ap:150,hit_count:3,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", @@ -178,12 +179,12 @@ export const SkillSet: Record = { RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"对多个目标造成150%攻击的伤害,击退率20%", }, 6004: { - uuid:6004,name:"闪电攻击",sp_name:"atk_s4",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"blues",endAnm:"",act:"max", + uuid:6004,name:"闪电攻击",sp_name:"atk_s4",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"yellow",endAnm:"",act:"max", DTType:DTType.single,crt:20,ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"对多个目标造成150%攻击的伤害,暴击率20%", }, 6005: { - uuid:6005,name:"半月攻击",sp_name:"atk_light",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk", + uuid:6005,name:"半月攻击",sp_name:"atk_light",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"blues",endAnm:"",act:"atk", DTType:DTType.single,ap:100,hit_count:3,hitcd:0.3,speed:720,with:90,ready:0,EAnm:0,DAnm:"", RType:RType.linear,EType:EType.collision,buffs:[],info:"穿透多个目标造成100%攻击的伤害", }, @@ -195,44 +196,46 @@ export const SkillSet: Record = { RType:RType.linear,EType:EType.collision,buffs:[],info:"对单个目标造成100%攻击的伤害", }, 6102: { - uuid:6102,name:"冰冻射击",sp_name:"arrow",icon:"1135",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk", + uuid:6102,name:"冰冻射击",sp_name:"arrow_blue",icon:"1135",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk", DTType:DTType.single,ap:100,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.linear,EType:EType.collision,buffs:[],info:"对单个目标造成100%攻击的伤害", }, 6103: { - uuid:6103,name:"暴击射击",sp_name:"arrow",icon:"1135",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk", + uuid:6103,name:"暴击射击",sp_name:"arrow_red",icon:"1135",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk", DTType:DTType.single,ap:100,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.linear,EType:EType.collision,buffs:[],info:"对单个目标造成100%攻击的伤害", - }, + }, + //大招 6104: { - uuid:6104,name:"闪光设计",sp_name:"arrow_big_yellow",icon:"1135",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max", + uuid:6104,name:"闪光设计",sp_name:"arrow_big_yellow",icon:"1135",TGroup:TGroup.Enemy,readyAnm:"yellow",endAnm:"",act:"max", DTType:DTType.single,crt:20,ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.linear,EType:EType.collision,buffs:[],info:"对多个目标造成100%攻击的伤害,暴击", }, //===========魔法技能=========== 6201: { - uuid:6201,name:"冰击",sp_name:"ball_forst",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk", + uuid:6201,name:"蓝波",sp_name:"ball_blue",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk", DTType:DTType.single,frz:20,ap:100,hit_count:1,hitcd:0.3,speed:720,with:90,ready:0,EAnm:0,DAnm:"", RType:RType.linear,EType:EType.collision,buffs:[],info:"对单个目标造成100%攻击的伤害,冰冻率20%", }, 6202: { - uuid:6202,name:"冰球",sp_name:"ball_ice",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk", + uuid:6202,name:"绿波",sp_name:"ball_green",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk", DTType:DTType.single,ap:100,hit_count:1,hitcd:0.3,speed:720,with:90,ready:0,EAnm:0,DAnm:"", RType:RType.linear,EType:EType.collision,buffs:[],info:"对单个目标造成100%攻击的伤害", }, 6203: { - uuid:6203,name:"火击",sp_name:"ball_fire",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk", + uuid:6203,name:"红波",sp_name:"ball_red",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk", DTType:DTType.single,ap:100,hit_count:1,hitcd:0.3,speed:720,with:90,ready:0,EAnm:0,DAnm:"", RType:RType.linear,EType:EType.collision,buffs:[],info:"对单个目标造成100%攻击的伤害", }, + //大招 6204: { - uuid:6204,name:"火球",sp_name:"ball_fire",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk", + uuid:6204,name:"火球",sp_name:"ball_fire",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"atk", DTType:DTType.single,bck:20,ap:100,hit_count:1,hitcd:0.3,speed:720,with:90,ready:0,EAnm:0,DAnm:"", RType:RType.linear,EType:EType.collision,buffs:[],info:"对单个目标造成100%攻击的伤害,击退率20%", }, 6205: { - uuid:6205,name:"月波",sp_name:"ball_gquan",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"",endAnm:"",act:"atk", + uuid:6205,name:"月波",sp_name:"ball_gquan",icon:"1126",TGroup:TGroup.Enemy,readyAnm:"blues",endAnm:"",act:"atk", DTType:DTType.single,ap:200,hit_count:6,hitcd:0.3,speed:300,with:90,ready:0,EAnm:0,DAnm:"", RType:RType.linear,EType:EType.collision,buffs:[],info:"对多个目标造成200%攻击的伤害", }, @@ -243,7 +246,7 @@ export const SkillSet: Record = { RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,暴击率20%", }, 6207: { - uuid:6207,name:"冰刺",sp_name:"atk_fire",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"reds",endAnm:"",act:"max", + uuid:6207,name:"冰刺",sp_name:"atk_fire",icon:"1173",TGroup:TGroup.Enemy,readyAnm:"blues",endAnm:"",act:"max", DTType:DTType.range,frz:20,ap:100,hit_count:6,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"多次对多个目标造成150%攻击的伤害,冰冻率20%", }, @@ -255,7 +258,7 @@ export const SkillSet: Record = { //============================= ====== 辅助技能 ====== ========================== 6301:{ - uuid:6301,name:"魔法盾",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk", + uuid:6301,name:"魔法盾",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"up_hp",endAnm:"",act:"atk", DTType:DTType.single,kind:SkillKind.Shield,ap:300,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"获得300%攻击力的护盾", }, @@ -265,7 +268,7 @@ export const SkillSet: Record = { RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"治疗1个友方300%攻击力的生命值", }, 6303:{ - uuid:6303,name:"护盾",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"",endAnm:"",act:"atk", + uuid:6303,name:"护盾",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"up_hp",endAnm:"",act:"atk", DTType:DTType.single,kind:SkillKind.Shield,ap:300,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"随机1个友方获得300%攻击力的护盾", }, @@ -275,38 +278,38 @@ export const SkillSet: Record = { RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"随机治疗3个友方200%攻击力的生命值", }, 6305:{ - uuid:6305,name:"群体护盾",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk", + uuid:6305,name:"群体护盾",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"up_hp",endAnm:"",act:"atk", DTType:DTType.single,kind:SkillKind.Shield,ap:200,hit_count:3,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"随机3个友方获得200%攻击力的护盾", }, //==========================buff 技能===================== 6401:{ - uuid:6401,name:"单体攻击",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk", + uuid:6401,name:"单体攻击",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"ap_up",endAnm:"",act:"atk", DTType:DTType.single,kind:SkillKind.Support,ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.ap,value:5}],info:"随机1个友方+5攻击", }, 6402:{ - uuid:6402,name:"单体生命",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk", + uuid:6402,name:"单体生命",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"up_hp",endAnm:"",act:"atk", DTType:DTType.single,kind:SkillKind.Support,ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.hp_max,value:20}],info:"随机1个友方+20最大生命值", }, 6403:{ - uuid:6403,name:"单体全能",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk", + uuid:6403,name:"单体全能",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"up_hp",endAnm:"",act:"atk", DTType:DTType.single,kind:SkillKind.Support,ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.ap,value:5},{buff:Attrs.hp_max,value:20}],info:"随机1个友方+2攻击,+10最大生命值", }, 6404:{ - uuid:6404,name:"群体攻击",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk", + uuid:6404,name:"群体攻击",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"ap_up",endAnm:"",act:"atk", DTType:DTType.single,kind:SkillKind.Support,ap:0,hit_count:3,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.ap,value:2}],info:"随机3个友方+2攻击", }, 6405:{ - uuid:6405,name:"群体生命",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk", + uuid:6405,name:"群体生命",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"up_hp",endAnm:"",act:"atk", DTType:DTType.single,kind:SkillKind.Support,ap:0,hit_count:3,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.hp_max,value:10}],info:"随机3个友方+10最大生命值", }, 6406:{ - uuid:6406,name:"群体全能",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"",endAnm:"",act:"atk", + uuid:6406,name:"群体全能",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"ap_up",endAnm:"",act:"atk", DTType:DTType.single,kind:SkillKind.Support,ap:0,hit_count:3,hitcd:0.2,speed:720,with:0,ready:0,EAnm:0,DAnm:"", RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.ap,value:2},{buff:Attrs.hp_max,value:10}],info:"随机3个友方+2攻击,+10最大生命值", }, diff --git a/assets/script/game/common/config/heroSet.ts b/assets/script/game/common/config/heroSet.ts index 33fce2bb..774e923a 100644 --- a/assets/script/game/common/config/heroSet.ts +++ b/assets/script/game/common/config/heroSet.ts @@ -1,6 +1,5 @@ import { v3 } from "cc" import { BoxSet, FacSet } from "./GameSet" -import { SkillSet } from "./SkillSet"; export enum HType { Melee = 0, @@ -95,50 +94,50 @@ export interface HSkillInfo { */ export const HeroInfo: Record = { - // ========== 近战英雄 ========== + // ========== 近战英雄 ========== 5001:{uuid:5001,name:"盾战士",path:"hk1", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Melee,hp:450,ap:25,speed:180, - skills:{6001:{uuid:6001,lv:1,cd:0.75,ccd:0},6301:{uuid:6301,lv:1,cd:5,ccd:0}},info:"近战,魔法盾 坦克"}, + skills:{6001:{uuid:6001,lv:1,cd:0.75,ccd:0},6301:{uuid:6301,lv:1,cd:5,ccd:0}},info:"近战,魔法盾 坦克"}, 5002:{uuid:5002,name:"圣骑士",path:"hk3", fac:FacSet.HERO,cards_lv:3,lv:1,type:HType.Melee,hp:1350,ap:75,speed:180, - skills:{6001:{uuid:6001,lv:1,cd:0.75,ccd:0},6305:{uuid:6305,lv:1,cd:5,ccd:0}},info:"近战,群体护盾 坦克"}, + skills:{6001:{uuid:6001,lv:1,cd:0.75,ccd:0},6305:{uuid:6305,lv:1,cd:5,ccd:0}},info:"近战,群体护盾 坦克"}, 5003:{uuid:5003,name:"风行剑士",path:"hk4", fac:FacSet.HERO,cards_lv:2,lv:1,type:HType.Melee,hp:500,ap:100,speed:180, - skills:{6001:{uuid:6001,lv:1,cd:1.1,ccd:0},6014:{uuid:6014,lv:1,cd:5,ccd:0}},info:"近战,闪击 近战dps"}, + skills:{6001:{uuid:6001,lv:1,cd:1.1,ccd:0},6014:{uuid:6014,lv:1,cd:5,ccd:0}},info:"近战,闪击 近战dps"}, 5004:{uuid:5004,name:"刺客",path:"hc1", fac:FacSet.HERO,cards_lv:4,lv:1,type:HType.Melee,hp:1000,ap:200,speed:180, - skills:{6001:{uuid:6001,lv:1,cd:1.1,ccd:0},6104:{uuid:6104,lv:1,cd:5,ccd:0}},info:"近战,火焰击 近战dps"}, + skills:{6001:{uuid:6001,lv:1,cd:1.1,ccd:0},6104:{uuid:6104,lv:1,cd:5,ccd:0}},info:"近战,火焰击 近战dps"}, // 5005:{uuid:5005,name:"自然骑士",path:"hk2", fac:FacSet.HERO,cards_lv:4,lv:1,type:HType.Melee,hp:1000,ap:200,speed:180, // skills:[6001,6302],slvs:[1,1],cds:[1.1,5],info:"治疗近战,火焰击 近战dps"}, - - // ========== 法师英雄 ========== - 5101:{uuid:5101,name:"奥术法师",path:"hm2", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:150,ap:60,speed:100, - skills:{6005:{uuid:6005,lv:1,cd:1.4,ccd:0},6012:{uuid:6012,lv:1,cd:5,ccd:0}},info:"冰球,冰锥 远法dps"}, - 5102:{uuid:5012,name:"火焰法师",path:"hm1", fac:FacSet.HERO,cards_lv:2,lv:1,type:HType.Long,hp:300,ap:120,speed:100, - skills:{6004:{uuid:6004,lv:1,cd:1.4,ccd:0},6013:{uuid:6013,lv:1,cd:5,ccd:0}},info:"火击,火球 远法dps"}, - 5103:{uuid:5013,name:"冰法法师",path:"hm4", fac:FacSet.HERO,cards_lv:3,lv:1,type:HType.Long,hp:450,ap:180,speed:100, - skills:{6003:{uuid:6003,lv:1,cd:1.4,ccd:0},6012:{uuid:6012,lv:1,cd:5,ccd:0}},info:"冰击,冰锥 远法dps"}, - 5104:{uuid:5104,name:"寒霜术士",path:"hm4", fac:FacSet.HERO,cards_lv:4,lv:1,type:HType.Long,hp:600,ap:240,speed:100, - skills:{6012:{uuid:6012,lv:1,cd:1.4,ccd:0},6202:{uuid:6202,lv:1,cd:5,ccd:0}},info:"冰锥,冰刺 远法dps"}, - 5105:{uuid:5105,name:"炎爆法师",path:"hm3", fac:FacSet.HERO,cards_lv:5,lv:1,type:HType.Long,hp:750,ap:300,speed:100, - skills:{6013:{uuid:6013,lv:1,cd:1.4,ccd:0},6201:{uuid:6201,lv:1,cd:5,ccd:0}},info:"火球,陨石术 远法dps" }, - // ========== 远程英雄 ========== + // ========== 法师英雄 ========== + 5101:{uuid:5101,name:"奥术法师",path:"hm2", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:150,ap:60,speed:100, + skills:{6201:{uuid:6201,lv:1,cd:1.4,ccd:0},6012:{uuid:6012,lv:1,cd:5,ccd:0}},info:"冰球,冰锥 远法dps"}, + 5102:{uuid:5012,name:"火焰法师",path:"hm1", fac:FacSet.HERO,cards_lv:2,lv:1,type:HType.Long,hp:300,ap:120,speed:100, + skills:{6203:{uuid:6203,lv:1,cd:1.4,ccd:0},6013:{uuid:6013,lv:1,cd:5,ccd:0}},info:"火击,火球 远法dps"}, + 5103:{uuid:5013,name:"冰法法师",path:"hm4", fac:FacSet.HERO,cards_lv:3,lv:1,type:HType.Long,hp:450,ap:180,speed:100, + skills:{6201:{uuid:6201,lv:1,cd:1.4,ccd:0},6012:{uuid:6012,lv:1,cd:5,ccd:0}},info:"冰击,冰锥 远法dps"}, + 5104:{uuid:5104,name:"寒霜术士",path:"hm4", fac:FacSet.HERO,cards_lv:4,lv:1,type:HType.Long,hp:600,ap:240,speed:100, + skills:{6201:{uuid:6201,lv:1,cd:1.4,ccd:0},6202:{uuid:6202,lv:1,cd:5,ccd:0}},info:"冰锥,冰刺 远法dps"}, + 5105:{uuid:5105,name:"炎爆法师",path:"hm3", fac:FacSet.HERO,cards_lv:5,lv:1,type:HType.Long,hp:750,ap:300,speed:100, + skills:{6203:{uuid:6203,lv:1,cd:1.4,ccd:0},6201:{uuid:6201,lv:1,cd:5,ccd:0}},info:"火球,陨石术 远法dps" }, + + // ========== 远程英雄 ========== 5201:{uuid:5201,name:"射手",path:"ha1", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:150,ap:60,speed:120, - skills:{6002:{uuid:6002,lv:1,cd:1.3,ccd:0},6011:{uuid:6011,lv:1,cd:5,ccd:0}},info:"普通射击,暴射 远dps"}, + skills:{6101:{uuid:6101,lv:1,cd:1.3,ccd:0},6011:{uuid:6011,lv:1,cd:5,ccd:0}},info:"普通射击,暴射 远dps"}, 5202:{uuid:5202,name:"游侠",path:"ha2", fac:FacSet.HERO,cards_lv:3,lv:1,type:HType.Long,hp:450,ap:180,speed:120, - skills:{6011:{uuid:6011,lv:1,cd:1.3,ccd:0},6101:{uuid:6101,lv:1,cd:5,ccd:0}},info:"暴射,光箭 远dps"}, + skills:{6011:{uuid:6101,lv:1,cd:1.3,ccd:0},6101:{uuid:6101,lv:1,cd:5,ccd:0}},info:"暴射,光箭 远dps"}, - // ========== 腐竹英雄 ========== + // ========== 腐竹英雄 ========== 5301:{uuid:5301,name:"牧师",path:"hh1", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:150,ap:20,speed:100, - skills:{6012:{uuid:6012,lv:1,cd:1,ccd:0},6302:{uuid:6302,lv:1,cd:5,ccd:0}},info:"冰锥1,治疗 远辅助" }, + skills:{6202:{uuid:6202,lv:1,cd:1,ccd:0},6302:{uuid:6302,lv:1,cd:5,ccd:0}},info:"冰锥1,治疗 远辅助" }, 5302:{uuid:5302,name:"战地医师",path:"hz1", fac:FacSet.HERO,cards_lv:2,lv:1,type:HType.Mid,hp:300,ap:40,speed:100, - skills:{6012:{uuid:6012,lv:1,cd:1,ccd:0},6304:{uuid:6304,lv:1,cd:5,ccd:0}},info:"冰锥1,群体治疗 远辅助"}, + skills:{6202:{uuid:6202,lv:1,cd:1,ccd:0},6304:{uuid:6304,lv:1,cd:5,ccd:0}},info:"冰锥1,群体治疗 远辅助"}, 5303:{uuid:5303,name:"守护祭司",path:"ha3", fac:FacSet.HERO,cards_lv:4,lv:1,type:HType.Mid,hp:600,ap:80,speed:100, - skills:{6002:{uuid:6002,lv:1,cd:1,ccd:0},6004:{uuid:6004,lv:1,cd:5,ccd:0}},info:"普通射击,单体攻击buff 射手辅助"}, + skills:{6202:{uuid:6202,lv:1,cd:1,ccd:0},6004:{uuid:6004,lv:1,cd:5,ccd:0}},info:"普通射击,单体攻击buff 射手辅助"}, 5304:{uuid:5304,name:"秘法精灵",path:"ha3", fac:FacSet.HERO,cards_lv:6,lv:1,type:HType.Long,hp:900,ap:120,speed:100, - skills:{6002:{uuid:6002,lv:1,cd:1,ccd:0},6105:{uuid:6105,lv:1,cd:5,ccd:0}},info:"普通射击,群体攻击buff 射手辅助"}, - + skills:{6202:{uuid:6202,lv:1,cd:1,ccd:0},6105:{uuid:6105,lv:1,cd:5,ccd:0}},info:"普通射击,群体攻击buff 射手辅助"}, + @@ -154,21 +153,19 @@ export const HeroInfo: Record = { */ //============== 兽人系列 =============== - // 1. 基础近战型 - 6001:{uuid:6001,name:"兽人战士",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Melee,hp:120,ap:12,speed:180,skills:{6001:{uuid:6001,lv:1,cd:0.65,ccd:0},6003:{uuid:6003,lv:1,cd:10,ccd:0}},info:""}, - // 2. 快速突击型 - 6002:{uuid:6002,name:"兽人斥候",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Melee,hp:120,ap:12,speed:180,skills:{6001:{uuid:6001,lv:1,cd:0.65,ccd:0},6003:{uuid:6003,lv:1,cd:10,ccd:0}},info:""}, - // 3. 重型坦克型 - 6003:{uuid:6003,name:"兽人卫士",path:"mo3", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Melee,hp:350,ap:30,speed:120,skills:{6001:{uuid:6001,lv:1,cd:2,ccd:0},6003:{uuid:6003,lv:1,cd:10,ccd:0}},info:""}, - - // 4. 远程骚扰型 - 6004:{uuid:6004,name:"兽人射手",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Long,hp:80,ap:45,speed:80,skills:{6001:{uuid:6001,lv:1,cd:1.5,ccd:0},6003:{uuid:6003,lv:1,cd:10,ccd:0}},info:""}, - - // 5. 特殊机制型 - 6005:{uuid:6005,name:"兽人自爆兵",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Melee,hp:120,ap:12,speed:180,skills:{6001:{uuid:6001,lv:1,cd:0.65,ccd:0},6003:{uuid:6003,lv:1,cd:10,ccd:0}},info:""}, - 6006:{uuid:6006,name:"兽人召唤师",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Melee,hp:80,ap:20,speed:80,skills:{6001:{uuid:6001,lv:1,cd:1,ccd:0},6003:{uuid:6003,lv:1,cd:10,ccd:0}},info:""}, - 6007:{uuid:6007,name:"兽人祭司",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Melee,hp:80,ap:20,speed:80,skills:{6001:{uuid:6001,lv:1,cd:1,ccd:0},6003:{uuid:6003,lv:1,cd:10,ccd:0}},info:""}, - 6008:{uuid:6008,name:"兽人图腾师",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Melee,hp:80,ap:20,speed:80,skills:{6001:{uuid:6001,lv:1,cd:1,ccd:0},6003:{uuid:6003,lv:1,cd:10,ccd:0}},info:""}, - // 6. 精英/BOSS型 - 6009:{uuid:6009,name:"兽人首领(BOSS)",path:"mo4", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Melee,hp:1500,ap:20,speed:100,skills:{6002:{uuid:6002,lv:1,cd:1,ccd:0},6004:{uuid:6004,lv:1,cd:10,ccd:0}},info:""}, + // 近战型 +6001:{uuid:6001,name:"兽人战士",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Melee,hp:120,ap:12,speed:120, + skills:{6001:{uuid:6001,lv:1,cd:0.65,ccd:0},6003:{uuid:6003,lv:1,cd:10,ccd:0}},info:""}, +6003:{uuid:6003,name:"兽人卫士",path:"mo4", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Melee,hp:350,ap:30,speed:120, + skills:{6001:{uuid:6001,lv:1,cd:2,ccd:0},6003:{uuid:6003,lv:1,cd:10,ccd:0}},info:""}, +// 4. 远程 +6004:{uuid:6004,name:"兽人射手",path:"mo2", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Long,hp:80,ap:45,speed:80, + skills:{6001:{uuid:6001,lv:1,cd:1.5,ccd:0},6003:{uuid:6003,lv:1,cd:10,ccd:0}},info:""}, +6005:{uuid:6005,name:"兽人法师",path:"mo5", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Melee,hp:80,ap:20,speed:80, + skills:{6001:{uuid:6001,lv:1,cd:1,ccd:0},6003:{uuid:6003,lv:1,cd:10,ccd:0}},info:""}, +// 6. 精英/BOSS型 +6002:{uuid:6002,name:"兽人斥候",path:"mo3", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Melee,hp:120,ap:12,speed:180, + skills:{6001:{uuid:6001,lv:1,cd:0.65,ccd:0},6003:{uuid:6003,lv:1,cd:10,ccd:0}},info:""}, +6006:{uuid:6006,name:"兽人首领(BOSS)",path:"mo6", fac:FacSet.MON,cards_lv:1,lv:1,type:HType.Melee,hp:1500,ap:20,speed:100, + skills:{6002:{uuid:6002,lv:1,cd:1,ccd:0},6004:{uuid:6004,lv:1,cd:10,ccd:0}},info:""}, }; diff --git a/assets/script/game/map/RogueConfig.ts b/assets/script/game/map/RogueConfig.ts index 72391e32..c4bd4952 100644 --- a/assets/script/game/map/RogueConfig.ts +++ b/assets/script/game/map/RogueConfig.ts @@ -18,17 +18,19 @@ export const MonType = { AP: 0, // 近战高功 SPEED: 1, // 高速贴近 HP: 2, // 高血皮厚 - //远程攻击 + RANGED: 3, // 射手 + MAGE: 4, // 远程魔法 // } export const MonList = { - [MonType.AP]: [6001,6002], // 近战高功 - [MonType.SPEED]: [6003], // 高速贴近 - [MonType.HP]: [6009], // 高血皮厚 - //远程攻击 + [MonType.AP]: [6001,6003], // 近战高功 + [MonType.SPEED]: [6002], // 高速贴近 + [MonType.HP]: [6002], // 高血皮厚 + [MonType.RANGED]: [6004], // 射手 + [MonType.MAGE]: [6005], // 远程魔法 // } -export const BossList = [5701] +export const BossList = [6006] export const StageDuration = 30 export const SpawnBaseCd = 1.6 export const SpawnMinCd = 0.5 From e018451524061aefccf6a1b84c7a497696604ac9 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 16:16:12 +0800 Subject: [PATCH 13/15] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E6=8A=A4?= =?UTF-8?q?=E7=9B=BE=E5=80=BC=E8=AE=A1=E7=AE=97=E5=85=AC=E5=BC=8F=E4=B8=AD?= =?UTF-8?q?=E9=81=97=E6=BC=8F=E7=9A=84=E7=99=BE=E5=88=86=E6=AF=94=E9=99=A4?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 护盾值计算原为直接使用攻击力乘以系数,实际应为攻击力乘以系数再除以100以符合设计文档中的百分比定义。 --- assets/script/game/hero/SCastSystem.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/script/game/hero/SCastSystem.ts b/assets/script/game/hero/SCastSystem.ts index a598771c..237178ff 100644 --- a/assets/script/game/hero/SCastSystem.ts +++ b/assets/script/game/hero/SCastSystem.ts @@ -208,7 +208,7 @@ export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate model.add_hp(addHp); target.health(addHp); } else if (kind === SkillKind.Shield && sAp !== 0) { - const addShield = Math.floor(sAp*_cAttrsComp.ap); + const addShield = Math.floor(sAp*_cAttrsComp.ap/100); model.add_shield(addShield); } if (!config.buffs || config.buffs.length === 0) continue; From f9012458d8e07928fa10c184039d74201a7874c9 Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 16:26:45 +0800 Subject: [PATCH 14/15] =?UTF-8?q?fix(=E8=8B=B1=E9=9B=84=E8=A7=86=E5=9B=BE)?= =?UTF-8?q?:=20=E4=BF=AE=E5=A4=8D=E6=8A=A4=E7=9B=BE=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=97=B6=E9=A1=B6=E9=83=A8=E8=A1=80=E6=9D=A1=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整顶部血条显示逻辑,将透明度控制改为显隐控制,确保护盾存在时血条始终可见。同时修复了护盾更新时未正确触发血条显示的问题,并优化了满血无护盾时的自动隐藏逻辑。 --- assets/script/game/hero/HeroViewComp.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 642a9f44..b3c0e964 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -115,13 +115,12 @@ export class HeroViewComp extends CCComp { private initUINodes() { this.top_node = this.node.getChildByName("top"); this.topOpacity = this.top_node.getComponent(UIOpacity) || this.top_node.addComponent(UIOpacity); + this.top_node.setPosition(0, 100, 0); this.topBasePos = this.top_node.position.clone(); const hpNode = this.top_node.getChildByName("hp"); if(this.model.fac==FacSet.HERO){ hpNode.getChildByName("Bar").getComponent(Sprite).color=new Color("#2ECC71") } - // let hp_y = this.node.getComponent(UITransform).height+10; - // this.top_node.setPosition(0, hp_y, 0); } @@ -169,12 +168,11 @@ export class HeroViewComp extends CCComp { /** 显示护盾 */ private show_shield(shield: number = 0, shield_max: number = 0) { this.lastBarUpdateTime = Date.now() / 1000; - if(!this.top_node.active) return let shield_progress = shield / shield_max; this.node.getChildByName("shielded").active = shield > 0; this.top_node.getChildByName("shield").active = shield > 0; this.top_node.getChildByName("shield").getComponent(ProgressBar).progress = shield_progress; - + this.setTopBarOpacity(false); } /** 显示血量 */ @@ -201,19 +199,24 @@ export class HeroViewComp extends CCComp { } } - private isFullHp(): boolean { + private isFullHpAndNoShield(): boolean { if (!this.model) return false; if (this.model.hp_max <= 0) return false; - return this.model.hp >= this.model.hp_max; + const isFullHp = this.model.hp >= this.model.hp_max; + const noShield = this.model.shield <= 0; + return isFullHp && noShield; } private setTopBarOpacity(isActive: boolean) { - if (!this.topOpacity || !this.topOpacity.isValid) return; - if (isActive) { + if (!this.top_node || !this.top_node.isValid) return; + if (this.topOpacity) { this.topOpacity.opacity = this.barActiveOpacity; + } + if (isActive) { + this.top_node.active = true; return; } - this.topOpacity.opacity = this.isFullHp() ? this.barIdleOpacity : this.barActiveOpacity; + this.top_node.active = !this.isFullHpAndNoShield(); } private activateTopBar() { From 76633e44d354b7b2456112091f8035a43639b31b Mon Sep 17 00:00:00 2001 From: panw Date: Tue, 24 Mar 2026 16:27:40 +0800 Subject: [PATCH 15/15] =?UTF-8?q?feat(=E8=8B=B1=E9=9B=84=E8=A7=86=E5=9B=BE?= =?UTF-8?q?):=20=E6=A0=B9=E6=8D=AE=E8=8B=B1=E9=9B=84=E7=AD=89=E7=BA=A7?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A1=B6=E9=83=A8=E8=8A=82=E7=82=B9=E5=9E=82?= =?UTF-8?q?=E7=9B=B4=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将静态的垂直位置改为基于英雄等级动态计算,使不同等级的英雄在视觉上有所区分 --- assets/script/game/hero/HeroViewComp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index b3c0e964..213a33ce 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -115,7 +115,7 @@ export class HeroViewComp extends CCComp { private initUINodes() { this.top_node = this.node.getChildByName("top"); this.topOpacity = this.top_node.getComponent(UIOpacity) || this.top_node.addComponent(UIOpacity); - this.top_node.setPosition(0, 100, 0); + this.top_node.setPosition(0, 90+this.model.lv*10, 0); this.topBasePos = this.top_node.position.clone(); const hpNode = this.top_node.getChildByName("hp"); if(this.model.fac==FacSet.HERO){