Blast

Blast

Lv 1AttackPhysical

Deals (Atk100%) Dmg to the target

Formula

1function CommonFun.calcDamage_122(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 Def2 = targetUser:GetProperty("Def")
21  local DefPer2 = targetUser:GetProperty("DefPer")
22  local Vit2 = targetUser:GetProperty("Vit")
23  local VitPer2 = targetUser:GetProperty("VitPer")
24  local DamReduc2 = CommonFun.calcDamReDuc(srcUser, targetUser)
25  local RefineDamReduc = CommonFun.calcRefineDamReduc(srcUser, targetUser)
26  local damChangePer = damageParam.damChangePer
27  local raceparam = CommonFun.CalcRaceParam(srcUser, targetUser, params, damageParam, logger)
28  local bodyparam = CommonFun.CalcBodyParam(srcUser, targetUser, params, damageParam, logger)
29  local elementparam = CommonFun.CalcElementParam(srcUser, targetUser, params, damageParam, logger)
30  local bossparam = CommonFun.CalcBossParam(srcUser, targetUser, params, damageParam, logger)
31  local raceparam2 = CommonFun.CalcRaceParam2(srcUser, targetUser, params, damageParam, logger)
32  local bodyparam2 = CommonFun.CalcBodyParam2(srcUser, targetUser, params, damageParam, logger)
33  local elementparam2 = CommonFun.CalcElementParam2(srcUser, targetUser, params, damageParam, logger)
34  local bossparam2 = CommonFun.CalcBossParam2(srcUser, targetUser, params, damageParam, logger)
35  local BaseAtk = Str * 2 + math.floor(Str * Str / 100) + math.floor(Dex / 5) + math.floor(Luk / 5)
36  local AtkFinal = ((Atk - BaseAtk) * (1 + AtkPer) * CommonFun.ShapeCorrection(srcUser, targetUser) * bodyparam * elementparam * elementparam2 + BaseAtk) * raceparam * bossparam * bossparam2
37  local DefReduc = CommonFun.CalcDef(srcUser, targetUser)
38  local ShortRangeDamReduc2 = targetUser:GetProperty("ShortRangeDamReduc")
39  local A = (AtkFinal * DefReduc * (1 - DamReduc2) + Refine) * damChangePer * (1 - RefineDamReduc) * (1 + DamIncrease - ShortRangeDamReduc2) - Vit2 * (1 + VitPer2)
40  local Hp = srcUser:GetProperty("Hp")
41  local MaxHp = srcUser:GetProperty("MaxHp")
42  local Num1 = srcUser:GetBuffLayer(154021_PROTECTION_SHIELD_:MAX_STACK_5)
43  local skillID, skillLevel = CommonFun.UnmergeSkillID(params.skillIDAndLevel)
44  if skillID == 79300_:SPACE_TRAMPLING or skillID == 79301_:SPACE_TRAMPLING then
45    local targetid = targetUser:GetGuid()
46    local distance = srcUser:GetDistance(targetid)
47    if distance <= 2 then
48      A = A * 2
49    end
50  end
51  if skillID == 79304_:DELIBERATE_HEAVY_PUNCH then
52    A = A * (1 + Hp / MaxHp) * (1 + Num1 * 0.1)
53  end
54  if skillID == 79306_:BLAST then
55    A = A * (1 + Num1 * 0.3)
56  end
57  if skillID == 79314_:UNSTOPPABLE then
58    local chantDam = srcUser:GetChantBeDamage()
59    A = A + chantDam * 10
60  end
61  if skillID == 79322_:DUST_BLAST then
62    local Num2 = targetUser:GetBuffLayer(154080_POISONOUS_POLLEN_FLOOR_:MAX_STACK_30)
63    A = A * (1 + Num2 * 0.3)
64  end
65  if A <= 1 then
66    return 1
67  end
68  return A
69end
Preserved HTML snapshot from ROM Handbook