refactor(cardSkill): 完成卡牌技能触发机制类型化改造

本次提交为全量的卡牌技能触发系统重构,主要变更包括:
1.  新增CardTriggerType枚举,统一卡牌触发类型定义
2.  补全依赖事件派发:每波战斗结束FightEnd、英雄死亡HeroDead(带阵营过滤)、复活成功ReviveSuccess
3.  重构SkillBoxComp,按触发类型动态注册事件监听,拆分即时/定时/驻场/事件型逻辑
4.  批量迁移所有卡牌配置,为旧技能补充显式触发类型
5.  新增全局触发次数上限机制,区分每波/全局触发计数规则
6.  新增配套设计文档,记录改造背景与方案细节

本次重构彻底解决了原有隐式配置难以维护、无法支持事件型触发的痛点,实现了技能触发逻辑的标准化与可扩展性。
This commit is contained in:
panFD
2026-06-19 23:01:24 +08:00
parent a866cba8d1
commit dc8391847b
14 changed files with 4924 additions and 2125 deletions

View File

@@ -16006,7 +16006,7 @@
"propertyPath": [
"_active"
],
"value": true
"value": false
},
{
"__type__": "cc.TargetOverrideInfo",
@@ -16135,8 +16135,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 30
"width": 180,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -16174,10 +16174,10 @@
"_string": "名称",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 25,
"_fontSize": 25,
"_actualFontSize": 31,
"_fontSize": 30,
"_fontFamily": "Arial",
"_lineHeight": 30,
"_lineHeight": 35,
"_overflow": 2,
"_enableWrapText": true,
"_font": null,
@@ -16233,7 +16233,7 @@
"_target": null,
"_left": 0,
"_right": 0,
"_top": 161.724,
"_top": 156.724,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
@@ -19587,7 +19587,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -92.5,
"y": -86.209,
"z": 0
},
"_lrot": {
@@ -19677,8 +19677,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 70
"width": 180,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -19713,13 +19713,13 @@
"b": 255,
"a": 255
},
"_string": "全体英雄攻击+5\n全体英雄攻击+5",
"_string": "全体英雄攻击+5全体英雄攻击+5全体英雄攻击+5",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 21,
"_fontSize": 35,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_lineHeight": 25,
"_overflow": 2,
"_enableWrapText": true,
"_font": null,
@@ -19787,7 +19787,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 170,
"height": 55
"height": 90
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -20092,8 +20092,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 30
"width": 180,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -20131,10 +20131,10 @@
"_string": "名称",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 25,
"_fontSize": 25,
"_actualFontSize": 31,
"_fontSize": 30,
"_fontFamily": "Arial",
"_lineHeight": 30,
"_lineHeight": 35,
"_overflow": 2,
"_enableWrapText": true,
"_font": null,
@@ -20190,7 +20190,7 @@
"_target": null,
"_left": 0,
"_right": 0,
"_top": 161.724,
"_top": 156.724,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
@@ -23541,7 +23541,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -92.5,
"y": -86.209,
"z": 0
},
"_lrot": {
@@ -23631,8 +23631,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 70
"width": 180,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -23667,13 +23667,13 @@
"b": 255,
"a": 255
},
"_string": "全体英雄攻击+5\n全体英雄攻击+5",
"_string": "全体英雄攻击+5全体英雄攻击+5全体英雄攻击+5",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 21,
"_fontSize": 35,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_lineHeight": 25,
"_overflow": 2,
"_enableWrapText": true,
"_font": null,
@@ -23741,7 +23741,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 170,
"height": 55
"height": 90
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -24046,8 +24046,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 30
"width": 180,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -24085,10 +24085,10 @@
"_string": "名称",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 25,
"_fontSize": 25,
"_actualFontSize": 31,
"_fontSize": 30,
"_fontFamily": "Arial",
"_lineHeight": 30,
"_lineHeight": 35,
"_overflow": 2,
"_enableWrapText": true,
"_font": null,
@@ -24144,7 +24144,7 @@
"_target": null,
"_left": 0,
"_right": 0,
"_top": 161.724,
"_top": 156.724,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
@@ -27495,7 +27495,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -92.5,
"y": -86.209,
"z": 0
},
"_lrot": {
@@ -27585,8 +27585,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 70
"width": 180,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -27621,13 +27621,13 @@
"b": 255,
"a": 255
},
"_string": "全体英雄攻击+5\n全体英雄攻击+5",
"_string": "全体英雄攻击+5全体英雄攻击+5全体英雄攻击+5",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 21,
"_fontSize": 35,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_lineHeight": 25,
"_overflow": 2,
"_enableWrapText": true,
"_font": null,
@@ -27695,7 +27695,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 170,
"height": 55
"height": 90
},
"_anchorPoint": {
"__type__": "cc.Vec2",