yyl
2025-12-03 bf9d063af5655f93db17578cfe52d8abbb60c596
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
using System;
using System.Collections.Generic;
 
public static class BattleConst
{
    #region 战斗窗口配置
    
    public static List<Type> BattleWindows = new List<Type>()
    {
        typeof(BattleWin),
        typeof(StoryBossBattleWin),
        typeof(ArenaBattleWin),
        typeof(BoneFieldBattleWin),
        typeof(TianziBillboradBattleWin),
    };
 
    // 战场名称
    public const string StoryBattleField = "StoryBattleField";
    public const string StoryBossBattleField = "StoryBossBattleField";
    public const string ArenaBattleField = "ArenaBattleField";
    public const string BoneBattleField = "BoneBattleField";
    public const string TianziBillboradBattleField = "TianziBillboradBattleField";
 
    public static Dictionary<string, string> battleNameToWinName = new Dictionary<string, string>()
    {
        { StoryBattleField, "BattleWin" },
        { StoryBossBattleField, "StoryBossBattleWin" },
        { ArenaBattleField, "ArenaBattleWin" },
        { BoneBattleField, "BoneFieldBattleWin" },
        { TianziBillboradBattleField, "TianziBillboradBattleWin" },
    };
 
    public static Dictionary<string, int> FieldNameToIndex = new Dictionary<string, int>()
    {
        { StoryBossBattleField, 1 },
        { ArenaBattleField, 2 },
        { BoneBattleField, 3},
        { TianziBillboradBattleField, 4 },
    };
 
    //和 CreateBattleField 里的对应
    public static Dictionary<int, string> mapIDToBattleNameDic = new Dictionary<int, string>()
    {
        {1, StoryBattleField},
        {2, StoryBossBattleField},
        {3, ArenaBattleField},
        {30010, BoneBattleField},
        {30020, TianziBillboradBattleField},
    };
 
 
    
    #endregion
 
    #region 战斗基础配置
    
    public const int BattleStartEffectID = 1001; // Example effect ID for battle start
 
    public const int skillMotionFps = 30;
 
    public const int BattlePointItemID = 3;//战锤ID
    
    #endregion
 
    #region 战斗统计类型
    
    public const int BattleTotalDamageType = 100001; // 总伤害类型ID
 
    public const int BattleTotalRecoverType = 100002; // 总治疗类型ID
 
    public const int BattleComboAttack = 100003; // 连击
 
    public const int BattleCounterAttack = 100004; // 反击
 
    public const int BattleChaseAttack = 100005; // 追击
 
    public const int BattleStun = 100006; // 击晕
    
    #endregion
 
    #region 战斗层级排序
    
    //  1000~10000之间的战斗层级
    //  需要考虑根据UI 特效 战斗角色三方的层级关系
    //  确立基本的层级范围 后往上累加
    //  1.不能在BattleWin之下 否则就看不见了
    //  2.处理EffectPenetrationBlocker的自动调整排序
    //  3.要联动EffectConfig的前后的问题
    //  BattleWin.Canvas.sortingOrder是最低值
    //  还需要确立黑色的Mask的层级
 
 
    //  UI界面|非激活英雄|挡板|激活英雄
 
    // 非激活英雄后特效|非激活英雄|非激活英雄前
 
    // 激活英雄后特效|激活英雄|激活英雄前特效
 
    //  ---------------------2025、10.23更新
    //  现在期望 蒙版不要压住UI 更改策略
    //  释放技能英雄>受影响英雄>正常UI>黑色蒙版>未受影响英雄>底图
 
 
 
    //释放技能英雄>受影响英雄>[正常UI]>黑色蒙版>未受影响英雄>底图
    public static int BattleWinSortingOrder
    {
        get
        {
            List<int> activeWinOrders = new List<int>();
 
            for (int i = 0; i < BattleWindows.Count; i++)
            {
                var win = UIManager.Instance.GetUI(BattleWindows[i].Name);
                if (win != null && win.IsActive())
                {
                    activeWinOrders.Add(win.GetSortingOrder());
                }
            }
 
            if (activeWinOrders.Count == 0)
            {
                return 0;
            }
 
            int maxOrder = activeWinOrders[0];
            for (int i = 1; i < activeWinOrders.Count; i++)
            {
                if (activeWinOrders[i] > maxOrder)
                {
                    maxOrder = activeWinOrders[i];
                }
            }
 
            return maxOrder;
        }
    }
 
    //  释放技能英雄>受影响英雄>正常UI>黑色蒙版>未受影响英雄>[底图]
    public static int BattleBackgroundOrder
    {
        get
        {
            return BattleWinSortingOrder - 10;
        }
    }
 
    // 非激活英雄的后特效
    public static int UnactiveHeroBackSortingOrder
    {
        get
        {
            return BattleBackgroundOrder + 1;
        }
    }
 
 
    //释放技能英雄>受影响英雄>正常UI>黑色蒙版>[未受影响英雄]>底图
    // 非激活英雄的层级
    public static int UnactiveHeroSortingOrder
    {
        get
        {
            return UnactiveHeroBackSortingOrder + 1;
        }
    }
 
    // 非激活英雄的前特效
    public static int UnactiveHeroFrontSortingOrder
    {
        get
        {
            return UnactiveHeroSortingOrder + 1;
        }
    }
 
    //释放技能英雄>受影响英雄>正常UI>[黑色蒙版]>未受影响英雄>底图
    // 黑色蒙版的层级
    public static int BlockerSortingOrder
    {
        get
        {
            return UnactiveHeroFrontSortingOrder + 1;
        }
    }
 
    // 激活英雄的后特效
    public static int ActiveHeroBackSortingOrder
    {
        get
        {
            return BlockerSortingOrder + 1;
        }
    }
 
    //释放技能英雄>[受影响英雄]>正常UI>黑色蒙版>未受影响英雄>底图
    // 激活英雄的层级
    public static int ActiveHeroSortingOrder
    {
        get
        {
            return ActiveHeroBackSortingOrder + 1;
        }
    }
 
    //[释放技能英雄]>受影响英雄>正常UI>黑色蒙版>未受影响英雄>底图
    //  释放技能钟的英雄层级
    public static int ActiveHeroActionSortingOrder
    {
        get
        {
            return ActiveHeroSortingOrder + 1;
        }
    }
 
    // 激活英雄的前特效
    public static int ActiveHeroFrontSortingOrder
    {
        get
        {
            return ActiveHeroActionSortingOrder + 1;
        }
    }
    
    #endregion
 
    #region Buff限制组
    
    public const int HardControlGroup = 1;
 
    public const int SoftControlGroup = 2;
 
    public const int NormalAttackLimitGroup = 3;
 
    public const int RageAttackLimitGroup = 4;
 
    public const int PassiveSkillLimitGroup = 5;
 
    public static readonly int[] BuffLimitGroups = new int[]
    {
        HardControlGroup,
        SoftControlGroup,
        NormalAttackLimitGroup,
        RageAttackLimitGroup,
        PassiveSkillLimitGroup,
    };
 
    public const int ShieldBuffAttackType = 1003;//护盾吸收伤害类型ID
    
    #endregion
 
    #region 特效ID
    
    public const int BlockEffectID = 19999; // 格挡特效ID
 
    public const int RebornEffectID = 20000;    // 复活特效ID
    
    #endregion
 
    #region 音效ID
 
    public const int DodgeSoundID = 5999999; // 闪避音效ID
    
    #endregion
}