Formula
CommonFun.calcBuff_2271
formula.lua
1function CommonFun.calcBuff_2271(srcUser, targetUser, a, b, c, d, lv)
2 if srcUser == nil or targetUser == nil then
3 return 0
4 end
5 local Sp = srcUser:GetProperty("Sp")
6 local Luk = srcUser:GetProperty("Luk")
7 local RefineDamReduc = CommonFun.calcRefineDamReduc(srcUser, targetUser)
8 local RefineMDamReduc = CommonFun.calcRefineMDamReduc(srcUser, targetUser)
9 local SkillDam = srcUser:GetProperty("SkillDam")
10 local SkillRes = targetUser:GetProperty("SkillRes")
11 local ResultDamInc = srcUser:GetProperty("ResultDamInc")
12 local ResultDamRes = targetUser:GetProperty("ResultDamRes")
13 local ActuallySkiRes = SkillRes - SkillDam
14 local mapid, maptype = srcUser:GetMapInfo()
15 if maptype == PVP_MAPS then
16 ActuallySkiRes = ActuallySkiRes < -1 and -1 or 1 < ActuallySkiRes and 1 or ActuallySkiRes
17 ActuallySkiRes = math.floor(ActuallySkiRes * 1000) / 1000
18 ActuallySkiRes = ActuallySkiRes + 0.4 * (1 - math.sin(ActuallySkiRes * 3.14 / 2))
19 end
20 local SkillEnd = 1 - ActuallySkiRes
21 local Result = 1 + ResultDamInc - ResultDamRes
22 local SkillRealDam = math.floor(Sp * (6 + Luk / 50))
23 SkillEnd = math.max(SkillEnd, 0.1)
24 Result = math.max(Result, 0.1)
25 SkillRealDam = math.max(SkillRealDam, 1)
26 local A = -SkillRealDam * (1 - RefineDamReduc) * SkillEnd * Result
27 if targetUser:GetNpcID() == 30043_YEAR or targetUser:GetNpcID() == 280303_WILDNESS_SPIRIT_BEAST or targetUser:GetNpcID() == 56008_GOMORA or targetUser:GetNpcID() == 56009_BALTAN or targetUser:GetNpcID() == 56010_GOLZA or targetUser:GetNpcID() == 56011_BEMSTAR or targetUser:GetNpcID() == 56012_ELEKING or targetUser:GetNpcID() == 56013_KING_JOE then
28 A = -1
29 end
30 if targetUser:DamageAlways1() then
31 A = -1
32 end
33 return A
34endFormula Graph
Connected Archive Data
See which cards, equipment, headwears, buffs, and other archived records connect to this formula.
Loading graph filters
CommonFun.calcBuff_2271
commonfun-calcbuff_2271
Nodes
0
Edges
0
Related Nodes
Select at least one node type.
