CommonFun

calcDamage / calcBuff explorer

2 formulas listed.

CommonFun.calcBuff_15096 mapped buffs · 20 skills
function CommonFun.calcBuff_150(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local PoisonAtk = srcUser:GetProperty("PoisonAtk")
  local PoisonDef2 = targetUser:GetProperty("PoisonDef")
  local PoisonDam = 1 + PoisonAtk - PoisonDef2
  if PoisonDam <= 0 then
    PoisonDam = 0
  end
  local StateAtk = srcUser:GetProperty("StateAtk")
  local StateDef2 = targetUser:GetProperty("StateDef")
  local StateDam = 1 + StateAtk - StateDef2
  if StateDam <= 0 then
    StateDam = 0
  end
  local A = (lv * a + b) * PoisonDam * StateDam * CommonFun.calcAttrPoisonRate(srcUser, targetUser)
  if A <= 0 then
    return 0
  end
  return A
end
CommonFun.calcBuff_15000 mapped uses
function CommonFun.calcBuff_1500(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local PoisonAtk = srcUser:GetProperty("PoisonAtk")
  local PoisonDef2 = targetUser:GetProperty("PoisonDef")
  local PoisonDam = 1 + PoisonAtk - PoisonDef2
  if PoisonDam <= 0 then
    PoisonDam = 0
  end
  local StateAtk = srcUser:GetProperty("StateAtk")
  local StateDef2 = targetUser:GetProperty("StateDef")
  local StateDam = 1 + StateAtk - StateDef2
  if StateDam <= 0 then
    StateDam = 0
  end
  local A = (lv * a + b) * PoisonDam * StateDam * CommonFun.calcAttrPoisonTime(srcUser, targetUser)
  if A <= 0 then
    return 0
  end
  return A
end