17,101
edits
(_isDungeonOnlyMonster: Optimise) |
(Correct monster GP drops) |
||
Line 671: | Line 671: | ||
if monster.dropCoins ~= nil and monster.dropCoins[2] > 1 then | if monster.dropCoins ~= nil and monster.dropCoins[2] > 1 then | ||
avgGp = (monster.dropCoins[1] + monster.dropCoins[2] | avgGp = (monster.dropCoins[1] + monster.dropCoins[2]) / 2 | ||
local gpTxt = Icons.GP(monster.dropCoins[1], monster.dropCoins[2] | local gpTxt = Icons.GP(monster.dropCoins[1], monster.dropCoins[2]) | ||
result = result.."\r\nIn addition to loot, the monster will also drop "..gpTxt..'.' | result = result.."\r\nIn addition to loot, the monster will also drop "..gpTxt..'.' | ||
end | end | ||
Line 1,025: | Line 1,025: | ||
if not p._isDungeonOnlyMonster(monster) then | if not p._isDungeonOnlyMonster(monster) then | ||
if monster.dropCoins ~= nil and monster.dropCoins[2] > 1 then | if monster.dropCoins ~= nil and monster.dropCoins[2] > 1 then | ||
local avgGp = (monster.dropCoins[1] + monster.dropCoins[2] | local avgGp = (monster.dropCoins[1] + monster.dropCoins[2]) / 2 | ||
result = result..'<br/>'..monster.name..','..monster.dropCoins[1]..','..(monster.dropCoins[2] | result = result..'<br/>'..monster.name..','..monster.dropCoins[1]..','..(monster.dropCoins[2])..','..avgGp | ||
end | end | ||
end | end | ||
Line 1,053: | Line 1,053: | ||
if monster.dropCoins ~= nil and monster.dropCoins[2] > 1 then | if monster.dropCoins ~= nil and monster.dropCoins[2] > 1 then | ||
avgGp = (monster.dropCoins[1] + monster.dropCoins[2] | avgGp = (monster.dropCoins[1] + monster.dropCoins[2]) / 2 | ||
end | end | ||
Line 1,190: | Line 1,190: | ||
local gpRange = {0, 0} | local gpRange = {0, 0} | ||
if monster.dropCoins ~= nil and monster.dropCoins[2] > 1 then | if monster.dropCoins ~= nil and monster.dropCoins[2] > 1 then | ||
gpRange = {monster.dropCoins[1], monster.dropCoins[2] | gpRange = {monster.dropCoins[1], monster.dropCoins[2]} | ||
end | end | ||
local gpTxt = nil | local gpTxt = nil |