CommonFun

calcDamage / calcBuff explorer

80 formulas listed.

CommonFun.calcBuff_8000 mapped uses
function CommonFun.calcBuff_800(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Int = srcUser:GetProperty("Int")
  local A = math.floor(Int / 3)
  if A <= 0 then
    A = 0
  end
  return A
end
CommonFun.calcBuff_80000 mapped uses
function CommonFun.calcBuff_8000(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 10
  local RefineLv1 = srcUser:GetEquipedRefineLv(7)
  if srcUser:HasBuffID(22810) then
    A = A + RefineLv1
  end
  return A
end
CommonFun.calcBuff_801010 mapped buffs · 2 skills
function CommonFun.calcBuff_8010(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 100
  local RefineLv1 = srcUser:GetEquipedRefineLv(7)
  if srcUser:HasBuffID(22810) and 15 <= RefineLv1 then
    A = 0
  end
  return A
end
CommonFun.calcBuff_80110 mapped uses
function CommonFun.calcBuff_8011(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 0
  local RefineLv1 = srcUser:GetEquipedRefineLv(7)
  if srcUser:HasBuffID(22810) and 15 <= RefineLv1 then
    A = 100
  end
  return A
end
CommonFun.calcBuff_80120 mapped uses
function CommonFun.calcBuff_8012(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 1
  local RefineLv1 = srcUser:GetEquipedRefineLv(7)
  if srcUser:HasBuffID(22810) and 15 <= RefineLv1 then
    A = 5
  end
  if srcUser:HasBuffID(90004754) then
    A = A + 1
  end
  return A
end
CommonFun.calcBuff_80200 mapped uses
function CommonFun.calcBuff_8020(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 0
  local RefineLv1 = srcUser:GetEquipedRefineLv(7)
  if 10 <= RefineLv1 then
    A = 100
  end
  return A
end
CommonFun.calcBuff_80210 mapped uses
function CommonFun.calcBuff_8021(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 0
  local RefineLv1 = srcUser:GetEquipedRefineLv(7)
  if 15 <= RefineLv1 then
    A = 100
  end
  return A
end
CommonFun.calcBuff_80220 mapped uses
function CommonFun.calcBuff_8022(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 20
  local RefineLv1 = srcUser:GetEquipedRefineLv(7)
  if srcUser:HasBuffID(22830) then
    A = A + RefineLv1 * 2
  end
  return A
end
CommonFun.calcBuff_80300 mapped uses
function CommonFun.calcBuff_8030(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Dex = srcUser:GetProperty("Dex")
  local A = 0
  if 360 <= Dex then
    A = 0.03
  end
  return A
end
CommonFun.calcBuff_80310 mapped uses
function CommonFun.calcBuff_8031(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 5
  local Str = srcUser:GetProperty("Str")
  if 360 <= Str then
    A = 10
  end
  return A
end
CommonFun.calcBuff_80320 mapped uses
function CommonFun.calcBuff_8032(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local profressionID = srcUser:GetProfressionID()
  local A = 0
  if profressionID == 92 or profressionID == 93 or profressionID == 94 or profressionID == 95 or profressionID == 163 or profressionID == 164 or profressionID == 165 or profressionID == 685 then
    A = 10
  end
  return A
end
CommonFun.calcBuff_80400 mapped uses
function CommonFun.calcBuff_8040(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 0
  local MoveSpdS = srcUser:GetProperty("MoveSpd")
  local MoveSpdT = targetUser:GetProperty("MoveSpd")
  if MoveSpdS < MoveSpdT then
    A = 100
  end
  return A
end
CommonFun.calcBuff_805060 mapped buffs · 2 skills
function CommonFun.calcBuff_8050(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Odds1 = 0
  local Odds2 = 0
  local Hp = targetUser:GetProperty("Hp")
  local MaxHp = targetUser:GetProperty("MaxHp")
  local Num = math.min(targetUser:GetBuffLayer(137000), 5)
  local Fifth = 0
  if srcUser:HasBuffID(90004814) then
    Fifth = Fifth + 0.05
  end
  if targetUser:GetNpcID() == 0 and Hp <= MaxHp * (0.1 + 0.03 * Num + Fifth) then
    Odds1 = 100
  end
  if targetUser:GetNpcID() == 0 and Hp > MaxHp * (0.1 + 0.03 * Num + Fifth) then
    Odds2 = 100
  end
  local KillHp = -MaxHp * (0.1 + 0.03 * Num + Fifth)
  local A = Odds1 * a + Odds2 * b + KillHp * c
  return A
end
CommonFun.calcBuff_80600 mapped uses
function CommonFun.calcBuff_8060(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Str = srcUser:GetProperty("Str")
  local Int = srcUser:GetProperty("Int")
  local Dex = srcUser:GetProperty("Dex")
  local Agi = srcUser:GetProperty("Agi")
  local Vit = srcUser:GetProperty("Vit")
  local Luk = srcUser:GetProperty("Luk")
  local Fullcapacity = math.max(math.min(Str, Int, Dex, Agi, Vit, Luk), 0)
  local A = (math.floor(Fullcapacity / a) * b + d) / 100
  return A
end
CommonFun.calcBuff_80700 mapped uses
function CommonFun.calcBuff_8070(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MaxHp = srcUser:GetProperty("MaxHp")
  local Hp = srcUser:GetProperty("Hp")
  local HpRatio = Hp / MaxHp
  local A = 0
  if a >= HpRatio then
    A = 100
  end
  return A
end
CommonFun.calcBuff_80800 mapped uses
function CommonFun.calcBuff_8080(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Sp = targetUser:GetProperty("Sp")
  local A = -a / 100 * Sp
  return A
end
CommonFun.calcBuff_80900 mapped uses
function CommonFun.calcBuff_8090(srcUser, targetUser, a, b, c, d, lv, damage)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MaxHp = srcUser:GetProperty("MaxHp")
  local mapid, maptype = srcUser:GetMapInfo()
  local A = MaxHp * a
  return A
end
CommonFun.calcBuff_80910 mapped uses
function CommonFun.calcBuff_8091(srcUser, targetUser, a, b, c, d, lv, damage)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MaxHp = targetUser:GetProperty("MaxHp")
  local mapid, maptype = targetUser:GetMapInfo()
  local A = MaxHp * a
  return A
end
CommonFun.calcBuff_80920 mapped uses
function CommonFun.calcBuff_8092(srcUser, targetUser, a, b, c, d, lv, damage)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MaxHp = srcUser:GetProperty("MaxHp")
  local mapid, maptype = srcUser:GetMapInfo()
  local Extra = 0
  if srcUser:HasBuffID(c) then
    Extra = b
  end
  local A = MaxHp * (a + Extra)
  return A
end
CommonFun.calcBuff_81000 mapped uses
function CommonFun.calcBuff_8100(srcUser, targetUser, a, b, c, d, lv, damage)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MaxHp = srcUser:GetProperty("MaxHp")
  local Int = srcUser:GetProperty("Int")
  local mapid, maptype = srcUser:GetMapInfo()
  local A = MaxHp * math.min(math.floor(Int / 20) / 100, 0.3)
  return A
end
CommonFun.calcBuff_811040 mapped buffs · 1 skills
function CommonFun.calcBuff_8110(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 0
  if srcUser:HasBuffID(90003444) then
    A = 100
  end
  return A
end
CommonFun.calcBuff_812056 mapped buffs · 3 skills
function CommonFun.calcBuff_8120(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Luk1 = srcUser:GetProperty("Luk")
  local Luk2 = targetUser:GetProperty("Luk")
  local A = math.max((Luk1 - Luk2) * 0.1, 0) + a
  if a == 30 then
    local GemValue = srcUser:GetGemValue(205121)
    A = A + GemValue / 1000
  end
  if targetUser:GetNpcID() ~= 0 then
    A = 0
  end
  return A
end
CommonFun.calcBuff_81300 mapped uses
function CommonFun.calcBuff_8130(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local RefineLv_1 = srcUser:GetEquipedRefineLv(1)
  local RefineLv_2 = srcUser:GetEquipedRefineLv(2)
  local RefineLv_3 = srcUser:GetEquipedRefineLv(3)
  local RefineLv_4 = srcUser:GetEquipedRefineLv(4)
  local RefineLv_5 = srcUser:GetEquipedRefineLv(5)
  local RefineLv_6 = srcUser:GetEquipedRefineLv(6)
  local RefineLv_7 = srcUser:GetEquipedRefineLv(7)
  local skilllv = srcUser:GetLernedSkillLevel(2658)
  local A = 0
  if 0 < a and b == 0 then
    A = (math.max(RefineLv_5 - 15, 0) + math.max(RefineLv_6 - 15, 0) + math.max(RefineLv_7 - 15, 0)) * skilllv * 0.01
  elseif a == 0 and 0 < b then
    A = (math.max(RefineLv_1 - 15, 0) + math.max(RefineLv_2 - 15, 0) + math.max(RefineLv_3 - 15, 0) + math.max(RefineLv_4 - 15, 0)) * skilllv * 0.01
  end
  return A
end
CommonFun.calcBuff_81400 mapped uses
function CommonFun.calcBuff_8140(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local RefineLv_1 = srcUser:GetEquipedRefineLv(5)
  local RefineLv_2 = srcUser:GetEquipedRefineLv(6)
  local RefineLv_3 = srcUser:GetEquipedRefineLv(7)
  local Refine = srcUser:GetOriginalAttr("Refine")
  local AtkPer = srcUser:GetProperty("AtkPer")
  local A = Refine
  if 17 <= RefineLv_1 and 17 <= RefineLv_2 and 17 <= RefineLv_3 then
    A = Refine * (1 + math.max(AtkPer, 0))
  end
  return A
end
CommonFun.calcBuff_81500 mapped uses
function CommonFun.calcBuff_8150(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local skilllv = srcUser:GetLernedSkillLevel(2659)
  local A = a * (1 + skilllv * 0.1)
  return A
end
CommonFun.calcBuff_81601002 mapped buffs · 34 skills
function CommonFun.calcBuff_8160(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = b
  if srcUser:HasBuffID(a) then
    A = c
  end
  return A
end
CommonFun.calcBuff_81610 mapped uses
function CommonFun.calcBuff_8161(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = b
  local RefineLv = srcUser:GetEquipedRefineLv(7)
  if srcUser:HasBuffID(a) then
    A = A + c * RefineLv
  end
  return A
end
CommonFun.calcBuff_81620 mapped uses
function CommonFun.calcBuff_8162(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = b
  local Num1 = srcUser:GetBuffLayer(a)
  if srcUser:HasBuffID(a) then
    A = A + c * Num1
  end
  return A
end
CommonFun.calcBuff_817010 mapped buffs · 1 skills
function CommonFun.calcBuff_8170(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local skilllv_1 = srcUser:GetLernedSkillLevel(1110)
  local A = 10 * skilllv_1 + 20
  if srcUser:HasBuffID(90004314) then
    A = 100
  end
  return A
end
CommonFun.calcBuff_81800 mapped uses
function CommonFun.calcBuff_8180(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 0
  local ShadowNum = srcUser:GetPetCount("ShadowNpc")
  if srcUser:HasBuffID(90004345) then
    A = ShadowNum * 0.05
  end
  return A
end
CommonFun.calcBuff_81900 mapped uses
function CommonFun.calcBuff_8190(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 10
  local ShadowNum = srcUser:GetPetCount("ShadowNpc")
  if srcUser:HasBuffID(90004354) then
    A = A + ShadowNum * 5
  end
  return A
end
CommonFun.calcBuff_82000 mapped uses
function CommonFun.calcBuff_8200(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local skilllv_1 = srcUser:GetLernedSkillLevel(1231)
  local A = 1 * skilllv_1 + 5
  if srcUser:HasBuffID(90004504) then
    A = A + 2
  end
  return A
end
CommonFun.calcBuff_82100 mapped uses
function CommonFun.calcBuff_8210(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local skilllv_1 = srcUser:GetLernedSkillLevel(2073)
  local A = 0.2 * skilllv_1 + 1
  if srcUser:HasBuffID(90004624) then
    A = A + 0.5
  end
  return A
end
CommonFun.calcBuff_82200 mapped uses
function CommonFun.calcBuff_8220(srcUser, targetUser, a, b, c, d, lv, damage)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local skilllv_1 = srcUser:GetLernedSkillLevel(2678)
  local skilllv_2 = srcUser:GetLernedSkillLevel(2682)
  local A = damage * skilllv_1 * 0.01 * a + damage * skilllv_1 * 0.01 * skilllv_2 * 0.1 * b
  return A
end
CommonFun.calcBuff_823040 mapped buffs · 1 skills
function CommonFun.calcBuff_8230(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 0
  if (srcUser:HasBuffID(57260) or srcUser:HasBuffID(57270)) and a == 1 then
    A = 100
  elseif (srcUser:HasBuffID(57260) or srcUser:HasBuffID(57270)) and b == 1 then
    A = -0.1
  elseif srcUser:HasBuffID(57270) and c == 1 then
    A = -0.1
  end
  return A
end
CommonFun.calcBuff_82400 mapped uses
function CommonFun.calcBuff_8240(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local skilllv_1 = srcUser:GetLernedSkillLevel(3312)
  local A = 1 * skilllv_1 + 5
  if srcUser:HasBuffID(90004584) then
    A = A + 15
  end
  return A
end
CommonFun.calcBuff_82504 mapped buffs · 2 skills
function CommonFun.calcBuff_8250(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local skilllv = srcUser:GetLernedSkillLevel(2701)
  local Value = srcUser:GetGemValue(207121)
  local A = skilllv * 2 + 1 + Value / 1000
  if 7 <= skilllv and srcUser:HasBuffID(137593) then
    A = A + 10
  end
  return A
end
CommonFun.calcBuff_82600 mapped uses
function CommonFun.calcBuff_8260(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil then
    return 0
  end
  local equip = srcUser:getCurOperEquip()
  if equip.id ~= 44051 and equip.id ~= 144051 then
    return 0
  end
  local result = 0
  if equip.refinelv >= 10 and equip.refinelv < 15 then
    result = equip.refinelv / 100
  elseif equip.refinelv >= 15 then
    result = equip.refinelv / 100 + 0.05
  end
  return result
end
CommonFun.calcBuff_82610 mapped uses
function CommonFun.calcBuff_8261(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5)
  local order1 = srcUser:getEquipLv(5)
  local a = 0
  if (Ring1 == 44047 or Ring1 == 144047) and 5 <= RefineLv1 and RefineLv1 < 10 then
    a = 100
  elseif (Ring1 == 44047 or Ring1 == 144047) and 10 <= RefineLv1 and RefineLv1 < 15 then
    a = 200
  elseif (Ring1 == 44047 or Ring1 == 144047) and 15 <= RefineLv1 then
    a = 400
  else
    a = 0
  end
  local A = a
  return A
end
CommonFun.calcBuff_82620 mapped uses
function CommonFun.calcBuff_8262(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5)
  local order1 = srcUser:getEquipLv(5)
  local a = 0
  if (Ring1 == 44048 or Ring1 == 144048) and 5 <= RefineLv1 and RefineLv1 < 10 then
    a = -0.05
  elseif (Ring1 == 44048 or Ring1 == 144048) and 10 <= RefineLv1 and RefineLv1 < 15 then
    a = -0.1
  elseif (Ring1 == 44048 or Ring1 == 144048) and 15 <= RefineLv1 then
    a = -0.3
  else
    a = 0
  end
  local A = a
  return A
end
CommonFun.calcBuff_82630 mapped uses
function CommonFun.calcBuff_8263(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5)
  local order1 = srcUser:getEquipLv(5)
  local a = 0
  if (Ring1 == 44054 or Ring1 == 144054) and 8 <= RefineLv1 and RefineLv1 < 12 then
    a = 0.03
  elseif (Ring1 == 44054 or Ring1 == 144054) and 12 <= RefineLv1 and RefineLv1 < 15 then
    a = 0.09
  elseif (Ring1 == 44054 or Ring1 == 144054) and 15 <= RefineLv1 then
    a = 0.15
  else
    a = 0
  end
  local A = a
  return A
end
CommonFun.calcBuff_82700 mapped uses
function CommonFun.calcBuff_8270(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5)
  local order1 = srcUser:getEquipLv(5)
  local A = 0
  if (Ring1 == a or Ring1 == b) and 12 <= RefineLv1 then
    A = d
  end
  return A
end
CommonFun.calcBuff_82710 mapped uses
function CommonFun.calcBuff_8271(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5)
  local order1 = srcUser:getEquipLv(5)
  local A = 0
  if (Ring1 == a or Ring1 == b) and 15 <= RefineLv1 then
    A = d
  end
  return A
end
CommonFun.calcBuff_82720 mapped uses
function CommonFun.calcBuff_8272(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5)
  local order1 = srcUser:getEquipLv(5)
  local A = 0
  if (Ring1 == a or Ring1 == b) and 10 <= RefineLv1 then
    A = d
  end
  return A
end
CommonFun.calcBuff_82730 mapped uses
function CommonFun.calcBuff_8273(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5)
  local order1 = srcUser:getEquipLv(5)
  local A = 0
  if (Ring1 == a or Ring1 == b) and 8 <= RefineLv1 then
    A = d
  end
  return A
end
CommonFun.calcBuff_82740 mapped uses
function CommonFun.calcBuff_8274(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5)
  local order1 = srcUser:getEquipLv(5)
  local A = 0
  if (Ring1 == a or Ring1 == b) and 5 <= RefineLv1 then
    A = d
  end
  return A
end
CommonFun.calcBuff_82800 mapped uses
function CommonFun.calcBuff_8280(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5)
  local order1 = srcUser:getEquipLv(5)
  local A = 0
  if (Ring1 == a or Ring1 == b) and 0 <= RefineLv1 and RefineLv1 < 12 then
    A = 0
  elseif (Ring1 == a or Ring1 == b) and 12 <= RefineLv1 and RefineLv1 < 15 then
    A = c
  elseif (Ring1 == a or Ring1 == b) and 15 <= RefineLv1 then
    A = c + d
  end
  return A
end
CommonFun.calcBuff_82810 mapped uses
function CommonFun.calcBuff_8281(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5)
  local order1 = srcUser:getEquipLv(5)
  local A = 0
  if (Ring1 == a or Ring1 == b) and 0 <= RefineLv1 and RefineLv1 < 10 then
    A = 0
  elseif (Ring1 == a or Ring1 == b) and 10 <= RefineLv1 and RefineLv1 < 15 then
    A = c
  elseif (Ring1 == a or Ring1 == b) and 15 <= RefineLv1 then
    A = c + d
  end
  return A
end
CommonFun.calcBuff_82820 mapped uses
function CommonFun.calcBuff_8282(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5)
  local order1 = srcUser:getEquipLv(5)
  local A = 0
  if (Ring1 == a or Ring1 == b) and 0 <= RefineLv1 and RefineLv1 < 5 then
    A = 0
  elseif (Ring1 == a or Ring1 == b) and 5 <= RefineLv1 and RefineLv1 < 15 then
    A = c
  elseif (Ring1 == a or Ring1 == b) and 15 <= RefineLv1 then
    A = c + d
  end
  return A
end
CommonFun.calcBuff_82830 mapped uses
function CommonFun.calcBuff_8283(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5)
  local order1 = srcUser:getEquipLv(5)
  local A = 0
  if (Ring1 == a or Ring1 == b) and 0 <= RefineLv1 and RefineLv1 < 8 then
    A = 0
  elseif (Ring1 == a or Ring1 == b) and 8 <= RefineLv1 and RefineLv1 < 12 then
    A = c
  elseif (Ring1 == a or Ring1 == b) and 12 <= RefineLv1 then
    A = c + d
  end
  return A
end
CommonFun.calcBuff_83000 mapped uses
function CommonFun.calcBuff_8300(srcUser, targetUser, a, b, c, d, lv, damage, param)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local equip = srcUser:getCurOperEquip()
  if equip.id ~= a and equip.id ~= b then
    return 0
  end
  local A = 0
  if 0 <= equip.refinelv and equip.refinelv < 8 then
    A = c
  elseif equip.refinelv >= 8 and equip.refinelv < 12 then
    A = c + d
  elseif equip.refinelv >= 12 and equip.refinelv < 15 then
    A = c + d + param.e
  elseif equip.refinelv >= 15 then
    A = c + d + param.e + param.f
  end
  return A
end
CommonFun.calcBuff_83100 mapped uses
function CommonFun.calcBuff_8310(srcUser, targetUser, a, b, c, d, lv, damage, param)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local equip = srcUser:getCurOperEquip()
  if equip.id ~= a and equip.id ~= b then
    return 0
  end
  local A = 0
  if 0 <= equip.refinelv and equip.refinelv < 5 then
    A = c
  elseif equip.refinelv >= 5 and equip.refinelv < 10 then
    A = c + d
  elseif equip.refinelv >= 10 and equip.refinelv < 15 then
    A = c + d + param.e
  elseif equip.refinelv >= 15 then
    A = c + d + param.e + param.f
  end
  return A
end
CommonFun.calcBuff_83200 mapped uses
function CommonFun.calcBuff_8320(srcUser, targetUser, a, b, c, d, lv, damage, param)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Ring1 = srcUser:GetEquipedID(5)
  local RefineLv1 = srcUser:GetEquipedRefineLv(5)
  if Ring1 ~= a and Ring1 ~= b then
    return 0
  end
  local A = c
  if d < RefineLv1 then
    A = (RefineLv1 - d) * param.e + A
  end
  return A
end
CommonFun.calcBuff_83300 mapped uses
function CommonFun.calcBuff_8330(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Sp = targetUser:GetProperty("Sp")
  local A = -0.25 * Sp
  return A
end
CommonFun.calcBuff_83400 mapped uses
function CommonFun.calcBuff_8340(srcUser, targetUser, a, b, c, d, lv, damage)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MaxHp = srcUser:GetProperty("MaxHp")
  local mapid, maptype = srcUser:GetMapInfo()
  local A = math.min(math.floor(MaxHp / 5000) * 0.1 / 100, 0.15)
  return A
end
CommonFun.calcBuff_83410 mapped uses
function CommonFun.calcBuff_8341(srcUser, targetUser, a, b, c, d, lv, damage)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MaxHp = srcUser:GetProperty("MaxHp")
  local mapid, maptype = srcUser:GetMapInfo()
  local A = 0
  if 750000 <= MaxHp then
    A = math.min(math.floor((MaxHp - 750000) / 5000) * 0.1 / 100, 0.15)
  end
  return A
end
CommonFun.calcBuff_83500 mapped uses
function CommonFun.calcBuff_8350(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 0
  local RefineLv = srcUser:GetEquipedRefineLv(8)
  if 6 <= RefineLv and RefineLv < 8 then
    A = a
  elseif 8 <= RefineLv and RefineLv < 10 then
    A = a + b
  elseif 10 <= RefineLv and RefineLv < 12 then
    A = a + b + c
  elseif 12 <= RefineLv then
    A = a + b + c + d
  end
  return A
end
CommonFun.calcBuff_83600 mapped uses
function CommonFun.calcBuff_8360(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Numabnormal = targetUser:GetStatusNum()
  local A = Numabnormal * 15
  return A
end
CommonFun.calcBuff_83700 mapped uses
function CommonFun.calcBuff_8370(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local skilllv_1 = srcUser:GetLernedSkillLevel(2715)
  local A = 2 * skilllv_1 + 5
  if srcUser:HasBuffID(90004974) then
    A = A + 5
  end
  return A
end
CommonFun.calcBuff_83800 mapped uses
function CommonFun.calcBuff_8380(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MaxHp = srcUser:GetProperty("MaxHp")
  local Num1 = srcUser:GetBuffLayer(137710)
  local A = MaxHp * 0.1 * Num1
  return A
end
CommonFun.calcBuff_83810 mapped uses
function CommonFun.calcBuff_8381(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Hp = srcUser:GetProperty("Hp")
  local A = -(Hp - 1)
  return A
end
CommonFun.calcBuff_83820 mapped uses
function CommonFun.calcBuff_8382(srcUser, targetUser, a, b, c, d, lv, damage)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = 0
  if a ~= 0 then
    A = damage
  elseif b ~= 0 then
    local skilllv_1 = srcUser:GetLernedSkillLevel(2742)
    A = damage / 4 * skilllv_1 * 0.1
  elseif c ~= 0 then
    local skilllv_2 = srcUser:GetLernedSkillLevel(2735)
    A = -damage * skilllv_2 * 0.05
  end
  if c ~= 0 then
    if targetUser:GetNpcID() == 30043 or targetUser:GetNpcID() == 280303 or targetUser:GetNpcID() == 56008 or targetUser:GetNpcID() == 56009 or targetUser:GetNpcID() == 56010 or targetUser:GetNpcID() == 56011 or targetUser:GetNpcID() == 56012 or targetUser:GetNpcID() == 56013 then
      A = -1
    end
    if targetUser:DamageAlways1() then
      A = -1
    end
  end
  return A
end
CommonFun.calcBuff_83830 mapped uses
function CommonFun.calcBuff_8383(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MaxHp = targetUser:GetProperty("MaxHp")
  local GemValue = srcUser:GetGemValue(208101)
  local A = -GemValue / 100000 * MaxHp
  local B = -GemValue / 100000
  A = CommonFun.calcBuff_6(srcUser, targetUser, B, 0, c, d, lv)
  return A
end
CommonFun.calcBuff_83900 mapped uses
function CommonFun.calcBuff_8390(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local fushou = srcUser:GetEquipTypeByPos(1)
  local wuqi = srcUser:GetEquipTypeByPos(7)
  local skilllv = srcUser:GetLernedSkillLevel(2744)
  local LongNum = 0
  local ShortNum = 0
  if fushou == 180 and wuqi == 180 then
    LongNum = 2
  elseif fushou == 180 or wuqi == 180 then
    LongNum = 1
  end
  if fushou == 250 and wuqi == 250 then
    ShortNum = 2
  elseif fushou == 250 or wuqi == 250 then
    ShortNum = 1
  end
  local A = LongNum * (a * skilllv + c) + ShortNum * (b * skilllv + d)
  return A
end
CommonFun.calcBuff_84000 mapped uses
function CommonFun.calcBuff_8400(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local A = srcUser:GetSuperpositionSkillNum()
  return A
end
CommonFun.calcBuff_84100 mapped uses
function CommonFun.calcBuff_8410(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MoveSpd = srcUser:GetProperty("MoveSpd")
  local num = CommonFun.AccurateFloor((math.max(MoveSpd, 1) - 1) / 0.05)
  local A = math.min(num * 0.01, 0.1)
  return A
end
CommonFun.calcBuff_84110 mapped uses
function CommonFun.calcBuff_8411(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MoveSpd = srcUser:GetProperty("MoveSpd")
  local num = CommonFun.AccurateFloor((math.max(MoveSpd, 2.8) - 2.8) / 0.05)
  local A = math.min(num * 0.01, 0.1)
  return A
end
CommonFun.calcBuff_84120 mapped uses
function CommonFun.calcBuff_8412(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MoveSpd = srcUser:GetProperty("MoveSpd")
  local num = CommonFun.AccurateFloor((math.max(MoveSpd, 1) - 1) / 0.1)
  local A = math.min(num * 0.01, 0.15)
  return A
end
CommonFun.calcBuff_84200 mapped uses
function CommonFun.calcBuff_8420(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local RefineLv = srcUser:GetEquipedRefineLv(7)
  local A = c
  if b < RefineLv then
    A = a + A
  end
  return A
end
CommonFun.calcBuff_84300 mapped uses
function CommonFun.calcBuff_8430(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local skilllv = srcUser:GetLernedSkillLevel(2082)
  local CopyNum = srcUser:GetPetCount("CopyNpc")
  local A = CopyNum * skilllv * 0.04
  return A
end
CommonFun.calcBuff_84400 mapped uses
function CommonFun.calcBuff_8440(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MaxHp = targetUser:GetProperty("MaxHp")
  local MaxSp = targetUser:GetProperty("MaxSp")
  local skilllv_1 = srcUser:GetLernedSkillLevel(3407)
  local skilllv_2 = srcUser:GetLernedSkillLevel(3507)
  local skilllv = math.max(skilllv_1, skilllv_2)
  local A = MaxHp * skilllv * a + MaxSp * skilllv * b
  return A
end
CommonFun.calcBuff_84500 mapped uses
function CommonFun.calcBuff_8450(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MaxHp = targetUser:GetProperty("MaxHp")
  local num = targetUser:GetBuffLayer(177800)
  local A = MaxHp * num * 0.1
  return -A
end
CommonFun.calcBuff_84600 mapped uses
function CommonFun.calcBuff_8460(srcUser, targetUser, a, b, c, d, lv, damage)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local MaxHp = srcUser:GetProperty("MaxHp")
  local A = MaxHp * damage * a
  return A
end
CommonFun.calcBuff_84700 mapped uses
function CommonFun.calcBuff_8470(srcUser, targetUser, a, b, c, d, lv, damage)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local skilllv = srcUser:GetLernedSkillLevel(4214)
  local Luk = srcUser:GetProperty("Luk")
  local Dex = srcUser:GetProperty("Dex")
  local Vit2 = targetUser:GetProperty("Vit")
  local Rate2 = Vit2 / 8
  local Rate = math.min(skilllv * 3 + (Luk + Dex) / 16, 90) - math.min(Rate2, 50)
  if CommonFun.IsInRate(Rate, srcUser:GetRandom()) then
    local optionalPos = {
      CommonFun.EquipPos.EEQUIPPOS_SHIELD,
      CommonFun.EquipPos.EEQUIPPOS_ARMOUR,
      CommonFun.EquipPos.EEQUIPPOS_ROBE,
      CommonFun.EquipPos.EEQUIPPOS_SHOES,
      CommonFun.EquipPos.EEQUIPPOS_ACCESSORY1,
      CommonFun.EquipPos.EEQUIPPOS_ACCESSORY2
    }
    local validPos = {}
    for i = 1, #optionalPos do
      local pos = optionalPos[i]
      local equip = targetUser:getEquip(CommonFun.PackType.EPACKTYPE_SHADOWEQUIP, pos)
      if targetUser:IsShadowEquipForceOff(pos) == false and equip.id ~= 0 then
        table.insert(validPos, pos)
      end
    end
    local randomPos = 0
    if 0 < #validPos then
      local randomIndex = math.random(1, #validPos)
      randomPos = validPos[randomIndex]
    end
    return randomPos
  end
  return 0
end
CommonFun.calcBuff_84800 mapped uses
function CommonFun.calcBuff_8480(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local SecretLandGemLv = srcUser:GetSecretLandGemLv(a)
  local A = 0
  A = SecretLandGemLv * b + math.max(SecretLandGemLv - 30, 0) * c + math.max(SecretLandGemLv - 60, 0) * d
  return A
end
CommonFun.calcBuff_84810 mapped uses
function CommonFun.calcBuff_8481(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local SecretLandGemLv = srcUser:GetMasterSecretLandGemLv(a)
  local A = 0
  A = SecretLandGemLv * b + math.max(SecretLandGemLv - 30, 0) * c + math.max(SecretLandGemLv - 60, 0) * d
  return A
end
CommonFun.calcBuff_84900 mapped uses
function CommonFun.calcBuff_8490(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local SecretLandGemLv = srcUser:GetSecretLandGemLv(a)
  local A = 0
  A = SecretLandGemLv * 100 + math.max(SecretLandGemLv - 30, 0) * 100 + math.max(SecretLandGemLv - 50, 0) * 100
  A = A + math.max(SecretLandGemLv - 60, 0) * 100 + math.max(SecretLandGemLv - 70, 0) * 200
  A = A + math.max(SecretLandGemLv - 80, 0) * 200 + math.max(SecretLandGemLv - 90, 0) * 400
  return A
end
CommonFun.calcBuff_85000 mapped uses
function CommonFun.calcBuff_8500(srcUser, targetUser, a, b, c, d, lv, damage)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  if damage <= 1 then
    return 1
  end
  local SecretLandGemLv = srcUser:GetSecretLandGemLv(a)
  local A = damage * (SecretLandGemLv * b + math.max(SecretLandGemLv - 30, 0) * c + math.max(SecretLandGemLv - 60, 0) * d)
  local MaxHpM = srcUser:GetProperty("MaxHp")
  A = math.min(MaxHpM, A)
  return A
end
CommonFun.calcBuff_85100 mapped uses
function CommonFun.calcBuff_8510(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local Numabnormal = targetUser:GetStatusNum()
  local A = a
  if c < Numabnormal then
    A = A + b
  end
  return A
end