mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
我也不知道在做什么 反正做的东西不少....
This commit is contained in:
@@ -31,6 +31,20 @@ export default class GPetAttribute extends GAttributeBase{
|
||||
this.attributes[attr.id] = baseAttribute[attr.sign] || 0;
|
||||
});
|
||||
|
||||
//计算升级成长属性
|
||||
let level = this.pet.petLevel; //宠物等级
|
||||
let grow = TD.TbGRoleUpGrow.get(this.pet.petId) || TD.TbGRoleUpGrow.get(0); //成长
|
||||
|
||||
TD.TbGAttribute.getDataList().forEach(attr => {
|
||||
|
||||
//过滤没有的属性
|
||||
if(!baseAttribute[attr.sign] || !grow[attr.sign]) return;
|
||||
|
||||
//计算 累加 ((base * value) * level)
|
||||
this.attributes[attr.id] += (baseAttribute[attr.sign] * grow[attr.sign]) * level;
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
//刷新属性
|
||||
|
Reference in New Issue
Block a user