Varetyr Spear
Lvl: 3 Attack Magic Range: 6

Summons a Giant Lighting Lance that falls from the heavens,inflicting two lots of damage: Wind Physical Damage and M.Dmg equivalent to M.Atk *710%. All opponents that receive damage have a 20% chance of being stunned for 2 sec

Lvl: 2 Attack Magic Range: 6
• Summons a Giant Lighting Lance that falls from the heavens,inflicting two lots of damage: Wind Physical Damage and M.Dmg equivalent to M.Atk *560%. All opponents that receive damage have a 17% chance of being stunned for 2 sec
Lvl: 1 Attack Magic Range: 6
• Summons a Giant Lighting Lance that falls from the heavens,inflicting two lots of damage: Wind Physical Damage and M.Dmg equivalent to M.Atk *360%. All opponents that receive damage have a 13% chance of being stunned for 2 sec

Formula

function CommonFun.calcDamage_8203(srcUser, targetUser, params, damageParam, logger)
  local Int = srcUser:GetProperty("Int")
  local Vit = srcUser:GetProperty("Vit")
  local MAtk = srcUser:GetProperty("MAtk")
  local MAtkPer = srcUser:GetProperty("MAtkPer")
  local MDamIncrease = CommonFun.calcMDamIncrease(srcUser, targetUser)
  local IgnoreMDef = srcUser:GetProperty("IgnoreMDef")
  if 1 <= IgnoreMDef then
    IgnoreMDef = 1
  end
  local MRefine = srcUser:GetProperty("MRefine")
  local RangeDam = srcUser:GetProperty("RangeDam")
  local srcAtkElement = CommonFun.GetUserAtkAttr(srcUser, targetUser, params, damageParam)
  local targetDefElement = targetUser:GetProperty("DefAttr")
  local elementparam2 = CommonFun.CalcElementParam2(srcUser, targetUser, params, damageParam, logger)
  local raceparam = CommonFun.CalcRaceParam(srcUser, targetUser, params, damageParam, logger)
  local raceparam2 = CommonFun.CalcRaceParam2(srcUser, targetUser, params, damageParam, logger)
  local bossparam = CommonFun.CalcBossParam(srcUser, targetUser, params, damageParam, logger)
  local bossparam2 = CommonFun.CalcBossParam2(srcUser, targetUser, params, damageParam, logger)
  local MDef2 = targetUser:GetProperty("MDef")
  local MDefPer2 = targetUser:GetProperty("MDefPer")
  local Vit2 = targetUser:GetProperty("Vit")
  local VitPer2 = targetUser:GetProperty("VitPer")
  local Int2 = targetUser:GetProperty("Int")
  local IntPer2 = targetUser:GetProperty("IntPer")
  local MDamReduc2 = CommonFun.calcMDamReDuc(srcUser, targetUser)
  local RefineMDamReduc = targetUser:GetProperty("RefineMDamReduc")
  local damChangePer = damageParam.damChangePer
  local BaseMAtk = Int + math.floor(Int * Int / 100)
  local MAtkFinal = ((MAtk - BaseMAtk) * (1 + MAtkPer) + BaseMAtk) * raceparam * bossparam * bossparam2
  local MDefReduc = CommonFun.CalcMDef(srcUser, targetUser)
  local Num_shand = srcUser:GetRunePoint(82028_AESIR_VARETYR_SPEAR_M_DMG_8)
  local RuneDamage = 1 + Num_shand * 0.08
  local A = ((MAtkFinal * MDefReduc * (1 - MDamReduc2) + MRefine) * (1 - RefineMDamReduc) * damChangePer * (1 + MDamIncrease) * CommonFun.calcMagicElement(srcUser, targetUser, params, damageParam) * elementparam2 - Vit2 / 2 * (1 + VitPer2) - Int2 * (1 + IntPer2)) * RuneDamage
  local Def2 = targetUser:GetProperty("Def")
  local DefPer2 = targetUser:GetProperty("DefPer")
  local DamReduc2 = CommonFun.calcDamReDuc(srcUser, targetUser)
  local RefineDamReduc = targetUser:GetProperty("RefineDamReduc")
  local DefReduc = CommonFun.CalcDef(srcUser, targetUser)
  local B = (MAtkFinal * DefReduc * (1 - DamReduc2) + MRefine) * (1 - RefineDamReduc) * damChangePer * (1 + MDamIncrease) * CommonFun.calcMagicElement(srcUser, targetUser, params, damageParam) * elementparam2 - Vit2 / 2 * (1 + VitPer2) - Int2 * (1 + IntPer2)
  local skilllv_ele = srcUser:GetLernedSkillLevel(1333_ASSASSIN:SUMMON_ELEMENTAL)
  local ElementNpc = srcUser:getCurElementElfID()
  local elementRatio = 1
  if ElementNpc == 580040 then
    elementRatio = 1 + skilllv_ele * 0.01
  end
  local StateEffect = targetUser:GetProperty("StateEffect")
  local bits2 = CommonFun.getBits(StateEffect)
  local Num_yaz = srcUser:GetRunePoint(82029_AESIR_VARETYR_SPEAR_INFLICTS_AN_EXTRA_20_DAMAGE_ON_FROZEN_ENEMIES)
  local RuneDamage2 = 1
  local GemValue1 = srcUser:GetGemValue(82031_LIGHTNING_GUN_DMG_PERCENTAGE)
  local GemDam = 1 + GemValue1 / 100000
  if bits2[CommonFun.StateEffect.Freeze] == 1 then
    local GemValue2 = srcUser:GetGemValue(82032_LIGHTNING_GUN_DEALS_DMG_PERCENTAGE_TO_ENEMIES_UNDER_FROZEN_STATUS)
    RuneDamage2 = 1 + Num_yaz * 0.2 + GemValue2 / 100000
  end
  local C = (A + B) * elementRatio * RuneDamage2 * GemDam
  if C <= 1 then
    return 1
  end
  return C
