Formula

CommonFun.calcBuff_2270

formula.lua
1function CommonFun.calcBuff_2270(srcUser, targetUser, a, b, c, d, lv)
2  if srcUser == nil or targetUser == nil then
3    return 0
4  end
5  local IgnoreDef = 0
6  local IgnoreDef1 = srcUser:GetProperty("IgnoreDef")
7  local IgnoreDef2 = srcUser:GetProperty("IgnoreEquipDef")
8  if targetUser.boss or targetUser.mini then
9    IgnoreDef = IgnoreDef1
10  else
11    IgnoreDef = IgnoreDef1 + IgnoreDef2
12  end
13  if 1 <= IgnoreDef then
14    IgnoreDef = 1
15  end
16  local Def2 = targetUser:GetProperty("Def")
17  local DefPer2 = targetUser:GetProperty("DefPer")
18  local Vit2 = targetUser:GetProperty("Vit")
19  local VitPer2 = targetUser:GetProperty("VitPer")
20  local DamReduc2 = CommonFun.calcDamReDuc(srcUser, targetUser)
21  local RefineDamReduc = CommonFun.calcRefineDamReduc(srcUser, targetUser)
22  local Sp = srcUser:GetProperty("Sp")
23  local Luk = srcUser:GetProperty("Luk")
24  local DefReduc = CommonFun.CalcDef(srcUser, targetUser)
25  local A = -(Sp * (1 + Luk / 100) * DefReduc * (1 - RefineDamReduc) * (1 - DamReduc2) - Vit2 * (1 + VitPer2))
26  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
27    A = -1
28  end
29  if targetUser:DamageAlways1() then
30    A = -1
31  end
32  return A
33end
Formula Graph

Connected Archive Data

See which cards, equipment, headwears, buffs, and other archived records connect to this formula.

Loading graph filters

CommonFun.calcBuff_2270

commonfun-calcbuff_2270

Nodes

0

Edges

0

Related Nodes

Select at least one node type.