2,875
edits
(_getPetSourceText: Further amends to icon types) |
No edit summary |
||
Line 8: | Line 8: | ||
local Modifiers = require('Module:Modifiers') | local Modifiers = require('Module:Modifiers') | ||
local Icons = require('Module:Icons') | local Icons = require('Module:Icons') | ||
local Num = require('Module:Number') | |||
local areaDataKeys = { 'combatAreas', 'slayerAreas', 'dungeons', 'strongholds', 'abyssDepths' } | local areaDataKeys = { 'combatAreas', 'slayerAreas', 'dungeons', 'strongholds', 'abyssDepths' } | ||
Line 140: | Line 141: | ||
-- Pet is from a dungeon or combat/slayer area | -- Pet is from a dungeon or combat/slayer area | ||
if source.fixedChance then | if source.fixedChance then | ||
return 'Guaranteed after ' .. | return 'Guaranteed after ' .. Num.formatnum(source.weight) .. (source.weight == 1 and ' clear' or ' clears') | ||
else | else | ||
return '1 in ' .. | return '1 in ' .. Num.formatnum(source.weight) .. ' (' .. Num.round(100 / source.weight, 2, 2) .. '%)' | ||
end | end | ||
else | else |
edits