Module:Bestiary

local p = {}

local data = mw.loadData('Module:Bestiary/Data')

function p.main

end

function p.filter_list(...) local args = ... local _data = args.list or data local filter_n = type(args.name_filter) == 'function' and args.name_filter or f_yes local filter_l = type(args.level_filter) == 'function' and args.level_filter or f_yes local filter_w = type(args.weakness_filter) == 'function' and args.weakness_filter or f_yes local filter_m = type(args.mems_filter) == 'function' and args.mems_filter or f_yes local ret = {} for _, v in ipairs(_data) do		if filter_n(v.n) and filter_l(v.lvl) and filter_w(v.wk) and filter_m(v.m)		then table.insert(ret,v) end end return ret end

function f_yes return true end

return p