英雄技能实现

master
humingxing 2 days ago
parent 4c602718ed
commit 46cb97abf1
  1. 380
      assets/bundles/first/config/Hero.json
  2. 10
      assets/bundles/first/config/Level.json
  3. 9
      assets/script/battle/combat/PassiveSkillRuntime.ts
  4. 23
      assets/script/battle/combat/TowerLoadoutService.ts
  5. 4
      assets/script/battle/combat/TowerQueryTypes.ts
  6. 12
      assets/script/battle/config/BattleHeroTable.ts
  7. 2
      assets/script/battle/config/ChapterLevelBuilder.ts
  8. 4
      assets/script/game/ConfigProjectData.ts
  9. 4
      assets/script/game/TableAnomaly.ts
  10. 2
      assets/script/interface/AutoTable.ts
  11. 19
      assets/script/ui/BattleWeaponDescHero/UIBattleWeaponDescHero.ts
  12. 11
      docs/方案-战斗技能逻辑层.md

@ -16,7 +16,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
10101 10101
] ],
"skill_id": 220301
}, },
{ {
"id": 102, "id": 102,
@ -35,7 +36,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
10101 10101
] ],
"skill_id": 220301
}, },
{ {
"id": 103, "id": 103,
@ -54,7 +56,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
10101 10101
] ],
"skill_id": 220301
}, },
{ {
"id": 104, "id": 104,
@ -73,7 +76,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
10102 10102
] ],
"skill_id": 230301
}, },
{ {
"id": 105, "id": 105,
@ -92,7 +96,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
10102 10102
] ],
"skill_id": 230301
}, },
{ {
"id": 106, "id": 106,
@ -111,7 +116,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
10102 10102
] ],
"skill_id": 230301
}, },
{ {
"id": 107, "id": 107,
@ -130,7 +136,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
10103 10103
] ],
"skill_id": 240301
}, },
{ {
"id": 108, "id": 108,
@ -149,7 +156,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
10103 10103
] ],
"skill_id": 240301
}, },
{ {
"id": 109, "id": 109,
@ -168,7 +176,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
10103 10103
] ],
"skill_id": 240301
}, },
{ {
"id": 110, "id": 110,
@ -187,7 +196,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
10104 10104
] ],
"skill_id": 250301
}, },
{ {
"id": 111, "id": 111,
@ -206,7 +216,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
10104 10104
] ],
"skill_id": 250301
}, },
{ {
"id": 112, "id": 112,
@ -225,7 +236,48 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
10105 10105
] ],
"skill_id": 250301
},
{
"id": 111,
"name": "金4096",
"type": 1,
"herotype": 1,
"quality": 0,
"icon": "",
"res": "金4096",
"number": 4096,
"level": 13,
"atk": 4096,
"atk_range": 140,
"size": 1,
"critical_chance": 1000,
"critical_dam": 20000,
"atk_id": [
10105
],
"skill_id": 250301
},
{
"id": 112,
"name": "金8192",
"type": 1,
"herotype": 1,
"quality": 0,
"icon": "",
"res": "金8192",
"number": 8192,
"level": 14,
"atk": 9182,
"atk_range": 140,
"size": 1,
"critical_chance": 1000,
"critical_dam": 20000,
"atk_id": [
10105
],
"skill_id": 250301
}, },
{ {
"id": 201, "id": 201,
@ -244,7 +296,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
20101 20101
] ],
"skill_id": 310101
}, },
{ {
"id": 202, "id": 202,
@ -263,7 +316,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
20101 20101
] ],
"skill_id": 310101
}, },
{ {
"id": 203, "id": 203,
@ -282,7 +336,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
20101 20101
] ],
"skill_id": 310101
}, },
{ {
"id": 204, "id": 204,
@ -301,7 +356,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
20102 20102
] ],
"skill_id": 320101
}, },
{ {
"id": 205, "id": 205,
@ -320,7 +376,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
20102 20102
] ],
"skill_id": 320101
}, },
{ {
"id": 206, "id": 206,
@ -339,7 +396,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
20102 20102
] ],
"skill_id": 320101
}, },
{ {
"id": 207, "id": 207,
@ -358,7 +416,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
20103 20103
] ],
"skill_id": 330101
}, },
{ {
"id": 208, "id": 208,
@ -377,7 +436,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
20103 20103
] ],
"skill_id": 330101
}, },
{ {
"id": 209, "id": 209,
@ -396,7 +456,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
20103 20103
] ],
"skill_id": 330101
}, },
{ {
"id": 210, "id": 210,
@ -415,7 +476,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
20104 20104
] ],
"skill_id": 340101
}, },
{ {
"id": 211, "id": 211,
@ -434,7 +496,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
20104 20104
] ],
"skill_id": 340101
}, },
{ {
"id": 212, "id": 212,
@ -453,7 +516,48 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
20105 20105
] ],
"skill_id": 340101
},
{
"id": 213,
"name": "木4096",
"type": 1,
"herotype": 2,
"quality": 0,
"icon": "",
"res": "木4096",
"number": 4096,
"level": 13,
"atk": 4096,
"atk_range": 220,
"size": 1,
"critical_chance": 1000,
"critical_dam": 20000,
"atk_id": [
20105
],
"skill_id": 340101
},
{
"id": 214,
"name": "木9182",
"type": 1,
"herotype": 2,
"quality": 0,
"icon": "",
"res": "木8192",
"number": 8192,
"level": 14,
"atk": 9182,
"atk_range": 220,
"size": 1,
"critical_chance": 1000,
"critical_dam": 20000,
"atk_id": [
20105
],
"skill_id": 340101
}, },
{ {
"id": 301, "id": 301,
@ -472,7 +576,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
30101 30101
] ],
"skill_id": 420201
}, },
{ {
"id": 302, "id": 302,
@ -491,7 +596,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
30101 30101
] ],
"skill_id": 420201
}, },
{ {
"id": 303, "id": 303,
@ -510,7 +616,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
30101 30101
] ],
"skill_id": 420201
}, },
{ {
"id": 304, "id": 304,
@ -529,7 +636,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
30102 30102
] ],
"skill_id": 430201
}, },
{ {
"id": 305, "id": 305,
@ -548,7 +656,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
30102 30102
] ],
"skill_id": 430201
}, },
{ {
"id": 306, "id": 306,
@ -567,7 +676,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
30102 30102
] ],
"skill_id": 430201
}, },
{ {
"id": 307, "id": 307,
@ -586,7 +696,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
30103 30103
] ],
"skill_id": 440201
}, },
{ {
"id": 308, "id": 308,
@ -605,7 +716,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
30103 30103
] ],
"skill_id": 440201
}, },
{ {
"id": 309, "id": 309,
@ -624,7 +736,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
30103 30103
] ],
"skill_id": 440201
}, },
{ {
"id": 310, "id": 310,
@ -643,7 +756,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
30104 30104
] ],
"skill_id": 450201
}, },
{ {
"id": 311, "id": 311,
@ -662,7 +776,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
30104 30104
] ],
"skill_id": 450201
}, },
{ {
"id": 312, "id": 312,
@ -681,7 +796,48 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
30105 30105
] ],
"skill_id": 450201
},
{
"id": 313,
"name": "水4096",
"type": 2,
"herotype": 3,
"quality": 0,
"icon": "",
"res": "水4096",
"number": 4096,
"level": 13,
"atk": 4096,
"atk_range": 260,
"size": 1,
"critical_chance": 1000,
"critical_dam": 20000,
"atk_id": [
30105
],
"skill_id": 450201
},
{
"id": 314,
"name": "水9182",
"type": 2,
"herotype": 3,
"quality": 0,
"icon": "",
"res": "水8192",
"number": 8192,
"level": 14,
"atk": 9182,
"atk_range": 260,
"size": 1,
"critical_chance": 1000,
"critical_dam": 20000,
"atk_id": [
30105
],
"skill_id": 450201
}, },
{ {
"id": 401, "id": 401,
@ -700,7 +856,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
40101 40101
] ],
"skill_id": 520301
}, },
{ {
"id": 402, "id": 402,
@ -719,7 +876,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
40101 40101
] ],
"skill_id": 520301
}, },
{ {
"id": 403, "id": 403,
@ -738,7 +896,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
40101 40101
] ],
"skill_id": 520301
}, },
{ {
"id": 404, "id": 404,
@ -757,7 +916,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
40102 40102
] ],
"skill_id": 530301
}, },
{ {
"id": 405, "id": 405,
@ -776,7 +936,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
40102 40102
] ],
"skill_id": 530301
}, },
{ {
"id": 406, "id": 406,
@ -795,7 +956,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
40102 40102
] ],
"skill_id": 530301
}, },
{ {
"id": 407, "id": 407,
@ -814,7 +976,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
40103 40103
] ],
"skill_id": 540301
}, },
{ {
"id": 408, "id": 408,
@ -833,7 +996,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
40103 40103
] ],
"skill_id": 540301
}, },
{ {
"id": 409, "id": 409,
@ -852,7 +1016,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
40103 40103
] ],
"skill_id": 540301
}, },
{ {
"id": 410, "id": 410,
@ -871,7 +1036,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
40104 40104
] ],
"skill_id": 550301
}, },
{ {
"id": 411, "id": 411,
@ -890,7 +1056,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
40104 40104
] ],
"skill_id": 550301
}, },
{ {
"id": 412, "id": 412,
@ -909,7 +1076,48 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
40105 40105
] ],
"skill_id": 550301
},
{
"id": 413,
"name": "火4096",
"type": 2,
"herotype": 1,
"quality": 0,
"icon": "",
"res": "火4096",
"number": 4096,
"level": 13,
"atk": 4096,
"atk_range": 300,
"size": 1,
"critical_chance": 1000,
"critical_dam": 20000,
"atk_id": [
40105
],
"skill_id": 550301
},
{
"id": 414,
"name": "火9182",
"type": 2,
"herotype": 1,
"quality": 0,
"icon": "",
"res": "火8192",
"number": 8192,
"level": 14,
"atk": 9182,
"atk_range": 300,
"size": 1,
"critical_chance": 1000,
"critical_dam": 20000,
"atk_id": [
40105
],
"skill_id": 550301
}, },
{ {
"id": 501, "id": 501,
@ -928,7 +1136,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
50101 50101
] ],
"skill_id": 620201
}, },
{ {
"id": 502, "id": 502,
@ -947,7 +1156,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
50101 50101
] ],
"skill_id": 620201
}, },
{ {
"id": 503, "id": 503,
@ -966,7 +1176,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
50101 50101
] ],
"skill_id": 620201
}, },
{ {
"id": 504, "id": 504,
@ -985,7 +1196,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
50102 50102
] ],
"skill_id": 630201
}, },
{ {
"id": 505, "id": 505,
@ -1004,7 +1216,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
50102 50102
] ],
"skill_id": 630201
}, },
{ {
"id": 506, "id": 506,
@ -1023,7 +1236,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
50102 50102
] ],
"skill_id": 630201
}, },
{ {
"id": 507, "id": 507,
@ -1042,7 +1256,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
50103 50103
] ],
"skill_id": 640201
}, },
{ {
"id": 508, "id": 508,
@ -1061,7 +1276,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
50103 50103
] ],
"skill_id": 640201
}, },
{ {
"id": 509, "id": 509,
@ -1080,7 +1296,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
50103 50103
] ],
"skill_id": 640201
}, },
{ {
"id": 510, "id": 510,
@ -1099,7 +1316,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
50104 50104
] ],
"skill_id": 650201
}, },
{ {
"id": 511, "id": 511,
@ -1118,7 +1336,8 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
50104 50104
] ],
"skill_id": 650201
}, },
{ {
"id": 512, "id": 512,
@ -1137,6 +1356,47 @@
"critical_dam": 20000, "critical_dam": 20000,
"atk_id": [ "atk_id": [
50105 50105
] ],
"skill_id": 650201
},
{
"id": 513,
"name": "土4096",
"type": 1,
"herotype": 5,
"quality": 0,
"icon": "",
"res": "土4096",
"number": 4096,
"level": 13,
"atk": 4096,
"atk_range": 180,
"size": 1,
"critical_chance": 1000,
"critical_dam": 20000,
"atk_id": [
50105
],
"skill_id": 650201
},
{
"id": 514,
"name": "土9182",
"type": 1,
"herotype": 5,
"quality": 0,
"icon": "",
"res": "土8192",
"number": 8192,
"level": 14,
"atk": 9182,
"atk_range": 180,
"size": 1,
"critical_chance": 1000,
"critical_dam": 20000,
"atk_id": [
50105
],
"skill_id": 650201
} }
] ]

