Formula

CommonFun.GetUserArrowAttr

formula.lua
1function CommonFun.GetUserArrowAttr(srcUser, params)
2  local skillParams = Table_Skill[params.skillIDAndLevel]
3  if skillParams == nil then
4    return 0
5  end
6  local hasArrow = false
7  local arrowNum = 0
8  if skillParams.StrengthenCost ~= nil then
9    for key, val in pairs(skillParams.StrengthenCost) do
10      if val.type == 1 and val.num ~= nil then
11        hasArrow = true
12        arrowNum = val.num
13      end
14    end
15  end
16  local ArrowAttr = 0
17  if hasArrow == false then
18    ArrowAttr = 0
19  elseif srcUser.arrow_server ~= nil then
20    if srcUser.arrow_server == 12508 then
21      ArrowAttr = 0.3
22    end
23  elseif srcUser:GetArrowID() == 12508 then
24    local arrowid = srcUser:GetArrowID()
25    local hasNum = srcUser:GetPackageItemNum(arrowid)
26    if arrowNum <= hasNum then
27      ArrowAttr = 0.3
28    else
29      ArrowAttr = 0
30    end
31  end
32  return ArrowAttr
33end
Formula Graph

Connected Archive Data

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

Loading graph filters

CommonFun.GetUserArrowAttr

commonfun-getuserarrowattr

Nodes

0

Edges

0

Related Nodes

Select at least one node type.