Formula

CommonFun.calcBuff_3151

formula.lua
1function CommonFun.calcBuff_3151(srcUser, targetUser, a, b, c, d, lv)
2  if srcUser == nil or targetUser == nil then
3    return 0
4  end
5  local off2 = targetUser:IsEquipForceOff(2)
6  local off7 = targetUser:IsEquipForceOff(7)
7  local equiped2 = targetUser:GetEquipedID(2) ~= 0
8  local equiped7 = targetUser:GetEquipedID(7_WEAPON) ~= 0
9  local list = {}
10  if off2 == false and equiped2 == true then
11    table.insert(list, 2)
12  end
13  if off7 == false and equiped7 == true then
14    table.insert(list, 7)
15  end
16  if #list <= 0 then
17    return 0
18  end
19  local random = srcUser:GetRandom()
20  return list[random % #list + 1]
21end
Formula Graph

Connected Archive Data

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

Loading graph filters

CommonFun.calcBuff_3151

commonfun-calcbuff_3151

Nodes

0

Edges

0

Related Nodes

Select at least one node type.