CommonFun

calcDamage / calcBuff explorer

1 formulas listed.

CommonFun.calcBuff_527020 mapped buffs · 1 skills
function CommonFun.calcBuff_5270(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local buff = 0
  local Hp1 = srcUser:GetProperty("Hp")
  local Hp2 = targetUser:GetProperty("Hp")
  if srcUser:HasBuffID(20720090) and Hp2 < Hp1 * 0.05 then
    buff = 1
  end
  local A = a * buff + b * Hp2
  local AttrFunction = srcUser:GetProperty("AttrFunction")
  local bitfunc = CommonFun.getBits(AttrFunction)
  if (targetUser.boss or targetUser.mini or targetUser.changelinepunish) and (targetUser.zoneType == 1 or targetUser.zoneType == 22) and targetUser.noPunishBoss == false and bitfunc[CommonFun.AttrFunction.JustInViceZone] == 1 and targetUser.isBossFromBranch == false then
    A = 0
  end
  if CommonFun.checkAttrFunctionMiss(targetUser, srcUser) then
    A = 0
  end
  if targetUser.boss and targetUser.zoneType == 22 and CommonFun.CheckStormBossMiss(targetUser, srcUser) then
    A = 0
  end
  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 = 0
  end
  if targetUser:DamageAlways1() then
    A = 0
  end
  return A
end