
Blood Outbreak
Lv 1Buff
Detonate the Blood Pool and enemies with 5 layers of [Blood Infection], causing extra high Neutral DMG.
Range: 25
Formula
1function CommonFun.calcBuff_4640(srcUser, targetUser, a, b, c, d, lv)
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 Hp2 = targetUser:GetProperty("Hp")
27 local MaxHp2 = targetUser:GetProperty("MaxHp")
28 local raceparam = 1
29 local srcRace = srcUser.race
30 local targetRace = targetUser.race
31 if targetUser:HasBuffID(139410_TWO_FACE_DEMON_KING_HUMAN_:MAX_STACK_0) then
32 targetRace = 3
33 end
34 if srcUser:HasBuffID(139411_TWO_FACE_DEMON_KING_DEMON_:MAX_STACK_0) then
35 srcRace = 3
36 end
37 if srcUser:HasBuffID(49320_RACIAL_ANCIENT_RELICS_PERMANENT_:MAX_STACK_0) and srcUser:HasBuffID(49325_RACIAL_ANCIENT_RELICS_CD_:MAX_STACK_0) then
38 elseif srcUser:HasBuffID(49320_RACIAL_ANCIENT_RELICS_PERMANENT_:MAX_STACK_0) then
39 targetRace = 2
40 end
41 if targetUser:HasBuffID(49320_RACIAL_ANCIENT_RELICS_PERMANENT_:MAX_STACK_0) and targetUser:HasBuffID(49325_RACIAL_ANCIENT_RELICS_CD_:MAX_STACK_0) then
42 elseif targetUser:HasBuffID(49320_RACIAL_ANCIENT_RELICS_PERMANENT_:MAX_STACK_0) then
43 srcRace = 2
44 end
45 if nil == CommonFun.RaceProps[targetRace] then
46 return 0
47 end
48 if nil == CommonFun.RaceProps[srcRace] then
49 return 0
50 end
51 local raceInc = srcUser:GetProperty(CommonFun.RaceProps[targetRace][1])
52 local raceRed = targetUser:GetProperty(CommonFun.RaceProps[srcRace][2])
53 local raceRedThrough = srcUser:GetProperty(CommonFun.RaceProps[srcRace][3])
54 local raceIncResistance = targetUser:GetProperty(CommonFun.RaceProps[targetRace][4])
55 if nil == raceRedThrough then
56 raceRedThrough = 0
57 end
58 if nil == raceIncResistance then
59 raceIncResistance = 0
60 end
61 if 0 <= raceInc then
62 raceInc = raceInc * math.max(1 - raceIncResistance, 0)
63 end
64 if 0 <= raceRed then
65 raceRed = raceRed * math.max(1 - raceRedThrough, 0)
66 end
67 local raceparam = 1 + raceInc - raceRed
68 if raceparam <= 0.1 then
69 raceparam = 0.1
70 end
71 local srcAtkElement = c
72 local targetDefElement = targetUser:GetProperty("DefAttr")
73 local ElementRate = CommonFun.GetElementRate(srcUser, srcAtkElement, targetUser, targetDefElement)
74 if nil == CommonFun.NatureProps[srcAtkElement] or nil == CommonFun.NatureProps[targetDefElement] or nil == targetDefElement then
75 return 0
76 end
77 local elementInc = srcUser:GetProperty(CommonFun.NatureProps[targetDefElement][1])
78 local elementRed = targetUser:GetProperty(CommonFun.NatureProps[srcAtkElement][2])
79 local elementAtk = srcUser:GetProperty(CommonFun.NatureProps[srcAtkElement][3])
80 local elementThrough = srcUser:GetProperty(CommonFun.NatureProps[srcAtkElement][4])
81 local elementResistance = targetUser:GetProperty(CommonFun.NatureProps[srcAtkElement][5])
82 if 0 <= elementRed then
83 elementRed = elementRed * math.max(1 - elementThrough, 0)
84 end
85 if 0 <= elementAtk then
86 elementAtk = elementAtk * math.max(1 - elementResistance, 0)
87 end
88 local elementparam = (1 + elementInc) * ElementRate
89 local elementparam2 = 1 + elementAtk - elementRed
90 if elementparam2 <= 0.1 then
91 elementparam2 = 0.1
92 end
93 local ele = elementparam * elementparam2
94 if targetDefElement == nil or ElementRate == nil or elementInc == nil or elementRed == nil or elementAtk == nil then
95 ele = 1
96 end
97 local AtkFinal = b * CommonFun.ShapeCorrection(srcUser, targetUser) * ele * raceparam
98 local DefReduc = CommonFun.CalcDef(srcUser, targetUser)
99 local A = (AtkFinal * DefReduc * (1 - DamReduc2) + Refine) * (1 - RefineDamReduc) * (1 + DamIncrease) - Vit2 * (1 + VitPer2) + a * MaxHp2
100 return -A
101endPreserved HTML snapshot from ROM Handbook
