Soul Return
Lvl: 1 Attack Physical CD: 5 sec Skill Delay: 1 sec

Deals (Atk100%) Dmg to the target

Formula

function CommonFun.calcDamage_3501(srcUser, targetUser, params, damageParam, logger)
  local Str = srcUser:GetProperty("Str")
  local Dex = srcUser:GetProperty("Dex")
  local Luk = srcUser:GetProperty("Luk")
  local Atk = srcUser:GetProperty("Atk")
  local AtkPer = srcUser:GetProperty("AtkPer")
  local DamIncrease = srcUser:GetProperty("DamIncrease")
  local IgnoreDef = 0
  local IgnoreDef1 = srcUser:GetProperty("IgnoreDef")
  local IgnoreDef2 = srcUser:GetProperty("IgnoreEquipDef")
  if targetUser.boss or targetUser.mini then
    IgnoreDef = IgnoreDef1
  else
    IgnoreDef = IgnoreDef1 + IgnoreDef2
  end
  if 1 <= IgnoreDef then
    IgnoreDef = 1
  end
  local Refine = srcUser:GetProperty("Refine")
  local Def2 = targetUser:GetProperty("Def")
  local DefPer2 = targetUser:GetProperty("DefPer")
  local Vit2 = targetUser:GetProperty("Vit")
  local VitPer2 = targetUser:GetProperty("VitPer")
  local DamReduc2 = CommonFun.calcDamReDuc(srcUser, targetUser)
  local RefineDamReduc = targetUser:GetProperty("RefineDamReduc")
  local Hp2 = targetUser:GetProperty("Hp")
  local MaxHp2 = targetUser:GetProperty("MaxHp")
  local damChangePer = damageParam.damChangePer
  local AttrEffect = srcUser:GetProperty("AttrEffect")
  local bits = CommonFun.getBits(AttrEffect)
  local raceparam = CommonFun.CalcRaceParam(srcUser, targetUser, params, damageParam, logger)
  local bodyparam = CommonFun.CalcBodyParam(srcUser, targetUser, params, damageParam, logger)
  local elementparam = CommonFun.CalcElementParam(srcUser, targetUser, params, damageParam, logger)
  local bossparam = CommonFun.CalcBossParam(srcUser, targetUser, params, damageParam, logger)
  local raceparam2 = CommonFun.CalcRaceParam2(srcUser, targetUser, params, damageParam, logger)
  local bodyparam2 = CommonFun.CalcBodyParam2(srcUser, targetUser, params, damageParam, logger)
  local elementparam2 = CommonFun.CalcElementParam2(srcUser, targetUser, params, damageParam, logger)
  local bossparam2 = CommonFun.CalcBossParam2(srcUser, targetUser, params, damageParam, logger)
  local BaseAtk = Str * 2 + math.floor(Str * Str / 100) + math.floor(Dex / 5) + math.floor(Luk / 5)
  local AtkFinal = ((Atk - BaseAtk) * (1 + AtkPer) * CommonFun.ShapeCorrection(srcUser, targetUser) * bodyparam * elementparam * elementparam2 + BaseAtk) * raceparam * bossparam * bossparam2
  local DefReduc = CommonFun.CalcDef(srcUser, targetUser, params)
  local ShortRangeDamReduc2 = targetUser:GetProperty("ShortRangeDamReduc")
  local skilllv = srcUser:GetLernedSkillLevel(3909_DIVINE_AVENGER:SOUL_DEPRAVITY)
  local Num = srcUser:GetBuffLayer(130503_PHANTOM_:MAX_STACK_0)
  local skilllv_1 = srcUser:GetLernedSkillLevel(3926_DIVINE_AVENGER:SOUL_DEPRAVITY_ENHANCE)
  local ratio = skilllv_1 * 0.04 + 1
  local GemValue = srcUser:GetGemValue(31142_SOUL_DEPRAVITY_DMG_PERCENTAGE)
  local GemDam = 1 + GemValue / 100000
  local skillID, skillLevel = CommonFun.UnmergeSkillID(params.skillIDAndLevel)
  if skillID == 3929_DIVINE_AVENGER:SOUL_RETURN then
    damChangePer = 10 + 2 * skilllv
    Num = 0
  end
  local A = ((AtkFinal * DefReduc * (1 - DamReduc2) + Refine) * (damChangePer + skilllv * Num * 0.3) * (1 - RefineDamReduc) * (1 + DamIncrease - ShortRangeDamReduc2) - Vit2 * (1 + VitPer2)) * ratio * GemDam
  if A <= 1 then
    return 1
  end
  if srcUser:HasBuffID(90004334_ASSASSIN_S_JUR_1_T5_:MAX_STACK_0) then
    local Cri = srcUser:GetProperty("Cri")
    local CriRes2 = targetUser:GetProperty("CriRes")
    local Rate = (Cri - CriRes2) / 3
    Rate = math.max(Rate, 0)
    if CommonFun.IsInRate(Rate, srcUser:GetRandom()) then
      return A * 1.5, CommonFun.DamageType.Crit
    end
  end
  if bits[CommonFun.AttrEffect.Hualiduanjian] == 1 then
    return A * 1.5
  end
  return A
end

Enemy

{
  "id": 130560,
  "BuffName": "Soul Depravity (Execute)",
  "BuffRate": {
    "Odds": {
      "type": 6260
    }
  },
  "BuffEffect": {
    "type": "Kill"
  },
  "BuffStateID": 116623
}

Formula

{
  "CD": 5,
  "id": 3929001,
  "Buff": {
    "enemy": [
      130560
    ]
  },
  "Cost": 1,
  "Desc": [
    {
      "id": 10000,
      "params": [
        100
      ]
    }
  ],
  "Icon": "skill_3909001",
  "Camps": "Enemy",
  "Level": 1,
  "Logic": "SkillSelfRange",
  "Damage": [
    {
      "type": 3501,
      "damChangePer": 1
    }
  ],
  "DescId": "##170630",
  "NameZh": "##1101591",
  "CastAct": "skill_ready",
  "DamTime": {
    "type": 1,
    "value": 4
  },
  "DelayCD": 1,
  "Fire_EP": 3,
  "Pvp_buff": {
    "enemy": [
      130560
    ]
  },
  "RollType": 1,
  "AttackAct": [
    "use_skill"
  ],
  "Attack_EP": 3,
  "SkillType": "Attack",
  "Target_EP": 3,
  "Logic_Param": {
    "range": 6,
    "range_num": 15
  },
  "Launch_Range": 0
}