Formula

CommonFun.ModifyDamageBySpecialNpc

formula.lua
1function CommonFun.ModifyDamageBySpecialNpc(srcUser, damage, npcid, params)
2  if 0 < damage and CommonFun.SpecialNpcCheck[npcid] ~= nil then
3    local data = CommonFun.SpecialNpcCheck[npcid]
4    local college = 0.01
5    local skillok = false
6    local skillID, skillLevel = CommonFun.UnmergeSkillID(params.skillIDAndLevel)
7    if data.skill ~= nil and 0 < #data.skill then
8      for _, v in pairs(data.skill) do
9        if skillID == v then
10          skillok = true
11          break
12        end
13      end
14    end
15    local buffok = true
16    if skillok and data.buff ~= nil and 0 < #data.buff then
17      buffok = false
18      for _, v in pairs(data.buff) do
19        if srcUser:HasBuffID(v) then
20          buffok = true
21          break
22        end
23      end
24    end
25    if skillok and buffok then
26      college = 1
27    end
28    return math.floor(damage * college)
29  end
30  return damage
31end
Formula Graph

Connected Archive Data

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

Loading graph filters

CommonFun.ModifyDamageBySpecialNpc

commonfun-modifydamagebyspecialnpc

Nodes

0

Edges

0

Related Nodes

Select at least one node type.