diff --git a/src/models/HeroPlugin.lua b/src/models/HeroPlugin.lua index 56e7351..132cef6 100644 --- a/src/models/HeroPlugin.lua +++ b/src/models/HeroPlugin.lua @@ -96,10 +96,10 @@ function HeroPlugin.bind(Hero) local attrs = self:getBaseAttrs() return attrs end - -- 战斗力(当前属性)= POWER[(生命 + 防御 * 7 + 闪避 * 4)*(攻击 + 命中 * 4)*(1 + 暴击几率 * 暴击伤害)* 攻击速度 / 60000 ,0.8 ] + -- 战斗力(当前属性)= POWER[(生命 + 防御 * 7 + 闪避 * 4)*(攻击 + 命中 * 4)*(1 + 暴击几率/100 * 暴击伤害/100)* 攻击速度 / 60000 ,0.8 ] function Hero:getBattleValue() local attrs = self:getTotalAttrs() - local battleValue = ((attrs["hp"] + attrs["def"] * 7 + attrs["miss"] * 4) * (attrs["atk"] + attrs["hit"] * 4) * (1 + attrs["crit"] * attrs["critHurt"]) * attrs["atkSpeed"] / 60000) ^ 0.8 + local battleValue = ((attrs["hp"] + attrs["def"] * 7 + attrs["miss"] * 4) * (attrs["atk"] + attrs["hit"] * 4) * (1 + attrs["crit"]/100 * attrs["critHurt"]/100) * attrs["atkSpeed"] / 60000) ^ 0.8 return math.floor(battleValue) end -- libgit2 0.21.2