Changes

no edit summary
Line 367: Line 367:  
function p.encounterTemplate(frame)
 
function p.encounterTemplate(frame)
   −
     local bossNode = frame.args.boss_node
+
     local bossNode
 
     local usedParams = {}
 
     local usedParams = {}
 
     local mapEncounterTable = {}
 
     local mapEncounterTable = {}
Line 382: Line 382:  
                 end
 
                 end
 
                 if not mapEncounterTable[param.node][param.pattern] then
 
                 if not mapEncounterTable[param.node][param.pattern] then
                     mapEncounterTable[param.node][param.pattern] = {
+
                     mapEncounterTable[param.node][param.pattern] = {}
                        ["Xp"] = "",
  −
                        ["Lv"] = "",
  −
                        ["Node Info"] = "",
  −
                        ["Form"] = "",
  −
                        ["Enemy Air Power"] = "",
  −
                    }
   
                 end
 
                 end
 
                 mapEncounterTable[param.node][param.pattern][param.title] = value
 
                 mapEncounterTable[param.node][param.pattern][param.title] = value
Line 414: Line 408:  
     debugPrint(bossNode)
 
     debugPrint(bossNode)
   −
     return p.renderEncounterTable(mapEncounterTable, usedParams, bossNode, true)
+
     return p.renderEncounterTable(mapEncounterTable, usedParams, bossNode or frame.args.boss_node, true)
    
end
 
end
Line 627: Line 621:  
end
 
end
   −
function p.test()
+
function p.test1()
 
     return p.encounterTemplate({
 
     return p.encounterTemplate({
 
         args = {
 
         args = {
Line 695: Line 689:  
         }
 
         }
 
     })
 
     })
 +
end
 +
 +
function p.tests()
 +
    mw.log(p.test1())
 +
    mw.log(p.test2())
 +
    mw.log(p.test3())
 
end
 
end
    
return p
 
return p
3,663

edits