Commit 475a6d03337a70b0cb61299212d8437f9fde5aa4

Authored by zhouhaihai
1 parent 59acc11e

战斗力

Showing 1 changed file with 6 additions and 5 deletions   Show diff stats
src/models/HeroPlugin.lua
... ... @@ -193,11 +193,12 @@ function HeroPlugin.bind(Hero)
193 193 return attrs
194 194 end
195 195  
196   - -- 战斗力(当前属性)= POWER[(生命 + 防御 * 7 + 闪避 * 4)*(攻击 + 命中 * 4)*(1 + 暴击几率/100 * 暴击伤害/100)* 攻击速度 / 60000 ,0.8 ]
197   - function Hero:getBattleValue(activeRelation)
198   - local attrs = self:getTotalAttrs({activeRelation = activeRelation})
199   - 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
200   - return math.floor(battleValue)
  196 +
  197 + -- 战斗力(当前属性)= POWER[(生命 + 防御 * 23 + 闪避 * 4)*(攻击*14 + 命中 * 2)*(1 + 暴击几率/100 * 暴击伤害/100)* 攻击速度 / 60000 ,0.8 ]
  198 + function Hero:getBattleValue(activeRelation) -- isReal包括队伍加成
  199 + local attrs = self:getTotalAttrs({activeRelation = activeRelation})
  200 + local battleValue = ((attrs["hp"] + attrs["def"] * 23 + attrs["miss"] * 4) * (attrs["atk"] * 14 + attrs["hit"] * 2) * (1 + attrs["crit"]/100 * attrs["critHurt"]/100) * attrs["atkSpeed"] / 600000) ^ 0.8
  201 + return math.floor(battleValue)
201 202 end
202 203  
203 204 function Hero:saveBattleValue()
... ...