Formula

CommonFun.ModifyMetalNpcDamage

formula.lua
1function CommonFun.ModifyMetalNpcDamage(srcUser, targetUser, params, damage, skillID, GetNpcID)
2  if GetNpcID == 40021_EMPERIUM or GetNpcID == 40023_SHADOW_OF_MORROC then
3    if srcUser:IsAttackSkill(params.skillIDAndLevel) == false and skillID == 151_KNIGHT:SANCTUARY or srcUser:InGvgZone() == false or srcUser:NoAttackMetal() == true then
4      return 0, CommonFun.DamageType.Miss
5    end
6    local hl_maxhp = targetUser:GetProperty("MaxHp")
7    if damage >= hl_maxhp * 1 / 300 then
8      damage = hl_maxhp * 1 / 300
9    end
10  end
11  if GetNpcID == 40024_VALKYRIE_SENTRY_TOWER or GetNpcID == 40026_VALKYRIE_S_WATCHTOWER_INNER then
12    if srcUser:IsAttackSkill(params.skillIDAndLevel) == false and skillID == 151_KNIGHT:SANCTUARY or srcUser:InGvgZone() == false or srcUser:NoAttackMetal() == true then
13      return 0, CommonFun.DamageType.Miss
14    end
15    local hl_maxhp = targetUser:GetProperty("MaxHp")
16    if damage >= hl_maxhp * 1 / 200 then
17      damage = hl_maxhp * 1 / 200
18    end
19  end
20  if GetNpcID == 40022_EMPERIUM or GetNpcID == 55000_EMPERIUM then
21    if srcUser:IsAttackSkill(params.skillIDAndLevel) == false and skillID == 151_KNIGHT:SANCTUARY then
22      return 0, CommonFun.DamageType.Miss
23    end
24    local hl_maxhp = targetUser:GetProperty("MaxHp")
25    if damage >= hl_maxhp * 1 / 30 then
26      damage = hl_maxhp * 1 / 30
27    end
28  end
29  return damage
30end
Formula Graph

Connected Archive Data

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

Loading graph filters

CommonFun.ModifyMetalNpcDamage

commonfun-modifymetalnpcdamage

Nodes

0

Edges

0

Related Nodes

Select at least one node type.