WIKI公告栏
欢迎各位引航者访问卡拉彼丘WIKI,由于游客访问页面会有一定的页面旧版缓存,建议你登陆B站账号进行浏览,如果您觉得本WIKI有帮助到你,欢迎推荐给身边的引航者。
全站通知:

模块:角色礼物

来自卡拉彼丘WIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索

local p = {}

local data = mw.loadData("Module:角色礼物/Data")

--角色页面礼物好感
p["角色礼物好感"] = function(frame)
    local name = frame.args[1]
    local a = require("Module:ACandy")
    local resultList = {}

    for value, rolename in pairs(data) do
        local rolegiftsHTML = tostring(a.tr {
            a.td { style = "text-align: center;", a.Raw("[[文件:"), rolename.File, a.Raw("|70px|link=]]"),
                a.br, a.Raw("'''"), rolename.Name , a.Raw("'''") },
            a.td { class = "visible-md visible-sm visible-lg", rolename.Desc_string },
            a.td { style = "text-align: center;", a.Raw(
                frame:expandTemplate { title = "稀有度标签", args = { rolename.Quality } }) },
            a.td { rolename.Favorability[name] }
        })
        table.insert(resultList, rolegiftsHTML)
    end
    local result = table.concat(resultList)
    return result
end


--誓约页面礼物好感表
p["礼物好感表"] = function(frame)
    local a = require("Module:ACandy")

    local resultList = {}

    for value, rolegifts in pairs(data) do
        local rolegiftsHTML = tostring(a.tr {
            a.td { style = "text-align: center;", a.Raw("[[文件:"), rolegifts.File, a.Raw("|70px|link=]]"),
                a.br, a.Raw("'''"), rolegifts.Name , a.Raw("'''") },
            a.td { class = "visible-md visible-sm visible-lg", rolegifts.Desc_string },
            a.td { style = "text-align: center;", a.Raw(
                frame:expandTemplate { title = "稀有度标签", args = { rolegifts.Quality } }) },
            a.td { rolegifts.Favorability["米雪儿·李"] },
            a.td { rolegifts.Favorability["奥黛丽"] },
            a.td { rolegifts.Favorability["星绘"] },
            a.td { rolegifts.Favorability["拉薇"] },
            a.td { rolegifts.Favorability["心夏"] },
            a.td { rolegifts.Favorability["玛德蕾娜"] },
            a.td { rolegifts.Favorability["伊薇特"] },
            a.td { rolegifts.Favorability["香奈美"] }
        })
        table.insert(resultList, rolegiftsHTML)
    end
    local result = table.concat(resultList)
    return result
end

return p