Storm Gust

Storm Gust

Lv 1AttackPhysical

Deals (Self Atk*100%) damage to an enemy target

Range: 1.5

Formula

1function CommonFun.calcDamage_10201(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 skillID, skillLevel = CommonFun.UnmergeSkillID(params.skillIDAndLevel)
39  local skilllv_1 = srcUser:GetLernedSkillLevel(127_KNIGHT:ELEMENTAL_ARROW)
40  local atk_add = 0
41  if 10 < skilllv_1 and (skillID == 1410_ASSASSIN_CROSS:STORM_GUST or skillID == 1446_ASSASSIN_CROSS:STORM_GUST_ASSASSIN_CROSS:STORM_GUST) then
42    atk_add = Dex * ((skilllv_1 - 10) * 0.5)
43  end
44  local NormalAtkAttr = srcUser:GetProperty("NormalAtk")
45  local NormalAtk = NormalAtkAttr + 3 * Dex
46  local BaseAtk = Dex * 2 + math.floor(Dex * Dex / 100) + math.floor(Str / 5) + math.floor(Luk / 5)
47  local AtkFinal = ((Atk - BaseAtk + NormalAtk + atk_add) * (1 + AtkPer) * CommonFun.ShapeCorrection(srcUser, targetUser) * bodyparam * elementparam * elementparam2 + BaseAtk) * raceparam * bossparam * bossparam2
48  local DefReduc = CommonFun.CalcDef(srcUser, targetUser)
49  local targetid = targetUser:GetGuid()
50  local distance = srcUser:GetDistance(targetid)
51  local skilllv_1 = srcUser:GetLernedSkillLevel(133_KNIGHT:VULTURE_S_EYE)
52  local DisDam = 1
53  if 10 < skilllv_1 and skillID == 1446_ASSASSIN_CROSS:STORM_GUST_ASSASSIN_CROSS:STORM_GUST then
54    DisDam = 1 + distance / 7.5 * (skilllv_1 - 10) * 0.1
55    if srcUser:HasBuffID(131080_UNLIMITED_STARS_:MAX_STACK_0) then
56      DisDam = 1 + (skilllv_1 - 10) * 0.1
57    end
58    DisDam = math.min(DisDam, 2)
59  end
60  local Injured = 1
61  if bits[CommonFun.AttrEffect.NormalSkillDam] == 1 then
62    Injured = 1.3
63  end
64  local Num1 = srcUser:GetRunePoint(103030_AESIR_AUTO_ATTACK_DEALS_1_DAMAGE)
65  local RuneDamage = Num1 * 0.01 + 1
66  local A = ((AtkFinal * DefReduc * (1 - DamReduc2) + Refine) * damChangePer * (1 - RefineDamReduc) * (1 + DamIncrease - LongRangeDamReduc2) - Vit2 * (1 + VitPer2)) * DisDam * Injured * RuneDamage
67  if A <= 1 then
68    return 1
69  end
70  return A
71end
Preserved HTML snapshot from ROM Handbook