Anonymous

Module:Monsters: Difference between revisions

From Melvor Idle
fixed passives inexplicably having percentages attached
(Fixed monster.bones check)
(fixed passives inexplicably having percentages attached)
Line 508: Line 508:
     for i, passiveID in pairs(monster.passiveID) do
     for i, passiveID in pairs(monster.passiveID) do
       local passive = p.getPassiveByID(passiveID)
       local passive = p.getPassiveByID(passiveID)
      local passiveChance = 0
       result = result .. '\r\n* ' .. passive.name .. '\r\n** ' .. passive.description
      if passive.chance ~= nil then
        passiveChance = passive.chance
      end
 
       result = result .. '\r\n* ' .. Shared.round(passiveChance, 2, 0) .. '% ' .. passive.name .. '\r\n** ' .. passive.description
     end
     end
   end
   end