Line 144: |
Line 144: |
| if values[1]["isFinalForm"] ~= nil then | | if values[1]["isFinalForm"] ~= nil then |
| text = "<span style='color:red'>" .. text .."<br>" .. "Final Form</span>" | | text = "<span style='color:red'>" .. text .."<br>" .. "Final Form</span>" |
| + | end |
| + | if values[1]["isPostFinalForm"] ~= nil then |
| + | text = "<span style='color:blue'>" .. text .."<br>" .. "Post-Clear Only Form</span>" |
| end | | end |
| firstRow:node(mw.html.create("td"):wikitext(text)):css("text-align","center") | | firstRow:node(mw.html.create("td"):wikitext(text)):css("text-align","center") |
Line 207: |
Line 210: |
| if values[i]["isFinalForm"] ~= nil then | | if values[i]["isFinalForm"] ~= nil then |
| text = "<span style='color:red'>" .. text .."<br>" .. "Final Form</span>" | | text = "<span style='color:red'>" .. text .."<br>" .. "Final Form</span>" |
| + | end |
| + | if values[i]["isPostFinalForm"] ~= nil then |
| + | text = "<span style='color:blue'>" .. text .."<br>" .. "Post-Clear Only Form</span>" |
| end | | end |
| row:node(mw.html.create("td"):wikitext(text)):css("text-align","center") | | row:node(mw.html.create("td"):wikitext(text)):css("text-align","center") |
Line 298: |
Line 304: |
| -- map all the nodes we'll be using into mapEncounterTable -> {"A":true,"B"=true} etc | | -- map all the nodes we'll be using into mapEncounterTable -> {"A":true,"B"=true} etc |
| for k,v in pairs(frame.args) do | | for k,v in pairs(frame.args) do |
− | if string.lower(k) ~= "boss_node" and string.lower(k) ~= "final_form" then | + | if string.lower(k) ~= "boss_node" and string.lower(k) ~= "final_form" and string.lower(k) ~= "post_final_form" then |
| local letter = mw.text.split(k,"")[1] | | local letter = mw.text.split(k,"")[1] |
| local num = mw.text.split(k,"")[2] | | local num = mw.text.split(k,"")[2] |
Line 327: |
Line 333: |
| for nodePattern,patternInfo in pairs(frame.args) do | | for nodePattern,patternInfo in pairs(frame.args) do |
| local letter = mw.text.split(nodePattern,"")[1] | | local letter = mw.text.split(nodePattern,"")[1] |
− | if mapEncounterTable[letter] ~= nil and nodePattern ~= "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] | | 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. |
− | if tonumber(patternNum) == nil and nodePattern ~= "final_form" then | + | if tonumber(patternNum) == nil and nodePattern ~= "final_form" and nodePattern ~= "post_final_form" then |
| --return patternNum | | --return patternNum |
| return "<span style='color:red'>Please check your module invocation arguments. Something is invalid</span>" | | return "<span style='color:red'>Please check your module invocation arguments. Something is invalid</span>" |
Line 383: |
Line 389: |
| if mapEncounterTable[nodeLetter][patternNum] ~= nil then | | if mapEncounterTable[nodeLetter][patternNum] ~= nil then |
| mapEncounterTable[nodeLetter][patternNum]["isFinalForm"] = true | | mapEncounterTable[nodeLetter][patternNum]["isFinalForm"] = true |
| + | end |
| + | end |
| + | end |
| + | end |
| + | end |
| + | if frame.args["post_final_form"] ~= nil then |
| + | local nodeAndPatterns = mw.text.split(frame.args["post_final_form"]," ") |
| + | for _,nodePattern in pairs(nodeAndPatterns) do |
| + | local nodeLetter = mw.text.split(nodePattern,"")[1] |
| + | if validNodeLetters[nodeLetter] then |
| + | local patternNum = mw.text.split(nodePattern,"")[2] |
| + | if tonumber(patternNum) ~= nil then |
| + | patternNum = tonumber(patternNum) |
| + | if mapEncounterTable[nodeLetter][patternNum] ~= nil then |
| + | mapEncounterTable[nodeLetter][patternNum]["isPostFinalForm"] = true |
| end | | end |
| end | | end |