• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
m
no edit summary
Line 13: Line 13:  
     return ab[2] and ab[1] or x:sub(1, 1), ab[2] and ab[2]:sub(1, 1) or x:sub(2, 2)
 
     return ab[2] and ab[1] or x:sub(1, 1), ab[2] and ab[2]:sub(1, 1) or x:sub(2, 2)
 
end
 
end
-- local letter, num = getLetterNum("A1_xxx") -- A and 1
  −
-- local letter, num = getLetterNum("XX3-1_xxx") -- XX3 and 1
      
function valid(data, array)
 
function valid(data, array)
Line 380: Line 378:  
     for nodePattern,patternInfo in pairs(frame.args) do
 
     for nodePattern,patternInfo in pairs(frame.args) do
 
         local letter, patternNum = getLetterNum(nodePattern)
 
         local letter, patternNum = getLetterNum(nodePattern)
   
         if mapEncounterTable[letter] ~= nil and nodePattern ~= "final_form" and nodePattern ~= "post_final_form" then
 
         if mapEncounterTable[letter] ~= nil and nodePattern ~= "final_form" and nodePattern ~= "post_final_form" then
 
             if mw.text.split(nodePattern,"")[2] ~= "_" then
 
             if mw.text.split(nodePattern,"")[2] ~= "_" then
                local patternNum = mw.text.split(mw.text.split(nodePattern,"_")[1],"")[2]
      
                 -- If the second char is not a number, invalid.  
 
                 -- If the second char is not a number, invalid.  
Line 690: Line 686:  
         return "Nil was passed instead of a string"
 
         return "Nil was passed instead of a string"
 
     end
 
     end
 +
end
 +
 +
function p.test()
 +
    return p.encounterTemplate({
 +
        args = {
 +
            ["C_label"] = "C_label",
 +
            ["C1_node_info"] = "C1_node_info",
 +
            ["C1_form"] = "C1_form",
 +
            ["C1_xp"] = "C1_xp",
 +
            ["C1_enemy_air_power"] = "123",
 +
            ["C2_node_info"] = "C2_node_info",
 +
            ["C2_form"] = "C2_form",
 +
            ["C2_xp"] = "C2_xp",
 +
            ["C2_enemy_air_power"] = "123",
 +
            ["ZZ3_label"] = "ZZ3-label",
 +
            ["ZZ3-1_node_info"] = "ZZ3-1_node_info",
 +
            ["ZZ3-1_form"] = "ZZ3-1_form",
 +
            ["ZZ3-1_xp"] = "ZZ3-1_xp",
 +
            ["ZZ3-1_enemy_air_power"] = "123",
 +
            ["ZZ3-2_node_info"] = "ZZ3-2_node_info",
 +
            ["ZZ3-2_form"] = "ZZ3-2_form",
 +
            ["ZZ3-2_xp"] = "ZZ3-2_xp",
 +
            ["ZZ3-2_enemy_air_power"] = "123",
 +
        }
 +
    })
 
end
 
end
    
return p
 
return p
3,663

edits

Navigation menu