Anonymous

Module:Monsters: Difference between revisions

From Melvor Idle
attempting to fix this would be easier if the testing console would work properly
(fixed typo)
(attempting to fix this would be easier if the testing console would work properly)
Line 752: Line 752:
   local result = 'Monster,Min GP,Max GP,Average GP'
   local result = 'Monster,Min GP,Max GP,Average GP'
   for i, monster in Shared.skpairs(MonsterData.Monsters) do
   for i, monster in Shared.skpairs(MonsterData.Monsters) do
     if ((not p._isDungeonOnlyMonster(monster) or monster.isBoss) and not monster.dropCoins == nil) then
     if not p._isDungeonOnlyMonster(monster) then
      if monster.dropCoins ~= nil and monster.dropCoins[2] > 1 then
       local avgGp = (monster.dropCoins[1] + monster.dropCoins[2] - 1) / 2
       local avgGp = (monster.dropCoins[1] + monster.dropCoins[2] - 1) / 2
       result = result..'\r\n'..monster.name..','..monster.dropCoins[1]..','..monster.dropCoin[2]..','..monster.avgGp
       result = result..'\r\n'..monster.name..','..monster.dropCoins[1]..','..monster.dropCoins[2]..','..monster.avgGp
      end
     end
     end
   end
   end