Formula

CommonFun.calcBuff_3020

formula.lua
1function CommonFun.calcBuff_3020(srcUser, targetUser, a, b, c, d, lv)
2  if srcUser == nil or targetUser == nil then
3    return 0
4  end
5  local PoisonAtk = srcUser:GetProperty("PoisonAtk")
6  local PoisonDef2 = targetUser:GetProperty("PoisonDef")
7  local PoisonDam = 1 + PoisonAtk - PoisonDef2
8  if PoisonDam <= 0 then
9    PoisonDam = 0
10  end
11  local StateAtk = srcUser:GetProperty("StateAtk")
12  local StateDef2 = targetUser:GetProperty("StateDef")
13  local StateDam = (1 + StateAtk) * (1 - StateDef2)
14  if StateDam <= 0 then
15    StateDam = 0
16  end
17  local skilllv_1 = srcUser:GetLernedSkillLevel(1101_ARCANE_MASTER:POISONOUS_WEAPON)
18  local skilllv_2 = srcUser:GetLernedSkillLevel(1102_ARCANE_MASTER:NEW_POISON_RESEARCH)
19  local A = (20 + skilllv_2) * PoisonDam * StateDam * CommonFun.calcAttrPoisonRate(srcUser, targetUser)
20  if srcUser:HasBuffID(140080_PURE_SIN_:MAX_STACK_0) then
21    A = 0
22  end
23  if A <= 0 then
24    return 0
25  end
26  return A
27end
Formula Graph

Connected Archive Data

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

Loading graph filters

CommonFun.calcBuff_3020

commonfun-calcbuff_3020

Nodes

0

Edges

0

Related Nodes

Select at least one node type.