Module:Items: Difference between revisions

hasCombatStats: More robust Summoning familiar check
(Add exception to prevent summoningMaxhit from being seen as a combat stat for Familiars)
(hasCombatStats: More robust Summoning familiar check)
Line 171: Line 171:
-- the checked stat is summoningMaxhit, the result is ignored.
-- the checked stat is summoningMaxhit, the result is ignored.
function isNonZeroStat(statName, statVal)
function isNonZeroStat(statName, statVal)
if item.type == 'Familiar' and statName == 'summoningMaxhit' then
if statName == 'summoningMaxhit' and (p._canItemUseSlot(item, 'Summon1') or p._canItemUseSlot(item, 'Summon2')) then
return false
return false
end
end