Anonymous

Module:Monsters: Difference between revisions

From Melvor Idle
fixed typo
(attempting to create function to pull monster coin drops for Foxy)
(fixed typo)
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.dropsCoins == nil) then
     if ((not p._isDungeonOnlyMonster(monster) or monster.isBoss) and not monster.dropCoins == nil) 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.dropCoin[2]..','..monster.avgGp