Formula

CommonFun.calcBuff_7840

function CommonFun.calcBuff_7840(srcUser, targetUser, a, b, c, d, lv)
  if srcUser == nil or targetUser == nil then
    return 0
  end
  local layer = srcUser:GetBuffLayer(187560_THE_ATTACK_DEALS_HP_DAMAGE_TO_ENEMY_:MAX_STACK_3)
  local Maxhp = targetUser:GetProperty("MaxHp")
  local A = layer * Maxhp * 0.001
  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 targetUser.boss and targetUser.zoneType == 22 and CommonFun.CheckStormBossMiss(targetUser, srcUser) then
    A = 0
  end
  return -A
end