Storm Gust

Storm Gust

Lv 1AttackMagic

Deals (M.Atk100%) M.Dmg to the target

Range: 5

Formula

1function CommonFun.calcDamage_14302(srcUser, targetUser, params, damageParam, logger)
2  local Luk = srcUser:GetProperty("Luk")
3  local Int = srcUser:GetProperty("Int")
4  local Vit = srcUser:GetProperty("Vit")
5  local MAtk = srcUser:GetProperty("MAtk")
6  local NormalAtk = srcUser:GetProperty("NormalAtk")
7  NormalAtk = NormalAtk + 3 * Int
8  local MAtkPer = srcUser:GetProperty("MAtkPer")
9  local MDamIncrease = CommonFun.calcMDamIncrease(srcUser, targetUser)
10  local IgnoreMDef = srcUser:GetProperty("IgnoreMDef")
11  if 1 <= IgnoreMDef then
12    IgnoreMDef = 1
13  end
14  local Num1 = srcUser:GetBuffLayer(90000952_SILK_ROBE_TIER_3_:MAX_STACK_0)
15  local Num2 = srcUser:GetBuffLayer(90000953_SILK_ROBE_TIER_4_:MAX_STACK_0)
16  local Num3 = srcUser:GetBuffLayer(90000954_SILK_ROBE_TIER_5_:MAX_STACK_0)
17  local Num24 = 0
18  local RefineLv2 = srcUser:GetEquipedRefineLv(2)
19  if srcUser:HasBuffID(90000959_1905_:MAX_STACK_0) then
20    Num24 = Num24 + RefineLv2 * 0.01
21  end
22  local Num26 = 0
23  local equipRing = srcUser:getEquip(CommonFun.PackType.EPACKTYPE_EQUIP, CommonFun.EquipPos.EEQUIPPOS_ARMOUR)
24  if equipRing.id == 42126 or equipRing.id == 142126 then
25    Num26 = Num26 + equipRing.refinelv * 0.01 + 0.1
26  end
27  if (equipRing.id == 42126 or equipRing.id == 142126) and equipRing.refinelv >= 15 then
28    Num26 = Num26 + 0.05
29  end
30  local equipRingSD = srcUser:getEquip(CommonFun.PackType.EPACKTYPE_SHADOWEQUIP, CommonFun.EquipPos.EEQUIPPOS_ARMOUR)
31  if equipRingSD.id == 42126 or equipRingSD.id == 142126 then
32    Num26 = Num26 + (equipRingSD.refinelv * 0.01 + 0.1) * equipRingSD.quench_per / 100
33  end
34  if (equipRingSD.id == 42126 or equipRingSD.id == 142126) and equipRingSD.refinelv >= 15 then
35    Num26 = Num26 + 0.05 * equipRingSD.quench_per / 100
36  end
37  local Num4 = srcUser:GetBuffLayer(90000942_TIDAL_SHOES_TIER_3_:MAX_STACK_0)
38  local Num5 = srcUser:GetBuffLayer(90000944_TIDAL_SHOES_TIER_5_:MAX_STACK_0)
39  local Num25 = 0
40  local RefineLv4 = srcUser:GetEquipedRefineLv(4)
41  if srcUser:HasBuffID(90000949_1910_:MAX_STACK_0) and 10 <= RefineLv4 then
42    Num25 = 1
43  end
44  local Num27 = 0
45  local equipRingshoes = srcUser:getEquip(CommonFun.PackType.EPACKTYPE_EQUIP, CommonFun.EquipPos.EEQUIPPOS_SHOES)
46  if equipRingshoes.id == 43587 or equipRingshoes.id == 143587 then
47    if equipRingshoes.refinelv < 5 then
48      Num27 = Num27 + 10
49    elseif equipRingshoes.refinelv >= 5 and equipRingshoes.refinelv < 10 then
50      Num27 = Num27 + 10 + 5
51    elseif equipRingshoes.refinelv >= 10 and equipRingshoes.refinelv < 15 then
52      Num27 = Num27 + 10 + 5 + 5
53    elseif equipRingshoes.refinelv >= 15 then
54      Num27 = Num27 + 10 + 5 + 5 + 5
55    end
56  end
57  local equipRingSDshoes = srcUser:getEquip(CommonFun.PackType.EPACKTYPE_SHADOWEQUIP, CommonFun.EquipPos.EEQUIPPOS_SHOES)
58  if equipRingSDshoes.id == 43587 or equipRingSDshoes.id == 143587 then
59    if equipRingSDshoes.refinelv < 5 then
60      Num27 = Num27 + 10 * equipRingSDshoes.quench_per / 100
61    elseif equipRingSDshoes.refinelv >= 5 and equipRingSDshoes.refinelv < 10 then
62      Num27 = Num27 + 15 * equipRingSDshoes.quench_per / 100
63    elseif equipRingSDshoes.refinelv >= 10 and equipRingSDshoes.refinelv < 15 then
64      Num27 = Num27 + 20 * equipRingSDshoes.quench_per / 100
65    elseif equipRingSDshoes.refinelv >= 15 then
66      Num27 = Num27 + 25 * equipRingSDshoes.quench_per / 100
67    end
68  end
69  local RuneDamage = 1 + 0.03 * Num1 + 0.03 * Num2 + 0.04 * Num3 + Num24 + Num26
70  local RuneDamage1 = 0
71  if 0 < Num4 + Num5 + Num25 + Num27 then
72    RuneDamage1 = Luk / 3 + Num4 * 5 + Num5 * 5 + Num25 * 5 + Num27
73  end
74  local MRefine = srcUser:GetProperty("MRefine")
75  local srcAtkElement = CommonFun.GetUserAtkAttr(srcUser, targetUser, params, damageParam)
76  local targetDefElement = targetUser:GetProperty("DefAttr")
77  local elementparam2 = CommonFun.CalcElementParam2(srcUser, targetUser, params, damageParam, logger)
78  local raceparam = CommonFun.CalcRaceParam(srcUser, targetUser, params, damageParam, logger)
79  local raceparam2 = CommonFun.CalcRaceParam2(srcUser, targetUser, params, damageParam, logger)
80  local bossparam = CommonFun.CalcBossParam(srcUser, targetUser, params, damageParam, logger)
81  local bossparam2 = CommonFun.CalcBossParam2(srcUser, targetUser, params, damageParam, logger)
82  local MDef2 = targetUser:GetProperty("MDef")
83  local MDefPer2 = targetUser:GetProperty("MDefPer")
84  local Vit2 = targetUser:GetProperty("Vit")
85  local VitPer2 = targetUser:GetProperty("VitPer")
86  local Int2 = targetUser:GetProperty("Int")
87  local IntPer2 = targetUser:GetProperty("IntPer")
88  local MDamReduc2 = CommonFun.calcMDamReDuc(srcUser, targetUser)
89  local RefineMDamReduc = CommonFun.calcRefineMDamReduc(srcUser, targetUser)
90  local damChangePer = damageParam.damChangePer
91  local BaseMAtk = Int + math.floor(Int * Int / 100)
92  local MAtkFinal = ((MAtk - BaseMAtk + NormalAtk) * (1 + MAtkPer) + BaseMAtk) * raceparam * bossparam * bossparam2
93  local MDefReduc = CommonFun.CalcMDef(srcUser, targetUser)
94  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)
95  if A <= 1 then
96    return 1
97  end
98  if CommonFun.IsInRate(RuneDamage1, srcUser:GetRandom()) then
99    return A * RuneDamage, CommonFun.DamageType.Crit
100  end
101  return A
102end
Preserved HTML snapshot from ROM Handbook