Auto Attack (Spell)
Lvl: 1 Attack Magic Range: 6

Deals (Atk100%) Dmg to the target

Formula

function CommonFun.calcDamage_36(srcUser, targetUser, params, damageParam, logger)
  local Luk = srcUser:GetProperty("Luk")
  local Int = srcUser:GetProperty("Int")
  local Vit = srcUser:GetProperty("Vit")
  local MAtk = srcUser:GetProperty("MAtk")
  local NormalAtk = srcUser:GetProperty("NormalAtk")
  NormalAtk = NormalAtk + 3 * Int
  local MAtkPer1 = srcUser:GetProperty("MAtkPer")
  local Num1 = srcUser:GetRunePoint(22017_AESIR_AUTO_ATTACKS_DEALT_BY_MAGES_ENJOY_M_ATK_BONUS_5)
  local Num2 = srcUser:GetRunePoint(22022)
  local Num3 = srcUser:GetRunePoint(22023)
  local RuneDamage3 = (Num1 + Num2 + Num3) * 0.05
  local MAtkPer = MAtkPer1 + RuneDamage3
  local MDamIncrease = CommonFun.calcMDamIncrease(srcUser, targetUser)
  local IgnoreMDef = srcUser:GetProperty("IgnoreMDef")
  if 1 <= IgnoreMDef then
    IgnoreMDef = 1
  end
  local Num11 = srcUser:GetRunePoint(21005_AESIR_AUTO_ATTACKS_HAVE_A_5_CHANCE_TO_TRIGGER_SPELL_CRIT_DEALING_10_DAMAGE_LUCK_INCREASES_CRIT_RATE)
  local Num12 = srcUser:GetRunePoint(21008)
  local Num13 = srcUser:GetRunePoint(21009)
  local Num14 = srcUser:GetRunePoint(21011)
  local Num15 = srcUser:GetRunePoint(21017)
  local Num16 = srcUser:GetRunePoint(22011)
  local Num17 = srcUser:GetRunePoint(22026)
  local Num18 = srcUser:GetRunePoint(22029)
  local Num19 = srcUser:GetBuffLayer(90000952_SILK_ROBE_R3_:MAX_STACK_0)
  local Num20 = srcUser:GetBuffLayer(90000953_SILK_ROBE_R4_:MAX_STACK_0)
  local Num21 = srcUser:GetBuffLayer(90000954_SILK_ROBE_R5_:MAX_STACK_0)
  local Num24 = 0
  local RefineLv2 = srcUser:GetEquipedRefineLv(2)
  if srcUser:HasBuffID(90000959_1905_:MAX_STACK_0) then
    Num24 = Num24 + RefineLv2 * 0.01
  end
  local Num26 = 0
  local equipRing = srcUser:getEquip(CommonFun.PackType.EPACKTYPE_EQUIP, CommonFun.EquipPos.EEQUIPPOS_ARMOUR)
  if equipRing.id == 42126 or equipRing.id == 142126 then
    Num26 = Num26 + equipRing.refinelv * 0.01 + 0.1
  end
  if (equipRing.id == 42126 or equipRing.id == 142126) and equipRing.refinelv >= 15 then
    Num26 = Num26 + 0.05
  end
  local equipRingSD = srcUser:getEquip(CommonFun.PackType.EPACKTYPE_SHADOWEQUIP, CommonFun.EquipPos.EEQUIPPOS_ARMOUR)
  if equipRingSD.id == 42126 or equipRingSD.id == 142126 then
    Num26 = Num26 + (equipRingSD.refinelv * 0.01 + 0.1) * equipRingSD.quench_per / 100
  end
  if (equipRingSD.id == 42126 or equipRingSD.id == 142126) and equipRingSD.refinelv >= 15 then
    Num26 = Num26 + 0.05 * equipRingSD.quench_per / 100
  end
  local RefineLv7 = srcUser:GetEquipedRefineLv(7_WEAPON)
  if srcUser:HasBuffID(90004304_LOST_STAFF_1_T5_:MAX_STACK_0) then
    Num26 = Num26 + 0.04 * RefineLv7
  end
  local EquipDamage = 0
  if srcUser:HasBuffID(90004304_LOST_STAFF_1_T5_:MAX_STACK_0) then
    EquipDamage = EquipDamage + 0.1 * RefineLv7
  end
  local Num22 = srcUser:GetBuffLayer(90000942_TIDAL_SHOES_R3_:MAX_STACK_0)
  local Num23 = srcUser:GetBuffLayer(90000944_TIDAL_SHOES_R5_:MAX_STACK_0)
  local Num25 = 0
  local RefineLv4 = srcUser:GetEquipedRefineLv(4)
  if srcUser:HasBuffID(90000949_1910_:MAX_STACK_0) and 10 <= RefineLv4 then
    Num25 = 1
  end
  local Num27 = 0
  local equipRingshoes = srcUser:getEquip(CommonFun.PackType.EPACKTYPE_EQUIP, CommonFun.EquipPos.EEQUIPPOS_SHOES)
  if equipRingshoes.id == 43587 or equipRingshoes.id == 143587 then
    if equipRingshoes.refinelv < 5 then
      Num27 = Num27 + 10
    elseif equipRingshoes.refinelv >= 5 and equipRingshoes.refinelv < 10 then
      Num27 = Num27 + 10 + 5
    elseif equipRingshoes.refinelv >= 10 and equipRingshoes.refinelv < 15 then
      Num27 = Num27 + 10 + 5 + 5
    elseif equipRingshoes.refinelv >= 15 then
      Num27 = Num27 + 10 + 5 + 5 + 5
    end
  end
  local equipRingSDshoes = srcUser:getEquip(CommonFun.PackType.EPACKTYPE_SHADOWEQUIP, CommonFun.EquipPos.EEQUIPPOS_SHOES)
  if equipRingSDshoes.id == 43587 or equipRingSDshoes.id == 143587 then
    if equipRingSDshoes.refinelv < 5 then
      Num27 = Num27 + 10 * equipRingSDshoes.quench_per / 100
    elseif equipRingSDshoes.refinelv >= 5 and equipRingSDshoes.refinelv < 10 then
      Num27 = Num27 + 15 * equipRingSDshoes.quench_per / 100
    elseif equipRingSDshoes.refinelv >= 10 and equipRingSDshoes.refinelv < 15 then
      Num27 = Num27 + 20 * equipRingSDshoes.quench_per / 100
    elseif equipRingSDshoes.refinelv >= 15 then
      Num27 = Num27 + 25 * equipRingSDshoes.quench_per / 100
    end
  end
  local RuneDamage = (Num11 + Num12 + Num13 + Num14 + Num15 + Num16 + Num17 + Num18) * 0.1 + 1 + 0.03 * Num19 + 0.03 * Num20 + 0.04 * Num21 + Num24 + Num26
  local RuneDamage1 = 0
  if 0 < Num11 + Num12 + Num13 + Num14 + Num15 + Num16 + Num17 + Num18 + Num22 + Num23 + Num25 + Num27 then
    RuneDamage1 = 5 + Luk / 3 + Num22 * 5 + Num23 * 5 + Num25 * 5 + Num27
  end
  local MRefine = srcUser:GetProperty("MRefine")
  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 + NormalAtk) * (1 + MAtkPer) + BaseMAtk) * raceparam * bossparam * bossparam2
  local MDefReduc = CommonFun.CalcMDef(srcUser, targetUser)
  local srcAtkElement1 = 1
  local elementInc1 = 0
  local elementRed1 = 0
  local targetDefElement = targetUser:GetProperty("DefAttr")
  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[srcAtkElement1] then
    logger.error(string.format("CommonFun.NatureProps[%s] is nil", tostring(srcAtkElement1)))
    return 0
  end
  elementInc1 = srcUser:GetProperty(CommonFun.NatureProps[targetDefElement][1])
  elementRed1 = targetUser:GetProperty(CommonFun.NatureProps[srcAtkElement1][2])
  elementAtk1 = srcUser:GetProperty(CommonFun.NatureProps[srcAtkElement1][3])
  if nil == elementAtk1 then
    elementAtk1 = 0
  end
  local result1 = 1 + elementAtk1 - elementRed1
  if result1 <= 0.1 then
    result1 = 0.1
  end
  local srcAtkElement2 = 2
  local elementInc2 = 0
  local elementRed2 = 0
  local targetDefElement = targetUser:GetProperty("DefAttr")
  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[srcAtkElement2] then
    logger.error(string.format("CommonFun.NatureProps[%s] is nil", tostring(srcAtkElement2)))
    return 0
  end
  elementInc2 = srcUser:GetProperty(CommonFun.NatureProps[targetDefElement][1])
  elementRed2 = targetUser:GetProperty(CommonFun.NatureProps[srcAtkElement2][2])
  elementAtk2 = srcUser:GetProperty(CommonFun.NatureProps[srcAtkElement2][3])
  if nil == elementAtk2 then
    elementAtk2 = 0
  end
  local result2 = 1 + elementAtk2 - elementRed2
  if result2 <= 0.1 then
    result2 = 0.1
  end
  local srcAtkElement3 = 3
  local elementInc3 = 0
  local elementRed3 = 0
  local targetDefElement = targetUser:GetProperty("DefAttr")
  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[srcAtkElement3] then
    logger.error(string.format("CommonFun.NatureProps[%s] is nil", tostring(srcAtkElement3)))
    return 0
  end
  elementInc3 = srcUser:GetProperty(CommonFun.NatureProps[targetDefElement][1])
  elementRed3 = targetUser:GetProperty(CommonFun.NatureProps[srcAtkElement3][2])
  elementAtk3 = srcUser:GetProperty(CommonFun.NatureProps[srcAtkElement3][3])
  if nil == elementAtk3 then
    elementAtk3 = 0
  end
  local result3 = 1 + elementAtk3 - elementRed3
  if result3 <= 0.1 then
    result3 = 0.1
  end
  local srcAtkElement4 = 4
  local elementInc4 = 0
  local elementRed4 = 0
  local targetDefElement = targetUser:GetProperty("DefAttr")
  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[srcAtkElement4] then
    logger.error(string.format("CommonFun.NatureProps[%s] is nil", tostring(srcAtkElement4)))
    return 0
  end
  elementInc4 = srcUser:GetProperty(CommonFun.NatureProps[targetDefElement][1])
  elementRed4 = targetUser:GetProperty(CommonFun.NatureProps[srcAtkElement4][2])
  elementAtk4 = srcUser:GetProperty(CommonFun.NatureProps[srcAtkElement4][3])
  if nil == elementAtk4 then
    elementAtk4 = 0
  end
  local result4 = 1 + elementAtk4 - elementRed4
  if result4 <= 0.1 then
    result4 = 0.1
  end
  local elementparam21 = result1
  local elementparam22 = result2
  local elementparam23 = result3
  local elementparam24 = result4
  local A1 = (MAtkFinal * MDefReduc * (1 - MDamReduc2) + MRefine) * (damChangePer + EquipDamage) * (1 - RefineMDamReduc) * (1 + MDamIncrease) * CommonFun.GetElementRate(srcUser, srcAtkElement1, targetUser, targetDefElement, params, damageParam) * elementparam21 - Vit2 / 2 * (1 + VitPer2) - Int2 * (1 + IntPer2)
  local A2 = (MAtkFinal * MDefReduc * (1 - MDamReduc2) + MRefine) * (damChangePer + EquipDamage) * (1 - RefineMDamReduc) * (1 + MDamIncrease) * CommonFun.GetElementRate(srcUser, srcAtkElement2, targetUser, targetDefElement, params, damageParam) * elementparam22 - Vit2 / 2 * (1 + VitPer2) - Int2 * (1 + IntPer2)
  local A3 = (MAtkFinal * MDefReduc * (1 - MDamReduc2) + MRefine) * (damChangePer + EquipDamage) * (1 - RefineMDamReduc) * (1 + MDamIncrease) * CommonFun.GetElementRate(srcUser, srcAtkElement3, targetUser, targetDefElement, params, damageParam) * elementparam23 - Vit2 / 2 * (1 + VitPer2) - Int2 * (1 + IntPer2)
  local A4 = (MAtkFinal * MDefReduc * (1 - MDamReduc2) + MRefine) * (damChangePer + EquipDamage) * (1 - RefineMDamReduc) * (1 + MDamIncrease) * CommonFun.GetElementRate(srcUser, srcAtkElement4, targetUser, targetDefElement, params, damageParam) * elementparam24 - Vit2 / 2 * (1 + VitPer2) - Int2 * (1 + IntPer2)
  local skilllv_1 = srcUser:GetLernedSkillLevel(1163_THIEF:ELEMENTAL_ENHANCEMENT)
  local A5 = 0
  if 6 <= skilllv_1 then
    local fireball = 0
    local waterball = 0
    local windball = 0
    local earthball = 0
    if srcUser:HasBuffID(116830_FIRE_ELEMENT_:MAX_STACK_0) then
      fireball = 1
    end
    if srcUser:HasBuffID(116831_AQUA_ELEMENTAL_:MAX_STACK_0) then
      waterball = 1
    end
    if srcUser:HasBuffID(116832_WIND_ELEMENT_:MAX_STACK_0) then
      windball = 1
    end
    if srcUser:HasBuffID(116833_EARTH_ELEMENT_:MAX_STACK_0) then
      earthball = 1
    end
    A5 = (A1 * windball + A2 * earthball + A3 * waterball + A4 * fireball) * (skilllv_1 - 5) * 0.02
  end
  local A = (MAtkFinal * MDefReduc * (1 - MDamReduc2) + MRefine) * (1 - RefineMDamReduc) * (damChangePer + EquipDamage) * (1 + MDamIncrease) * CommonFun.calcMagicElement(srcUser, targetUser, params, damageParam) * elementparam2 - Vit2 / 2 * (1 + VitPer2) - Int2 * (1 + IntPer2) + A5
  if A <= 1 then
    return 1
  end
  if CommonFun.IsInRate(RuneDamage1, srcUser:GetRandom()) then
    return (A - A5) * RuneDamage + A5, CommonFun.DamageType.Crit
  end
  return A
end

Formula

{
  "id": 23034001,
  "Cost": 1,
  "Desc": [
    {
      "id": 10000,
      "params": [
        100
      ]
    }
  ],
  "Icon": "skill_10000",
  "Camps": "Enemy",
  "Level": 1,
  "Logic": "SkillLockedTarget",
  "Damage": [
    {
      "type": 36,
      "damChangePer": 1.5,
      "elementparam": 5
    }
  ],
  "DescId": "##170630",
  "NameZh": "##1113239",
  "DamTime": {
    "type": 1,
    "value": 1
  },
  "Fire_EP": 3,
  "SE_fire": "Skill/FireWall_fire",
  "RollType": 2,
  "AttackAct": [
    "attack"
  ],
  "Attack_EP": 3,
  "SE_attack": "Skill/Spear_attack",
  "SkillType": "Attack",
  "Target_EP": 3,
  "Launch_Type": 2,
  "Logic_Param": {
    "emit": {
      "type": 1,
      "speed": 20,
      "effect": "MagicanAttack,LowFire_B"
    }
  },
  "Launch_Range": 6
}