Module:CalculatedStats: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 50: Line 50:
local stats = { "atk", "acc", "def", "eva", "matk", "mefc" }
local stats = { "atk", "acc", "def", "eva", "matk", "mefc" }
local additionalOutput = ""
local additionalOutput = ""
for i, stat in ipairs(stats) do --Manual override
for i, stat in ipairs(stats) do --Manual override
if args[stat] then
if args[stat] then
statTable[stat] = args[stat]
statTable[stat] = args[stat]
Line 116: Line 116:
mefc = intelligence + math.floor(magic / 4)
mefc = intelligence + math.floor(magic / 4)
}
}
return outputCells6(statTable["atk"],statTable["acc"],statTable["def"],statTable["eva"],statTable["matk"],statTable["mefc"])
local stats = { "atk", "acc", "def", "eva", "matk", "mefc" }
local additionalOutput = ""
for i, stat in ipairs(stats) do --Add category
if args[stat] then
additionalOutput = "[[Category:Pages with manually inputted calcuated stats]]"
end
end
return outputCells6(statTable["atk"],statTable["acc"],statTable["def"],statTable["eva"],statTable["matk"],statTable["mefc"]) .. additionalOutput
end
end


Line 150: Line 157:
else
else
return frame:expandTemplate{ title = "tt", args = { statTable[stat], "Sega Saturn" } } .. "/" .. frame:expandTemplate{ title = "tt", args = { statTable[stat.."PSP"], "PlayStation Portable" } }
return frame:expandTemplate{ title = "tt", args = { statTable[stat], "Sega Saturn" } } .. "/" .. frame:expandTemplate{ title = "tt", args = { statTable[stat.."PSP"], "PlayStation Portable" } }
end
end
local stats = { "atk", "acc", "def", "eva", "matk", "mdef" }
local additionalOutput = ""
for i, stat in ipairs(stats) do --Add category
if args[stat] then
additionalOutput = "[[Category:Pages with manually inputted calcuated stats]]"
end
end
end
end
Line 159: Line 173:
local outputMdef = bothPlatsValue("mdef")
local outputMdef = bothPlatsValue("mdef")


return outputCells6(outputAtk,outputAcc,outputDef,outputEva,outputMatk,outputMdef)
return outputCells6(outputAtk,outputAcc,outputDef,outputEva,outputMatk,outputMdef) .. additionalOutput
end
end


Line 187: Line 201:
end
end
end
end
return outputCells6(statTable["patk"],statTable["phit"],statTable["matk"],statTable["mhit"],statTable["def"],statTable["eva"]) .. additionalOutput
return outputCells6(statTable["patk"],statTable["phit"],statTable["matk"],statTable["mhit"],statTable["def"],statTable["eva"]) .. additionalOutput
end
end


Line 249: Line 263:
local stats = { "atk", "acc", "pdef", "peva", "matk", "msuc", "mdef" }
local stats = { "atk", "acc", "pdef", "peva", "matk", "msuc", "mdef" }
local additionalOutput = ""
local additionalOutput = ""
for i, stat in ipairs(stats) do --Manual override
for i, stat in ipairs(stats) do --Manual override
if args[stat] then
if args[stat] then
statTable[stat] = args[stat]
statTable[stat] = args[stat]
Line 255: Line 269:
end
end
end
end
return outputCells7(statTable["atk"],statTable["acc"],statTable["pdef"],statTable["peva"],statTable["matk"],statTable["msuc"],statTable["mdef"]) .. additionalOutput
return outputCells7(statTable["atk"],statTable["acc"],statTable["pdef"],statTable["peva"],statTable["matk"],statTable["msuc"],statTable["mdef"]) .. additionalOutput
end
end


return p
return p

Navigation menu