模块:Jobs
来自小鱼君和他的朋友们
未知职业unknown 未知职业unknown
未知职业unknown 未知职业unknown
未知职业unknown 未知职业unknown
未知职业unknown
Module:Jobs/alias (编辑) • Module:Jobs/colorInfo (编辑) • Module:Jobs/details (编辑) • Module:Jobs/levels (编辑)
local p = {} local getArgs = require('Module:Arguments').getArgs local job = '' local jobCode = { ['弓箭手'] = 'archer', ['archer'] = 'archer', ['arc'] = 'archer' } local jobDetail = { ['unknown'] = { ['name'] = '未知职业', ['color'] = 'unknown', ['prop'] = '', ['level'] = 'n' }, ['archer'] = { ['name'] = '弓箭手', ['color'] = 'red', ['prop'] = '远程物理', ['level'] = 'n' } } function getCode(frame) local args = getArgs(frame) local input = args['job'] or args[1] or 'unknown' input = mw.ustring.lower(input) return jobCode[input] or 'unknown' end job = getCode() function p.main(frame) return jobDetail[job]['name'] .. p.jobColor() end function p.jobColor(frame) return jobDetail[job]['color'] end return p