Devastating Strike

Devastating Strike

Lv 1Attack

Deals severe physical damage once to the selected player from up to 100 meters away. Part of this damage can be borne by each player near the target player.

Range: 100
Fixed: 3

Formula

1function CommonFun.calcDamage_8032(srcUser, targetUser, params, damageParam, logger)
2  local Str = srcUser:GetProperty("Str")
3  local Dex = srcUser:GetProperty("Dex")
4  local Luk = srcUser:GetProperty("Luk")
5  local Atk = srcUser:GetProperty("Atk")
6  local AtkPer = srcUser:GetProperty("AtkPer")
7  local DamIncrease = srcUser:GetProperty("DamIncrease")
8  local IgnoreDef = 0
9  local IgnoreDef1 = srcUser:GetProperty("IgnoreDef")
10  local IgnoreDef2 = srcUser:GetProperty("IgnoreEquipDef")
11  if targetUser.boss or targetUser.mini then
12    IgnoreDef = IgnoreDef1
13  else
14    IgnoreDef = IgnoreDef1 + IgnoreDef2
15  end
16  if 1 <= IgnoreDef then
17    IgnoreDef = 1
18  end
19  local Refine = srcUser:GetProperty("Refine")
20  local AttrEffect = targetUser:GetProperty("AttrEffect")
21  local bits = CommonFun.getBits(AttrEffect)
22  local Def2 = targetUser:GetProperty("Def")
23  local DefPer2 = targetUser:GetProperty("DefPer")
24  local Vit2 = targetUser:GetProperty("Vit")
25  local VitPer2 = targetUser:GetProperty("VitPer")
26  local DamReduc2 = CommonFun.calcDamReDuc(srcUser, targetUser)
27  local LongRangeDamReduc2 = targetUser:GetProperty("LongRangeDamReduc")
28  local RefineDamReduc = CommonFun.calcRefineDamReduc(srcUser, targetUser)
29  local damChangePer = damageParam.damChangePer
30  local raceparam = CommonFun.CalcRaceParam(srcUser, targetUser, params, damageParam, logger)
31  local bodyparam = CommonFun.CalcBodyParam(srcUser, targetUser, params, damageParam, logger)
32  local elementparam = CommonFun.CalcElementParam(srcUser, targetUser, params, damageParam, logger)
33  local bossparam = CommonFun.CalcBossParam(srcUser, targetUser, params, damageParam, logger)
34  local raceparam2 = CommonFun.CalcRaceParam2(srcUser, targetUser, params, damageParam, logger)
35  local bodyparam2 = CommonFun.CalcBodyParam2(srcUser, targetUser, params, damageParam, logger)
36  local elementparam2 = CommonFun.CalcElementParam2(srcUser, targetUser, params, damageParam, logger)
37  local bossparam2 = CommonFun.CalcBossParam2(srcUser, targetUser, params, damageParam, logger)
38  local BaseAtk = Dex * 2 + math.floor(Dex * Dex / 100) + math.floor(Str / 5) + math.floor(Luk / 5)
39  local AtkFinal = (Atk * (1 + AtkPer) * elementparam * elementparam2 + BaseAtk) * raceparam * bossparam * bossparam2
40  local DefReduc = CommonFun.CalcDef(srcUser, targetUser)
41  local count = params.hitedCount
42  local CountDam = math.max(1 - 0.08 * count, 0.2)
43  local A = ((AtkFinal * DefReduc * (1 - DamReduc2) + Refine) * (1 + DamIncrease - LongRangeDamReduc2) * (1 - RefineDamReduc) - Vit2 * (1 + VitPer2)) * CountDam
44  if A <= 1 then
45    return 1
46  end
47  return A
48end
Preserved HTML snapshot from ROM Handbook