end

Enemy

{
  "id": 118320,
  "BuffDesc": "Stun: disable movement, stop restoring mana",
  "BuffIcon": "skillbuff_181001",
  "BuffName": "Varetyr Spear [Stun]",
  "BuffRate": {
    "Odds": {
      "a": 1,
      "b": 10,
      "type": 130
    }
  },
  "BuffType": {
    "isgain": 0,
    "isdisperse": 1
  },
  "IconType": 1,
  "BuffEffect": {
    "type": "StatusChange",
    "NoAct": 1,
    "AttrEffect": [
      3,
      4
    ],
    "StateEffect": "4_Dizzy"
  },
  "BuffStateID": 80010
}

Formula

{
  "id": 75350003,
  "Buff": {
    "enemy": [
      118320
    ]
  },
  "Cost": 0,
  "Desc": [
    {
      "id": 1329000,
      "params": [
        710,
        20
      ]
    }
  ],
  "Icon": "skill_1329001",
  "Camps": "Enemy",
  "Level": 10,
  "Logic": "SkillLockedTarget",
  "Damage": [
    {
      "type": 8203,
      "damChangePer": 7.1,
      "elementparam": 1
    }
  ],
  "DescId": "##170385",
  "NameZh": "##170091",
  "SE_hit": "Skill/EleVortex_hit",
  "CastAct": "reading",
  "DamTime": {
    "type": 1,
    "value": 2
  },
  "Fire_EP": 3,
  "SE_cast": "Common/Magic_cast",
  "Pvp_buff": {
    "enemy": [
      118320
    ]
  },
  "RollType": 2,
  "AttackAct": [
    "use_skill"
  ],
  "Attack_EP": 3,
  "SE_attack": "Skill/EleVortexnew_attack",
  "SkillType": "Attack",
  "Target_EP": 0,
  "Logic_Param": {
    "range": 3,
    "range_num": 8
  },
  "Launch_Range": 6
}