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

@@ -114,7 +114,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 30,
"y": 40,
"z": 0
},
"_lrot": {
@@ -126,8 +126,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 0.2,
"y": 0.2,
"z": 1
},
"_mobility": 0,
@@ -154,8 +154,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 60,
"height": 60
"width": 370,
"height": 370
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -191,7 +191,7 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@d9082",
"__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@d8db6",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
@@ -230,10 +230,10 @@
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_left": 3,
"_right": 3,
"_top": 3,
"_bottom": 3,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
@@ -261,8 +261,6 @@
"__id__": 0
},
"fileId": "93fFoXu3BBYqu4RLG2YPon",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
@@ -1160,7 +1158,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 30.251,
"y": 40,
"z": 0
},
"_lrot": {
@@ -1172,8 +1170,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.5,
"y": 0.5,
"x": 0.7,
"y": 0.7,
"z": 1
},
"_mobility": 0,
@@ -1302,7 +1300,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 30,
"y": 40,
"z": 0
},
"_lrot": {
@@ -1342,8 +1340,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 56,
"height": 56
"width": 76,
"height": 76
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1477,7 +1475,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 30,
"y": 40,
"z": 0
},
"_lrot": {
@@ -1517,8 +1515,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 150,
"height": 150
"width": 200,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1798,8 +1796,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 60,
"height": 60
"width": 80,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",