@ -11,7 +11,7 @@
"loserreward": "1|5", "loserreward": "1|5",
"monster": "1,1001,10,1.6|2,1001,10,1.6|3,1001,10,1.6|4,1001,10,1.6|5,1002,15,1.6|6,1002,15,1.6|7,1002,15,1.6|8,1002,15,1.6|9,1002,15,1.6|10,1003,20,1.6|11,1003,20,1.6|12,1003,20,1.6|13,1003,20,1.6|14,1003,20,1.6|15,1003,25,1.6|16,1003,25,1.6|17,1003,25,1.6|18,1003,25,1.6|19,1003,25,1.6|20,1003,30,1.6|21,1003,30,1.6|22,1003,30,1.6|23,1003,30,1.6|24,1003,30,1.6|25,1003,40,1.6", "monster": "1,1001,10,1.6|2,1001,10,1.6|3,1001,10,1.6|4,1001,10,1.6|5,1002,15,1.6|6,1002,15,1.6|7,1002,15,1.6|8,1002,15,1.6|9,1002,15,1.6|10,1003,20,1.6|11,1003,20,1.6|12,1003,20,1.6|13,1003,20,1.6|14,1003,20,1.6|15,1003,25,1.6|16,1003,25,1.6|17,1003,25,1.6|18,1003,25,1.6|19,1003,25,1.6|20,1003,30,1.6|21,1003,30,1.6|22,1003,30,1.6|23,1003,30,1.6|24,1003,30,1.6|25,1003,40,1.6",
"boss": "5|1101,10|1101,15|1101,20|1101,25|1101", "boss": "5|1101,10|1101,15|1101,20|1101,25|1101",
"bosspro": 1200, "bosspro": 10000,
"unlockland1": "0,2,5", "unlockland1": "0,2,5",
"unlockland2": "0,5,5", "unlockland2": "0,5,5",
"unlockland3": "1,5,1|2,5,1|3,5,1|4,5,1|5,5,1", "unlockland3": "1,5,1|2,5,1|3,5,1|4,5,1|5,5,1",
@ -49,7 +49,7 @@
"loserreward": "1|5", "loserreward": "1|5",
"monster": "1,2001,10,1.6|2,2001,10,1.6|3,2001,10,1.6|4,2001,10,1.6|5,2002,15,1.6|6,2002,15,1.6|7,2002,15,1.6|8,2002,15,1.6|9,2002,15,1.6|10,2003,20,1.6|11,2003,20,1.6|12,2003,20,1.6|13,2003,20,1.6|14,2003,20,1.6|15,2003,25,1.6|16,2003,25,1.6|17,2003,25,1.6|18,2003,25,1.6|19,2003,25,1.6|20,2003,30,1.6|21,2003,30,1.6|22,2003,30,1.6|23,2003,30,1.6|24,2003,30,1.6|25,2003,40,1.6", "monster": "1,2001,10,1.6|2,2001,10,1.6|3,2001,10,1.6|4,2001,10,1.6|5,2002,15,1.6|6,2002,15,1.6|7,2002,15,1.6|8,2002,15,1.6|9,2002,15,1.6|10,2003,20,1.6|11,2003,20,1.6|12,2003,20,1.6|13,2003,20,1.6|14,2003,20,1.6|15,2003,25,1.6|16,2003,25,1.6|17,2003,25,1.6|18,2003,25,1.6|19,2003,25,1.6|20,2003,30,1.6|21,2003,30,1.6|22,2003,30,1.6|23,2003,30,1.6|24,2003,30,1.6|25,2003,40,1.6",
"boss": "5|2101,10|2101,15|2101,20|2101,25|2101", "boss": "5|2101,10|2101,15|2101,20|2101,25|2101",
"bosspro": 1200, "bosspro": 10000,
"unlockland1": "0,2,5", "unlockland1": "0,2,5",
"unlockland2": "0,5,5", "unlockland2": "0,5,5",
"unlockland3": "1,5,1|2,5,1|3,5,1|4,5,1|5,5,1", "unlockland3": "1,5,1|2,5,1|3,5,1|4,5,1|5,5,1",
@ -87,7 +87,7 @@
"loserreward": "1|5", "loserreward": "1|5",
"monster": "1,3001,10,1.6|2,3001,10,1.6|3,3001,10,1.6|4,3001,10,1.6|5,3002,15,1.6|6,3002,15,1.6|7,3002,15,1.6|8,3002,15,1.6|9,3002,15,1.6|10,3003,20,1.6|11,3003,20,1.6|12,3003,20,1.6|13,3003,20,1.6|14,3003,20,1.6|15,3003,25,1.6|16,3003,25,1.6|17,3003,25,1.6|18,3003,25,1.6|19,3003,25,1.6|20,3003,30,1.6|21,3003,30,1.6|22,3003,30,1.6|23,3003,30,1.6|24,3003,30,1.6|25,3003,40,1.6", "monster": "1,3001,10,1.6|2,3001,10,1.6|3,3001,10,1.6|4,3001,10,1.6|5,3002,15,1.6|6,3002,15,1.6|7,3002,15,1.6|8,3002,15,1.6|9,3002,15,1.6|10,3003,20,1.6|11,3003,20,1.6|12,3003,20,1.6|13,3003,20,1.6|14,3003,20,1.6|15,3003,25,1.6|16,3003,25,1.6|17,3003,25,1.6|18,3003,25,1.6|19,3003,25,1.6|20,3003,30,1.6|21,3003,30,1.6|22,3003,30,1.6|23,3003,30,1.6|24,3003,30,1.6|25,3003,40,1.6",
"boss": "5|3101,10|3101,15|3101,20|3101,25|3101", "boss": "5|3101,10|3101,15|3101,20|3101,25|3101",
"bosspro": 1200, "bosspro": 10000,
"unlockland1": "0,2,5", "unlockland1": "0,2,5",
"unlockland2": "0,5,5", "unlockland2": "0,5,5",
"unlockland3": "1,5,1|2,5,1|3,5,1|4,5,1|5,5,1", "unlockland3": "1,5,1|2,5,1|3,5,1|4,5,1|5,5,1",
@ -125,7 +125,7 @@
"loserreward": "1|5", "loserreward": "1|5",
"monster": "1,4001,10,1.6|2,4001,10,1.6|3,4001,10,1.6|4,4001,10,1.6|5,4002,15,1.6|6,4002,15,1.6|7,4002,15,1.6|8,4002,15,1.6|9,4002,15,1.6|10,4003,20,1.6|11,4003,20,1.6|12,4003,20,1.6|13,4003,20,1.6|14,4003,20,1.6|15,4003,25,1.6|16,4003,25,1.6|17,4003,25,1.6|18,4003,25,1.6|19,4003,25,1.6|20,4003,30,1.6|21,4003,30,1.6|22,4003,30,1.6|23,4003,30,1.6|24,4003,30,1.6|25,4003,40,1.6", "monster": "1,4001,10,1.6|2,4001,10,1.6|3,4001,10,1.6|4,4001,10,1.6|5,4002,15,1.6|6,4002,15,1.6|7,4002,15,1.6|8,4002,15,1.6|9,4002,15,1.6|10,4003,20,1.6|11,4003,20,1.6|12,4003,20,1.6|13,4003,20,1.6|14,4003,20,1.6|15,4003,25,1.6|16,4003,25,1.6|17,4003,25,1.6|18,4003,25,1.6|19,4003,25,1.6|20,4003,30,1.6|21,4003,30,1.6|22,4003,30,1.6|23,4003,30,1.6|24,4003,30,1.6|25,4003,40,1.6",
"boss": "5|4101,10|4101,15|4101,20|4101,25|4101", "boss": "5|4101,10|4101,15|4101,20|4101,25|4101",
"bosspro": 1200, "bosspro": 10000,
"unlockland1": "0,2,5", "unlockland1": "0,2,5",
"unlockland2": "0,5,5", "unlockland2": "0,5,5",
"unlockland3": "1,5,1|2,5,1|3,5,1|4,5,1|5,5,1", "unlockland3": "1,5,1|2,5,1|3,5,1|4,5,1|5,5,1",
@ -163,7 +163,7 @@
"loserreward": "1|5", "loserreward": "1|5",
"monster": "1,5001,10,1.6|2,5001,10,1.6|3,5001,10,1.6|4,5001,10,1.6|5,5002,15,1.6|6,5002,15,1.6|7,5002,15,1.6|8,5002,15,1.6|9,5002,15,1.6|10,5003,20,1.6|11,5003,20,1.6|12,5003,20,1.6|13,5003,20,1.6|14,5003,20,1.6|15,5003,25,1.6|16,5003,25,1.6|17,5003,25,1.6|18,5003,25,1.6|19,5003,25,1.6|20,5003,30,1.6|21,5003,30,1.6|22,5003,30,1.6|23,5003,30,1.6|24,5003,30,1.6|25,5003,40,1.6", "monster": "1,5001,10,1.6|2,5001,10,1.6|3,5001,10,1.6|4,5001,10,1.6|5,5002,15,1.6|6,5002,15,1.6|7,5002,15,1.6|8,5002,15,1.6|9,5002,15,1.6|10,5003,20,1.6|11,5003,20,1.6|12,5003,20,1.6|13,5003,20,1.6|14,5003,20,1.6|15,5003,25,1.6|16,5003,25,1.6|17,5003,25,1.6|18,5003,25,1.6|19,5003,25,1.6|20,5003,30,1.6|21,5003,30,1.6|22,5003,30,1.6|23,5003,30,1.6|24,5003,30,1.6|25,5003,40,1.6",
"boss": "5|5101,10|5101,15|5101,20|5101,25|5101", "boss": "5|5101,10|5101,15|5101,20|5101,25|5101",
"bosspro": 1200, "bosspro": 10000,
"unlockland1": "0,2,5", "unlockland1": "0,2,5",
"unlockland2": "0,5,5", "unlockland2": "0,5,5",
"unlockland3": "1,5,1|2,5,1|3,5,1|4,5,1|5,5,1", "unlockland3": "1,5,1|2,5,1|3,5,1|4,5,1|5,5,1",

