Commit 014efebbec0096b212ce179239bb72824fc21e52
1 parent
2d2b5643
战斗力公式
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/models/HeroPlugin.lua
@@ -96,10 +96,10 @@ function HeroPlugin.bind(Hero) | @@ -96,10 +96,10 @@ function HeroPlugin.bind(Hero) | ||
96 | local attrs = self:getBaseAttrs() | 96 | local attrs = self:getBaseAttrs() |
97 | return attrs | 97 | return attrs |
98 | end | 98 | end |
99 | - -- 战斗力(当前属性)= POWER[(生命 + 防御 * 7 + 闪避 * 4)*(攻击 + 命中 * 4)*(1 + 暴击几率 * 暴击伤害)* 攻击速度 / 60000 ,0.8 ] | 99 | + -- 战斗力(当前属性)= POWER[(生命 + 防御 * 7 + 闪避 * 4)*(攻击 + 命中 * 4)*(1 + 暴击几率/100 * 暴击伤害/100)* 攻击速度 / 60000 ,0.8 ] |
100 | function Hero:getBattleValue() | 100 | function Hero:getBattleValue() |
101 | local attrs = self:getTotalAttrs() | 101 | local attrs = self:getTotalAttrs() |
102 | - 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 | 102 | + 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 |
103 | return math.floor(battleValue) | 103 | return math.floor(battleValue) |
104 | end | 104 | end |
105 | 105 |