Module:AbilityFromBrand/new

From Inkipedia, the Splatoon wiki
< Module:AbilityFromBrand
Revision as of 06:00, 9 March 2024 by Exaskliri (talk | contribs) (forgot to initialize p={} (cardinal mistake))

Documentation for this module may be created at Module:AbilityFromBrand/new/doc

local p = {}

local brandsAbilityTable = {
	["S"]	= {
		["Firefin"]	=	{
			{5,		"Ink Saver (Sub)"},
			{0.5,	"Ink Recovery Up"},
		},
		["Forge"]	=	{
			{5,		"Special Duration Up"},
			{0.5,	"Ink Saver (Sub)"},
		},
		["Inkline"]	=	{
			{5,		"Defense Up"},
			{0.5,	"Damage Up"},
		},
		["Krak-On"]	=	{
			{5,		"Swim Speed Up"},
			{0.5,	"Defense Up"},
		},
		["Rockenberg"]	=	{
			{5,		"Run Speed Up"},
			{0.5,	"Swim Speed Up"},
		},
		["Skalop"]	=	{
			{5,		"Quick Respawn"},
			{0.5,	"Special Saver"},
		},
		["Splash Mob"]	=	{
			{5,		"Ink Saver (Main)"},
			{0.5,	"Run Speed Up"},
		},
		["SquidForce"]	=	{
			{5,		"Damage Up"},
			{0.5,	"Ink Saver (Main)"},
		},
		["Takoroka"]	=	{
			{5,		"Special Charge Up"},
			{0.5,	"Special Duration Up"},
		},
		["Tentatek"]	=	{
			{5,		"Ink Recovery Up"},
			{0.5,	"Quick Super Jump"},
		},
		["Zekko"]	=	{
			{5,		"Special Saver"},
			{0.5,	"Special Charge Up"},
		},
		["Zink"]	=	{
			{5,		"Quick Super Jump"},
			{0.5,	"Quick Respawn"},
		},
	},
	["S2"]	= {
		
	},
	["S3"]	= {
		
	},
}

function p.requireFromModule(frame)
	return p.getFavoredAbility(
		string.upper(frame.game),
		frame.brand
	)
end

function p.invokeFromTemplate(frame)
	return p.getFavoredAbility(
		string.upper(frame:getParent().args.game),
		frame:getParent().args.brand
	)
end

function p.getFavoredAbility(game, brand)
	return brandsAbilityTable[game][brand]
end

return p