Module:Stats/REQ/H5G/TEMPLATES

From Halopedia, the Halo wiki

< Module:Stats‎ | REQ
Revision as of 18:12, September 28, 2020 by Dab1001 (talk | contribs)

Documentation for this module may be created at ModuleDoc:Stats/REQ/H5G/TEMPLATES

local strings = require( 'Module:Stats/REQ/H5G/STRINGS' )

local p = {}

function p.powerwep( card, data )
	-- Build the rarity string
	local rarity = strings.rarity( data[ 'rarity' ] )
	if data[ 'mythic' ] then
		rarity = rarity .. ' ' .. strings.rarity( 'mythic' )
	end
	-- Add the fields to the infocard
	card.withField( strings.field( 'category' ), strings.category( data[ 'category' ] ) )
		.withField( strings.field( 'rarity' ), rarity )
		.withField( strings.field( 'energy' ), '{{Energy|' .. data[ 'energy' ] .. '}}' )
		.withField( strings.field( 'rp' ), '{{RP|' .. data[ 'rp' ] .. '}}')
	return
end

return p