@ -36,8 +36,10 @@ export interface IPassiveAtkOverrideHost {
applyNormalAtkOverride(session: BattleSession, entityId: EntityId, atkType: string, atkPara: string, sourceSkillId: number): void; applyNormalAtkOverride(session: BattleSession, entityId: EntityId, atkType: string, atkPara: string, sourceSkillId: number): void;
} }
/** bindFromLoadout 只需武器被动槽 */ /** bindFromLoadout:英雄被动 + 武器被动 */
interface PassiveLoadoutBind { interface PassiveLoadoutBind {
/** 英雄被动 Skill.id(`Hero.skill_id` 且 type=2;0=无) */
heroPassiveSkillId: number;
/** 武器技能 Skill.id */ /** 武器技能 Skill.id */
weaponSkillId: number; weaponSkillId: number;
/** 武器技能是否为主动 */ /** 武器技能是否为主动 */
@ -587,6 +589,11 @@ export class PassiveSkillHost {
} }
this.unbind(entityId); this.unbind(entityId);
const list: PassiveSkillBind[] = []; const list: PassiveSkillBind[] = [];
const heroPassiveId = Math.floor(Number(loadout.heroPassiveSkillId) || 0);
if (heroPassiveId > 0) {
const bind = this._parseSkill(heroPassiveId, false);
if (bind) list.push(bind);
}
if (loadout.weaponSkillId > 0 && !loadout.weaponSkillActive) { if (loadout.weaponSkillId > 0 && !loadout.weaponSkillActive) {
const bind = this._parseSkill(loadout.weaponSkillId, false); const bind = this._parseSkill(loadout.weaponSkillId, false);
if (bind) list.push(bind); if (bind) list.push(bind);

@ -101,6 +101,7 @@ export class TowerLoadoutService {
} }
// 五行每行自带技能数组;非五行仍按合成等级取下标 // 五行每行自带技能数组;非五行仍按合成等级取下标
const skillLv = isElementHero(hero) ? 1 : level; const skillLv = isElementHero(hero) ? 1 : level;
const heroSkill = this._resolveHeroSkillSlots(heroUltSkillId(hero, skillLv));
const loadout: TowerLoadout = { const loadout: TowerLoadout = {
weapon1Id: heroId, weapon1Id: heroId,
level, level,
@ -108,7 +109,8 @@ export class TowerLoadoutService {
normalBaseAtkId: heroNormalSkillId(hero, skillLv), normalBaseAtkId: heroNormalSkillId(hero, skillLv),
overAtkType: '', overAtkType: '',
overAtkPara: '', overAtkPara: '',
activeSkillBaseAtkId: heroUltSkillId(hero, skillLv), activeSkillBaseAtkId: heroSkill.activeId,
heroPassiveSkillId: heroSkill.passiveId,
weaponSkillId, weaponSkillId,
weaponSkillActive, weaponSkillActive,
}; };
@ -486,6 +488,25 @@ export class TowerLoadoutService {
} }
} }
/**
* `Hero.skill_id` 按 Skill.type 拆主动/被动槽。
* @param skillId Hero.skill_id
*/
private _resolveHeroSkillSlots(skillId: number): { activeId: number; passiveId: number } {
const id = Math.floor(Number(skillId) || 0);
if (!(id > 0)) return { activeId: 0, passiveId: 0 };
const sk = gg.data.table.getTableData<ITableSkill>(TableNames.Skill, id);
if (!sk) {
console.log(`[TowerLoadout] 英雄技能缺失 Skill.id=${id}`);
return { activeId: 0, passiveId: 0 };
}
const typ = Math.floor(Number(sk.type) || 0);
if (typ === 1) return { activeId: id, passiveId: 0 };
if (typ === 2) return { activeId: 0, passiveId: id };
console.log(`[TowerLoadout] 英雄技能 type 非主动/被动,仍按主动挂`, id, typ);
return { activeId: id, passiveId: 0 };
}
/** /**
* 武器被动 Skill.skill 类型8:写入 AtkHookComp,普攻命中按距离加伤。 * 武器被动 Skill.skill 类型8:写入 AtkHookComp,普攻命中按距离加伤。
* @param session 战斗会话 * @param session 战斗会话

@ -16,8 +16,10 @@ export interface TowerLoadout {
overAtkType: string; overAtkType: string;
/** 被动 result 10 覆盖的普攻 atk_para */ /** 被动 result 10 覆盖的普攻 atk_para */
overAtkPara: string; overAtkPara: string;
/** 英雄主动 Skill.id(0=无) */ /** 英雄主动 Skill.id(`Hero.skill_id` 且 type=1;0=无) */
activeSkillBaseAtkId: number; activeSkillBaseAtkId: number;
/** 英雄被动 Skill.id(`Hero.skill_id` 且 type=2;0=无) */
heroPassiveSkillId: number;
/** 武器技能 Skill.id(0=无;type=2 时仅被动) */ /** 武器技能 Skill.id(0=无;type=2 时仅被动) */
weaponSkillId: number; weaponSkillId: number;
/** 武器技能是否为主动(type=1) */ /** 武器技能是否为主动(type=1) */

