2,894
edits
(Added passive ability related functions) |
(Adjusted gp drops to v0.18 always dropping coins. Fixed max coins to adjust for dropCoins[2] actually being max-1) |
||
Line 457: | Line 457: | ||
local avgGp = 0 | local avgGp = 0 | ||
if monster.dropCoins ~= nil then | if monster.dropCoins ~= nil and monster.dropCoins[2] > 1 then | ||
avgGp = (monster.dropCoins[1] + monster.dropCoins[2]) / 2 | avgGp = (monster.dropCoins[1] + monster.dropCoins[2] - 1) / 2 | ||
local gpTxt = Icons.GP(monster.dropCoins[1], monster.dropCoins[2]) | local gpTxt = Icons.GP(monster.dropCoins[1], monster.dropCoins[2] - 1) | ||
result = result.."\r\nIn addition to loot, the monster will also drop "..gpTxt | |||
end | end | ||
Line 521: | Line 517: | ||
result = result..'style="text-align:right"|'..lootChance..'.00%' | result = result..'style="text-align:right"|'..lootChance..'.00%' | ||
end | end | ||
result = result..'\r\n|}' | result = result..'\r\n|}' | ||
result = result..'\r\nThe loot dropped by the average kill is worth '..Icons.GP(Shared.round(lootValue, 2, 0)).." if sold" | result = result..'\r\nThe loot dropped by the average kill is worth '..Icons.GP(Shared.round(lootValue, 2, 0)).." if sold" |