feat(英雄属性): 增加全局属性加成计算
在英雄属性计算中集成全局属性加成,通过 SingletonModuleComp 中的 global_attrs 配置为特定属性提供基础值和数量加成。
This commit is contained in:
@@ -369,6 +369,12 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
totalRatio += buff.value;
|
||||
}
|
||||
}
|
||||
|
||||
// 全局属性加成
|
||||
if (smc.global_attrs[attrIndex]) {
|
||||
const [val, count] = smc.global_attrs[attrIndex];
|
||||
totalRatio += val * count;
|
||||
}
|
||||
|
||||
// 4. 根据属性类型计算最终值
|
||||
const attrType = AttrsType[attrIndex];
|
||||
|
||||
Reference in New Issue
Block a user