@ -38,9 +38,15 @@ export function heroNormalSkillId(hero: ITableHero, composeLevel: number): numbe
return _skillIdAtLevel(hero.atk_id, composeLevel); return _skillIdAtLevel(hero.atk_id, composeLevel);
} }
/** 英雄主动技能 id(Hero.act_skill 已删,恒无) */ /**
export function heroUltSkillId(_hero: ITableHero | null | undefined, _composeLevel = 1): number { * 英雄技能 id(`Hero.skill_id`;0=无)。
return 0; * 主动/被动由 Skill.type 决定,挂载见 TowerLoadoutService。
* @param hero Hero 行
* @param _composeLevel 保留签名(skill_id 不按等级取下标)
*/
export function heroUltSkillId(hero: ITableHero | null | undefined, _composeLevel = 1): number {
if (!hero) return 0;
return Math.floor(Number(hero.skill_id) || 0);
} }
/** 是否基础单字英雄 */ /** 是否基础单字英雄 */

@ -312,6 +312,8 @@ export class ChapterLevelBuilder {
const atkId = Number(rawAtkId); const atkId = Number(rawAtkId);
if (Number.isFinite(atkId) && atkId > 0) membershipAdd(baseAtkIds, atkId); if (Number.isFinite(atkId) && atkId > 0) membershipAdd(baseAtkIds, atkId);
} }
const heroSkillId = Math.floor(Number(w1.skill_id) || 0);
if (heroSkillId > 0) membershipAdd(baseAtkIds, heroSkillId);
} }
const atkIds = membershipToArray(baseAtkIds); const atkIds = membershipToArray(baseAtkIds);

