Module:Hero

From Heroes 3 wiki
Jump to navigation Jump to search

1 hero. 2 heroes.


local p = {};

function p.plural(frame)
	local num_heroes = tonumber(frame.args.count)
	local conj_heroes = num_heroes == 1 and 'hero' or 'heroes'
    return conj_heroes
end

return p