Module:FightingMove

local color = require('Module:Color')._main local getArgs = require('Module:Arguments').main local split = require('Module:Utils').split

local p = {} local framedict = { ["shift"] = color({"shift"}), ["stun"] = color({"stun"}), ["knockdown"] = color({"knockdown"}), ["launch"] = color({"launch"}), ["crumple"] = color({"crumple"}) } local propertydict = { ["throw crush"] = "Throw Crush", ["dash cancelable"] = "Dash Cancelable", ["jump cancelable"] = "Jump Cancelable", ["special cancelable"] = "Special Cancelable", ["pierce"] = "Pierce" }

--Organizes different frame data colors function p.framedatacolors(frame) local args = getArgs(frame.args) local arg1 = tonumber(args[1]) local reaction = string.lower(args[1]) local framecolor if framedict[reaction] then framecolor = framedict[reaction] return framecolor else if args[2] == "startup" then if arg1 > 23 then framecolor = color({"veryslow"}) elseif arg1 <= 23 and arg1 > 19 then framecolor = color({"heavy"}) elseif arg1 <= 19 and arg1 > 15 then framecolor = color({"medium"}) elseif arg1 <= 15 and arg1 > 11 then framecolor = color({"jab"}) elseif arg1 <= 11 then framecolor = color({"fast"}) end else if arg1 < -18 then framecolor = color({"punish"}) elseif arg1 >= -18 and arg1 < -12 then framecolor = color({"punishjab"}) elseif arg1 >= -12 and arg1 < -8 then framecolor = color({"punishgrab"}) elseif arg1 >= -8 and arg1 < -4 then framecolor = color({"unsafe"}) elseif arg1 >= -4 and arg1 < -1 then framecolor = color({"unsafemild"}) elseif arg1 == 0 then framecolor = color({"even"}) elseif arg1 > 0 then framecolor = color({"safe"}) end end return framecolor end end

function p.propertynames(frame) local args = getArgs(frame.args) local prop = string.lower(args[1]) local proplist = split(prop, ",") for key,value in pairs(proplist) do       if value ~= "" then if propertydict[value] then proplist[key] = propertydict[value] end end end return table.concat(proplist, ",") end

return p