Module:Magic: Difference between revisions

No change in size ,  6 October 2020
Fixed some mistakes with new getting spells
(Slight rework to how getting spells is handled)
(Fixed some mistakes with new getting spells)
Line 8: Line 8:
function processSpell(section, index)
function processSpell(section, index)
   local result = Shared.clone(MagicData[section][index])
   local result = Shared.clone(MagicData[section][index])
   result.id = index + 1
   result.id = index - 1
   result.type = section
   result.type = section
   return result
   return result
Line 51: Line 51:
    
    
   if MagicData[section] ~= nil then
   if MagicData[section] ~= nil then
     return processSpell(section, id - 1)
     return processSpell(section, id + 1)
   else
   else
     return nil
     return nil