
Chain Lightning
Deals M.Atk * 460% wind M.Dmg to an enemy. If there’re other enemy units around, the chain lightning will automatically seek targets and deal damage. Each bounce increases damage dealt by 10%. Bounces up to 4 times
Skill Levels
• Deals M.Atk * 420% wind M.Dmg to an enemy. If there’re other enemy units around, the chain lightning will automatically seek targets and deal damage. Each bounce increases damage dealt by 10%. Bounces up to 4 times
• Deals M.Atk * 380% wind M.Dmg to an enemy. If there’re other enemy units around, the chain lightning will automatically seek targets and deal damage. Each bounce increases damage dealt by 10%. Bounces up to 3 times
• Deals M.Atk * 340% wind M.Dmg to an enemy. If there’re other enemy units around, the chain lightning will automatically seek targets and deal damage. Each bounce increases damage dealt by 10%. Bounces up to 3 times
• Deals M.Atk * 300% wind M.Dmg to an enemy. If there’re other enemy units around, the chain lightning will automatically seek targets and deal damage. Each bounce increases damage dealt by 10%. Bounces up to 3 times
Formula
1function CommonFun.calcDamage_2306(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 MAtkPer = srcUser:GetProperty("MAtkPer")
7 local MDamIncrease = CommonFun.calcMDamIncrease(srcUser, targetUser)
8 local IgnoreMDef = srcUser:GetProperty("IgnoreMDef")
9 if 1 <= IgnoreMDef then
10 IgnoreMDef = 1
11 end
12 local MRefine = srcUser:GetProperty("MRefine")
13 local srcAtkElement = CommonFun.GetUserAtkAttr(srcUser, targetUser, params, damageParam)
14 local targetDefElement = targetUser:GetProperty("DefAttr")
15 local elementparam2 = CommonFun.CalcElementParam2(srcUser, targetUser, params, damageParam, logger)
16 local raceparam = CommonFun.CalcRaceParam(srcUser, targetUser, params, damageParam, logger)
17 local raceparam2 = CommonFun.CalcRaceParam2(srcUser, targetUser, params, damageParam, logger)
18 local bossparam = CommonFun.CalcBossParam(srcUser, targetUser, params, damageParam, logger)
19 local bossparam2 = CommonFun.CalcBossParam2(srcUser, targetUser, params, damageParam, logger)
20 local MDef2 = targetUser:GetProperty("MDef")
21 local MDefPer2 = targetUser:GetProperty("MDefPer")
22 local Vit2 = targetUser:GetProperty("Vit")
23 local VitPer2 = targetUser:GetProperty("VitPer")
24 local Int2 = targetUser:GetProperty("Int")
25 local IntPer2 = targetUser:GetProperty("IntPer")
26 local MDamReduc2 = CommonFun.calcMDamReDuc(srcUser, targetUser)
27 local RefineMDamReduc = CommonFun.calcRefineMDamReduc(srcUser, targetUser)
28 local damChangePer = damageParam.damChangePer
29 local BaseMAtk = Int + math.floor(Int * Int / 100)
30 local MAtkFinal = ((MAtk - BaseMAtk) * (1 + MAtkPer) + BaseMAtk) * raceparam * bossparam * bossparam2
31 local MDefReduc = CommonFun.CalcMDef(srcUser, targetUser)
32 local index = params.hitedIndex
33 local Num1 = srcUser:GetRunePoint(24020_AESIR_DAMAGE_DEALT_BY_EACH_BOUNCE_OF_CHAIN_LIGHTNING_3)
34 local Num2 = srcUser:GetRunePoint(223016_AESIR_DAMAGE_CAUSED_BY_EACH_BOUNCE_OF_LIGHTNING_BOLT_SMASH_3)
35 local RuneDamage = (Num1 + Num2) * 0.03 + 1.1
36 local skillID, skillLevel = CommonFun.UnmergeSkillID(params.skillIDAndLevel)
37 local index_fs = srcUser:GetTargetNumLimit(1165)
38 local index_xd = srcUser:GetTargetNumLimit(1913)
39 if srcUser:HasBuffID(22000560_DMG_OF_CHAIN_LIGHTNING_JUMP_:MAX_STACK_0) then
40 index = math.max(index_fs, index_xd)
41 end
42 local JumpRatio = math.pow(RuneDamage, index)
43 local DamGem = srcUser:GetGemValue(21011_CHAIN_LIGHTNING_DMG_PERCENTAGE)
44 local Fifth = 1
45 if srcUser:HasBuffID(90004764_SCEPTER_OF_SHADOWY_WIND_1_TIER_5_:MAX_STACK_0) then
46 Fifth = Fifth + 0.1
47 end
48 local A = ((MAtkFinal * MDefReduc * (1 - MDamReduc2) + MRefine) * damChangePer * (1 - RefineMDamReduc) * (1 + MDamIncrease) * CommonFun.calcMagicElement(srcUser, targetUser, params, damageParam) * elementparam2 - Vit2 / 2 * (1 + VitPer2) - Int2 * (1 + IntPer2)) * JumpRatio * (1 + DamGem / 100000) * Fifth
49 if skillID == 75200_:CHAIN_LIGHTNING then
50 RuneDamage = 1.1
51 A = math.pow(RuneDamage, index) * damChangePer * CommonFun.calcMagicElement(srcUser, targetUser, params, damageParam)
52 end
53 if skillID == 79134_:CHAIN_LIGHTNING then
54 local Hp = targetUser:GetProperty("Hp")
55 local GetNpcID = targetUser:GetNpcID()
56 if GetNpcID == 310001_DOVE_MELEE_OFFENSIVE_MINION or GetNpcID == 310002_DOVE_RANGED_OFFENSIVE_MINION or GetNpcID == 310008_DOVE_MELEE_DEFENSIVE_MINION or GetNpcID == 310009_DOVE_RANGED_DEFENSIVE_MINION or GetNpcID == 310011_HAWK_MELEE_OFFENSIVE_MINION or GetNpcID == 310012_HAWK_RANGED_OFFENSIVE_MINION or GetNpcID == 310018_HAWK_MELEE_DEFENSIVE_MINION or GetNpcID == 310019_HAWK_RANGED_DEFENSIVE_MINION then
57 A = A + Hp * 0.02
58 end
59 end
60 if A <= 1 then
61 return 1
62 end
63 return A
64end