Formula

CommonFun.calcBuff_2210

formula.lua
1function CommonFun.calcBuff_2210(srcUser, targetUser, a, b, c, d, lv)
2  if srcUser == nil or targetUser == nil then
3    return 0
4  end
5  local MaxHp = srcUser:GetProperty("MaxHp")
6  local MaxSp = srcUser:GetProperty("MaxSp")
7  local MaxHpRatio = 0
8  local MaxSpRatio = 0
9  if 0 <= MaxHp and MaxHp < 2000 then
10    MaxHpRatio = 0.01
11  elseif 2000 <= MaxHp and MaxHp < 5000 then
12    MaxHpRatio = 0.02
13  elseif 5000 <= MaxHp and MaxHp < 10000 then
14    MaxHpRatio = 0.03
15  elseif 10000 <= MaxHp and MaxHp < 20000 then
16    MaxHpRatio = 0.04
17  elseif 20000 <= MaxHp and MaxHp < 50000 then
18    MaxHpRatio = 0.05
19  elseif 50000 <= MaxHp and MaxHp < 100000 then
20    MaxHpRatio = 0.06
21  else
22    MaxHpRatio = 0.07
23  end
24  if 0 <= MaxSp and MaxSp < 200 then
25    MaxSpRatio = 0.01
26  elseif 200 <= MaxSp and MaxSp < 500 then
27    MaxSpRatio = 0.02
28  elseif 500 <= MaxSp and MaxSp < 1000 then
29    MaxSpRatio = 0.03
30  elseif 1000 <= MaxSp and MaxSp < 2000 then
31    MaxSpRatio = 0.04
32  elseif 2000 <= MaxSp and MaxSp < 5000 then
33    MaxSpRatio = 0.05
34  elseif 5000 <= MaxSp and MaxSp < 10000 then
35    MaxSpRatio = 0.06
36  else
37    MaxSpRatio = 0.07
38  end
39  local A = MaxHpRatio + MaxSpRatio + b
40  if 1 <= A then
41    A = 1
42  end
43  return A
44end
Formula Graph

Connected Archive Data

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

Loading graph filters

CommonFun.calcBuff_2210

commonfun-calcbuff_2210

Nodes

0

Edges

0

Related Nodes

Select at least one node type.