CommonFun

calcDamage / calcBuff explorer

2 formulas listed.

CommonFun.calcBuff_13232 mapped buffs · 16 skills
function CommonFun.calcBuff_132(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local skilllv_1 = srcUser:GetLernedSkillLevel(123)
  local StunAtk = srcUser:GetProperty("StunAtk")
  local StunDef2 = targetUser:GetProperty("StunDef")
  local StunDam = 1 + StunAtk - StunDef2
  if StunDam <= 0 then
    StunDam = 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 = (skilllv_1 * a + b) * StunDam * StateDam * CommonFun.calcAttrDizzyRate(srcUser, targetUser)
  if A <= 0 then
    return 0
  end
  if skilllv_1 <= 0 then
    return 0
  end
  return A
end
CommonFun.calcBuff_13200 mapped uses
function CommonFun.calcBuff_1320(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local skilllv_1 = srcUser:GetLernedSkillLevel(123)
  local StunAtk = srcUser:GetProperty("StunAtk")
  local StunDef2 = targetUser:GetProperty("StunDef")
  local StunDam = 1 + StunAtk - StunDef2
  if StunDam <= 0 then
    StunDam = 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 = (skilllv_1 * a + b) * StunDam * StateDam * CommonFun.calcAttrDizzyTime(srcUser, targetUser)
  if A <= 0 then
    return 0
  end
  if skilllv_1 <= 0 then
    return 0
  end
  return A
end