CommonFun.CalcElementParam2
function CommonFun.CalcElementParam2(srcUser, targetUser, params, damageParam, logger)
  local elementInc = 0
  local elementRed = 0
  local srcAtkElement = CommonFun.GetUserAtkAttr(srcUser, params, damageParam)
  local targetDefElement = targetUser:GetProperty("DefAttr")
  if srcUser:HasBuffID(20510031_REGARD_THE_ENEMY_AS_DARK_ELEMENT_:MAX_STACK_0) then
    targetDefElement = 7
  end
  if nil == srcAtkElement then
    logger.error(string.format("%s srcAtkElement is nil", srcUser.name))
    return 0
  end
  if nil == targetDefElement then
    logger.error(string.format("%s targetDefElement is nil", targetUser.name))
    return 0
  end
  if nil == CommonFun.NatureProps[targetDefElement] then
    logger.error(string.format("%s CommonFun.NatureProps[%s] is nil", srcUser.name, tostring(targetDefElement)))
    return 0
  end
  if nil == CommonFun.NatureProps[srcAtkElement] then
    logger.error(string.format("CommonFun.NatureProps[%s] is nil", tostring(srcAtkElement)))
    return 0
  end
  elementInc = srcUser:GetProperty(CommonFun.NatureProps[targetDefElement][1])
  elementRed = targetUser:GetProperty(CommonFun.NatureProps[srcAtkElement][2])
  elementAtk = srcUser:GetProperty(CommonFun.NatureProps[srcAtkElement][3])
  if nil == elementAtk then
    elementAtk = 0
  end
  local skilllv = srcUser:GetLernedSkillLevel(306_LORD_KNIGHT:ASURA_STRIKE)
  local skillID, skillLevel = CommonFun.UnmergeSkillID(params.skillIDAndLevel)
  if 5 < skilllv and skillID == 306_LORD_KNIGHT:ASURA_STRIKE or skillID == 3303_LIGHTBRINGER:SKY_BREAKING_DRAGON_FIST or skillID == 819_HIGH_WIZARD:SKY_BREAKING_DRAGON_FIST then
    elementRed = math.max(elementRed - 0.06 * (skilllv - 5), 0)
  end
  if skillID == 1288_ASSASSIN:ARM_CANNON or skillID == 1812_HUNTER:FLAME_DRAGON_BLAST or skillID == 4310_CHRONOMANCER:PHOTON_CANNON then
    local GemValue = srcUser:GetGemValue(61002_ARM_CANNON_FLAME_DRAGON_BLAST_AND_PHOTON_CANNON_IGNORE_PERCENTAGE_OF_THE_ENEMY_S_CORRESPONDING_ATTRIBUTE_DMG_REDUC)
    elementRed = math.max(elementRed - GemValue / 100000, 0)
  end
  local result = 1 + elementAtk - elementRed
  local mapid, maptype = srcUser:GetMapInfo()
  if (maptype == PVP_MAPS) and targetUser:GetNpcID() ~= 40022_EMPERIUM then
    local pvpReduce = 0
    local Master = targetUser:GetMasterUser()
    if targetUser:GetNpcID() == 0 or Master ~= nil then
      pvpReduce = 0.2
    end
    local B = elementRed - elementAtk
    B = B < -1 and -1 or 1 < B and 1 or B
    B = math.floor(B * 1000) / 1000
    B = B + 0.3 * (1 - math.sin(B * 3.14 / 2)) + pvpReduce
    result = 1 - B
  end
  if result <= 0.1 then
    result = 0.1
  end
  return result
end