Module:SSBC-Calc
Jump to navigation
Jump to search
Documentation for this module may be created at Module:SSBC-Calc/doc
local p = {}
-- Calculate weights
function p.weight(frame)
local value = frame.args[1]
local text = ""
if value < 0.20 then
text = "Balloonweight"
elseif value >= 0.20 and value < 0.21 then
text = "Featherweight"
elseif value >= 0.21 and value < 0.24 then
text = "Lightweight"
elseif value >= 0.24 and value < 0.26 then
text = "Middleweight"
elseif value >= 0.26 and value < 0.30 then
text = "Heavyweight"
elseif value > 0.30 then
text = "Super Heavyweight"
else
text = "Invalid Weight"
end
return text
end
function p.gravity(frame)
local value = frame.args[1]
local text = ""
if value < 0.20 then
text = "Very Low"
elseif value >= 0.20 and value < 0.24 then
text = "Low"
elseif value >= 0.24 and value < 0.25 then
text = "Average"
elseif value >= 0.25 and value < 0.30 then
text = "High"
elseif value >= 0.30 and value < 0.50 then
text = "Very High"
elseif value > 0.50 then
text = "Super High"
else
text = "Invalid Gravity"
end
return text
end
function p.maxJumps(frame)
local value = frame.args[1]
local text = ""
if value < 3 then
local additionalJumps = value - 3
text = additionalJumps .. " Additional Jumps"
elseif value == 3 then
text = "Average"
else
text = "Invalid Max Jumps"
end
return text
end
return p