@ -395,7 +395,7 @@ export class ConfigProjectData extends Singleton {
return result; return result;
} }
/** 英雄 atk_id + 当前装备武器 act_skill */ /** 英雄 atk_id + skill_id + 当前装备武器 act_skill */
public getSkillIdsForWeapon1(weapon1Id: number, _level: number): number[] { public getSkillIdsForWeapon1(weapon1Id: number, _level: number): number[] {
const config = gg.data.table.getTableData<ITableHero>(TableNames.Hero, weapon1Id); const config = gg.data.table.getTableData<ITableHero>(TableNames.Hero, weapon1Id);
if (!config) return []; if (!config) return [];
@ -403,6 +403,8 @@ export class ConfigProjectData extends Singleton {
for (const id of config.atk_id ?? []) { for (const id of config.atk_id ?? []) {
if (id > 0) skillIdArr.push(id); if (id > 0) skillIdArr.push(id);
} }
const heroSkillId = Math.floor(Number(config.skill_id) || 0);
if (heroSkillId > 0) skillIdArr.push(heroSkillId);
try { try {
const weaponId = gg.equip?.getHeroDisplayWeaponId?.(weapon1Id) ?? 0; const weaponId = gg.equip?.getHeroDisplayWeaponId?.(weapon1Id) ?? 0;
if (weaponId > 0) { if (weaponId > 0) {

@ -99,6 +99,10 @@ export class TableAnomaly {
this.warn('Hero', id, 'herotype', '不是金木水火土 1~5', row.herotype); this.warn('Hero', id, 'herotype', '不是金木水火土 1~5', row.herotype);
} }
this._checkSkillIds(src, 'Hero', id, 'atk_id', row.atk_id); this._checkSkillIds(src, 'Hero', id, 'atk_id', row.atk_id);
const skillId = Math.floor(Number(row.skill_id) || 0);
if (skillId > 0 && !src.getTableData<ITableSkill>('Skill', skillId)) {
this.warn('Hero', id, 'skill_id', 'Skill 行不存在', skillId);
}
} }
} }

@ -180,6 +180,8 @@ declare global {
readonly critical_dam: number; readonly critical_dam: number;
/** 普攻id */ /** 普攻id */
readonly atk_id: number[]; readonly atk_id: number[];
/** 技能id */
readonly skill_id: number;
} }
/** /**
* Headicon 配置数据 * Headicon 配置数据

@ -29,7 +29,7 @@ import { Auto_BattleWeaponDescHero } from './Auto_BattleWeaponDescHero';
import type { TileEntitySnapshot, TowerRuntimeSnapshot } from '../../battle/combat/TowerQueryTypes'; import type { TileEntitySnapshot, TowerRuntimeSnapshot } from '../../battle/combat/TowerQueryTypes';
import { TowerQueryService } from '../../battle/combat/TowerQueryService'; import { TowerQueryService } from '../../battle/combat/TowerQueryService';
import { deriveTowerSetupStats, TowerStatDisplay } from '../../battle/combat/TowerStatResolver'; import { deriveTowerSetupStats, TowerStatDisplay } from '../../battle/combat/TowerStatResolver';
import { heroNormalSkillId, isElementHero } from '../../battle/config/BattleHeroTable'; import { heroUltSkillId, isElementHero } from '../../battle/config/BattleHeroTable';
import { WeaponComposeConfigProvider } from '../../battle/bag/WeaponComposeConfigProvider'; import { WeaponComposeConfigProvider } from '../../battle/bag/WeaponComposeConfigProvider';
import { BATTLE_HERO_NUM_PATH } from '../../battle/res/BattleHeroResCollector'; import { BATTLE_HERO_NUM_PATH } from '../../battle/res/BattleHeroResCollector';
import { glyphSpineHasSkin } from '../../battle/view/GlyphSpineSkin'; import { glyphSpineHasSkin } from '../../battle/view/GlyphSpineSkin';
@ -404,27 +404,26 @@ export class UIBattleWeaponDescHero extends Auto_BattleWeaponDescHero {
} }
/** /**
* lb_skillName / lb_skillDesc:读 Hero.atk_id 对应 Skill。 * lb_skillName / lb_skillDesc:读 Hero.skill_id 对应 Skill.name / Skill.desc。
* Skill.name 配表常为空时,名称回退为 desc,避免「技能:」右侧空白。 * 名称不回退 desc,避免与描述重复。
* @param w1 Hero * @param w1 Hero
* @param level 合成等级 * @param _level 合成等级(skill_id 不按等级取下标)
*/ */
private _refreshSkillLabels(w1: ITableHero, level: number): void { private _refreshSkillLabels(w1: ITableHero, _level: number): void {
const skillId = heroNormalSkillId(w1, level); const skillId = heroUltSkillId(w1);
const skill = skillId > 0 const skill = skillId > 0
? gg.data.table.getTableData<ITableSkill>(TableNames.Skill, skillId) ? gg.data.table.getTableData<ITableSkill>(TableNames.Skill, skillId)
: null; : null;
if (skillId > 0 && !skill) { if (skillId > 0 && !skill) {
console.warn(LOG, 'Skill 缺失', skillId, w1.id, level); console.warn(LOG, 'Skill 缺失', skillId, w1.id);
} }
const nameKey = skill ? String(skill.name ?? '').trim() : ''; const nameKey = skill ? String(skill.name ?? '').trim() : '';
const descKey = skill ? String(skill.desc ?? '').trim() : ''; const descKey = skill ? String(skill.desc ?? '').trim() : '';
if (skill && !nameKey) { if (skill && !nameKey) {
console.warn(LOG, 'Skill.name 为空,名称回退 desc', skillId, w1.id); console.warn(LOG, 'Skill.name 为空', skillId, w1.id);
} }
if (this.lb_skillName) { if (this.lb_skillName) {
const nameText = nameKey ? gg.lang.get(nameKey) : (descKey ? gg.lang.get(descKey) : ''); this.lb_skillName.string = nameKey ? gg.lang.get(nameKey) : '';
this.lb_skillName.string = nameText;
} }
if (this.lb_skillDesc) { if (this.lb_skillDesc) {
this.lb_skillDesc.string = descKey ? gg.lang.get(descKey) : ''; this.lb_skillDesc.string = descKey ? gg.lang.get(descKey) : '';

@ -10,7 +10,7 @@
|----------|-------------|------| |----------|-------------|------|
| **技能** | `Skill` / `ITableSkill` | 战斗技能配置(普攻形态、主动、被动、额外效果) | | **技能** | `Skill` / `ITableSkill` | 战斗技能配置(普攻形态、主动、被动、额外效果) |
| **普攻** | `Hero.atk_id[level-1]` → `Skill.id` | 每塔 1 个,随合成等级取数组索引 | | **普攻** | `Hero.atk_id[level-1]` → `Skill.id` | 每塔 1 个,随合成等级取数组索引 |
| **英雄技能** | `Hero.act_skill[level-1]` → `Skill.id` | 可无;按合成等级取索引 | | **英雄技能** | `Hero.skill_id` → `Skill.id` | 可无;`type=1` 主动 / `type=2` 被动(数字英雄每行自带) |
| **武器技能** | `Weapon.act_skill` → `Skill.id` | 局外装备确定;`type=1` 主动 / `type=2` 被动 | | **武器技能** | `Weapon.act_skill` → `Skill.id` | 局外装备确定;`type=1` 主动 / `type=2` 被动 |
| **词条** | — | 旧三选1表已删;代码遗留路径须空操作,禁止把新 Skill 当词条 | | **词条** | — | 旧三选1表已删;代码遗留路径须空操作,禁止把新 Skill 当词条 |
@ -21,12 +21,14 @@
``` ```
Hero(合成等级 level) Hero(合成等级 level)
├─ atk_id[level-1] → 普攻 Skill ├─ atk_id[level-1] → 普攻 Skill
├─ act_skill[level-1] → 英雄主动 Skill(可空) ├─ skill_id → 英雄技能(0=无;type=1 进 Ability 主动槽 / type=2 进 PassiveSkillHost)
└─ 装备武器 weaponId └─ 装备武器 / 技能宝石 weaponId
└─ Weapon.act_skill → 武器技能(0=无;type 分流主动/被动) └─ Weapon.act_skill → 武器技能(0=无;type 分流主动/被动)
``` ```
装备解析:`gg.equip.getHeroDisplayWeaponId(heroId)`(穿戴 >0 用穿戴,否则 `Hero.startweapon`)。 挂载:`TowerLoadoutService.initEntity` 读 `Hero.skill_id`,按 `Skill.type` 写入 `activeSkillBaseAtkId` 或 `heroPassiveSkillId`;`applyAbilities` 挂主动 Ability,`PassiveSkillHost.bindFromLoadout` 挂被动。
装备解析:五行读镶嵌技能宝石;非五行 `gg.equip.getHeroDisplayWeaponId(heroId)`。
## 3. Ability id ## 3. Ability id
@ -202,3 +204,4 @@ Hero(合成等级 level)
| 2026-10-09 | 冰锥发射物改「冰锥」;冰冻覆盖「冰冻」播怪物冻结/解冻怪物冻结2 | | 2026-10-09 | 冰锥发射物改「冰锥」;冰冻覆盖「冰冻」播怪物冻结/解冻怪物冻结2 |
| 2026-10-09 | atk_type=14:武器动画循环至多段伤害结束(棍神通大风车与时长同步) | | 2026-10-09 | atk_type=14:武器动画循环至多段伤害结束(棍神通大风车与时长同步) |
| 2026-10-09 | atk_type=14:每段按施法者射程圆重新索敌,非开战锁定名单 | | 2026-10-09 | atk_type=14:每段按施法者射程圆重新索敌,非开战锁定名单 |
| 2026-10-15 | Hero.skill_id:数字英雄挂载技能;type=1→主动 Ability,type=2→PassiveSkillHost |

Loading…
Cancel
Save