Module:Pets: Difference between revisions

m
Amend odd indentation
(petGetSidebar: Amend drop chance for Into the Mist)
m (Amend odd indentation)
Line 177: Line 177:
   local dropChance = nil
   local dropChance = nil
   if pet.obtained ~= nil and pet.obtained.dungeonCompletion ~= nil then
   if pet.obtained ~= nil and pet.obtained.dungeonCompletion ~= nil then
  local odds = pet.obtained.dungeonCompletion[1][2]
    local odds = pet.obtained.dungeonCompletion[1][2]
  -- Special handling for Into the Mist/Pablo
    -- Special handling for Into the Mist/Pablo
  if pet.obtained.dungeonCompletion[1][1] == 15 then
    if pet.obtained.dungeonCompletion[1][1] == 15 then
    dropChance = 'Guaranteed after ' .. odds .. ' completions'
      dropChance = 'Guaranteed after ' .. odds .. ' completions'
  else
    else
       dropChance = '1 in '..odds..' ('..Shared.round(100 / odds, 2, 2)..'%)'
       dropChance = '1 in '..odds..' ('..Shared.round(100 / odds, 2, 2)..'%)'
     end
     end