FANDOM


local p = {}
 
function p._attr (attr)
    local attrClass = ''
    local switch = {
        ['水'] = function ()
            attrClass = 'class="attr-w"'
        end,
        ['火'] = function ()
            attrClass = 'class="attr-f"'
        end,
        ['木'] = function ()
            attrClass = 'class="attr-e"'
        end,
        ['光'] = function ()
            attrClass = 'class="attr-l"'
        end,
        ['暗'] = function ()
            attrClass = 'class="attr-d"'
        end,
    }
    if switch[attr] then
        switch[attr]()
    end
    return attrClass
end
 
function p.attr (frame)
    local attr = frame.args[1]
    return p._attr (attr)
end
 
return p
除了特别提示,社区内容遵循CC-BY-SA 授权许可。