feat(map): add three new resistance affixes and their handling
1. 新增CritRes、FreezeRes、KnockbackRes三种词缀类型 2. 配置对应词缀的名称、消耗、最低等级等属性 3. 为怪物组件添加词缀抗性属性的赋值逻辑 4. 将新词条加入优先级列表
This commit is contained in:
@@ -337,6 +337,19 @@ export class MissionMonCompComp extends CCComp {
|
||||
|
||||
// 将词缀记录到属性组件上,供战斗层使用
|
||||
(model as any).affixes = monData.affixes || [];
|
||||
|
||||
// 解析特定的抗性词缀
|
||||
if (monData.affixes) {
|
||||
if (monData.affixes.includes(AffixType.CritRes)) {
|
||||
model.critical_res = 50;
|
||||
}
|
||||
if (monData.affixes.includes(AffixType.FreezeRes)) {
|
||||
model.freeze_res = 50;
|
||||
}
|
||||
if (monData.affixes.includes(AffixType.KnockbackRes)) {
|
||||
model.knockback_res = 50;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** ECS 组件移除时触发(当前不销毁节点) */
|
||||
|
||||
Reference in New Issue
Block a user