Ce module contient les fonctions permettant de créer des modèles concernant les stats (d'ennemis, objets, etc) de Kingdom Hearts: Re:coded.

Fonction StatsKHR.CategorieEnnemi

Cette fonction détermine à quelles catégories ajouter un ennemi, selon qu'il est un ennemi standard ou un boss et qu'il apparaisse dans Kingdom Hearts: coded ou uniquement Re:coded.

Elle reçoit un paramètre "args", version nettoyée des arguments tirés de l'appel du modèle. Il s'agit d'un tableau contenant les informations reprises dans le tableau ci-dessous.

Arguments Utilisation
KHRboss Indique que l'ennemi est un boss si le paramètre est utilisé
boss Indique que l'ennemi est un boss si le paramètre est utilisé (permet d'utiliser un argument comment si l'ennemi est un boss pour toutes ses apparitions dans la série)
KHR Indique que l'ennemi est exclusif à Kingdom Hearts: Re:coded si le paramètre est utilisé

Fonction StatsKHR.Ennemi

Cette fonction génère le tableau de statistiques d'un ennemi de Re:coded.

Elle reçoit deux paramètres :

  • args, version nettoyée des arguments tirés de l'appel du modèle. Il s'agit d'un tableau contenant les informations reprises dans le tableau ci-dessous.
  • multiples : valeur booléenne indiquant si d'autres tableaux de stats sont utilisés (permet de générer le tabber).
Paramètre Sous-paramètre Utilisation
KHR99niveaux - Indique que l'ennemi a des stats qui dépendent du niveau de Sora
KHRlocBoss 1-4
Fissure
Caractéristique d'un Boss, hors Fissure ou dans une Cyber-fissure, respectivement.
  • Emplacement
  • HP
  • Force
  • Défense
KHRHPBoss
KHRForBoss
KHRDefBoss
KHRHP - Multiplicateur de HP d'un ennemi normal
KHRHPBug - Multiplicateur de HP d'un ennemi buggé
KHREXP - Multiplicateur d'EXP d'un ennemi normal
KHRDef - Multiplicateur de Défense d'un ennemi normal
KHRDefOverride - Valeur de défense d'un ennemi pour lequel le multiplicateur n'est pas d'application
KHRloc 1-10 Lieu où l'ennemi apparaît hors Cyber-fissures et Serrures, et niveau de l'ennemi. L'argument EXP (par ex KHREXP1) permet d'écraser le calcul automatique.
KHRniv
KHREXP
KHRlocFissure 1-21 Fissures (et paliers) où un ennemi apparaît, et niveau de l'ennemi. Les trois autres arguments sont des booléens qui déterminent si l'ennemi apparaît sous forme standard, bug, ou vert. L'argument EXP (par ex KHREXP1) permet d'écraser le calcul automatique.
KHRnivFissure
KHREXPFissure
KHRbaseFissure
KHRbugFissure
KHRvertFissure
KHRloc2D 1-3 Lieu et niveau dans les phases de défilement latéral. L'argument EXP (par ex KHREXP1) permet d'écraser le calcul automatique.
KHRniv2D
KHREXP2D
KHRHP3D 1-4 Caractéristiques dans les phases en 3D.
KHRFor3D
KHRDef3D
KHREXP3D
KHRHPLaby - Multiplicateur de HP dans le labyrinthe du Colisée
KHREXPLaby - Multiplicateur d'EXP dans le labyrinthe du Colisée
KHRDefLaby - Multiplicateur de Défense dans le labyrinthe du Colisée
KHRlocLaby 1-10 Strates du Labyrinthe où l'ennemi apparaît et niveau de l'ennemi.
KHRnivLaby
KHRbrasier - Résistance aux éléments et altérations d'état
KHRglacier
KHRfoudre
KHRrafale
KHRenflammé
KHRgelé
KHRélectrocuté
KHRprojeté
KHRsomni
KHRstop
KHRfolie
KHRétourdissement
KHRaimant
KHRrecomp - Récompenses spéciales laissées par l'ennemi (par exemple un Boss)
KHRrecompOrbes - Orbes laissés par l'ennemi
KHRrecomp Débutant
Standard
Ambitieux
Extrême
2D
3D
Laby
Récompenses laissées par un ennemi standard selon la difficulté où dans les Serrures (défilement horizontal, 3D, Labyrinthe du Colisée)

local StatsKHR = {}

--Informations de niveau de combat
local KHRNiv = {
 ["1"] = {["HP"] = "60", ["EXP"] = "8", ["For"] = "30"},
 ["2"] = {["HP"] = "62", ["EXP"] = "9", ["For"] = "31"},
 ["3"] = {["HP"] = "65", ["EXP"] = "10", ["For"] = "32"},
 ["4"] = {["HP"] = "67", ["EXP"] = "11", ["For"] = "33"},
 ["5"] = {["HP"] = "69", ["EXP"] = "12", ["For"] = "34"},
 ["6"] = {["HP"] = "71", ["EXP"] = "13", ["For"] = "35"},
 ["7"] = {["HP"] = "74", ["EXP"] = "14", ["For"] = "37"},
 ["8"] = {["HP"] = "76", ["EXP"] = "15", ["For"] = "38"},
 ["9"] = {["HP"] = "78", ["EXP"] = "16", ["For"] = "39"},
 ["10"] = {["HP"] = "81", ["EXP"] = "17", ["For"] = "40"},
 ["11"] = {["HP"] = "83", ["EXP"] = "19", ["For"] = "41"},
 ["12"] = {["HP"] = "85", ["EXP"] = "21", ["For"] = "42"},
 ["13"] = {["HP"] = "88", ["EXP"] = "23", ["For"] = "44"},
 ["14"] = {["HP"] = "90", ["EXP"] = "25", ["For"] = "45"},
 ["15"] = {["HP"] = "92", ["EXP"] = "27", ["For"] = "46"},
 ["16"] = {["HP"] = "95", ["EXP"] = "29", ["For"] = "47"},
 ["17"] = {["HP"] = "97", ["EXP"] = "31", ["For"] = "48"},
 ["18"] = {["HP"] = "99", ["EXP"] = "33", ["For"] = "49"},
 ["19"] = {["HP"] = "102", ["EXP"] = "36", ["For"] = "51"},
 ["20"] = {["HP"] = "104", ["EXP"] = "39", ["For"] = "52"},
 ["21"] = {["HP"] = "107", ["EXP"] = "42", ["For"] = "53"},
 ["22"] = {["HP"] = "109", ["EXP"] = "45", ["For"] = "54"},
 ["23"] = {["HP"] = "112", ["EXP"] = "48", ["For"] = "56"},
 ["24"] = {["HP"] = "114", ["EXP"] = "51", ["For"] = "57"},
 ["25"] = {["HP"] = "117", ["EXP"] = "55", ["For"] = "58"},
 ["26"] = {["HP"] = "119", ["EXP"] = "59", ["For"] = "59"},
 ["27"] = {["HP"] = "122", ["EXP"] = "63", ["For"] = "61"},
 ["28"] = {["HP"] = "124", ["EXP"] = "67", ["For"] = "62"},
 ["29"] = {["HP"] = "127", ["EXP"] = "72", ["For"] = "63"},
 ["30"] = {["HP"] = "129", ["EXP"] = "77", ["For"] = "64"},
 ["31"] = {["HP"] = "132", ["EXP"] = "82", ["For"] = "66"},
 ["32"] = {["HP"] = "135", ["EXP"] = "88", ["For"] = "67"},
 ["33"] = {["HP"] = "137", ["EXP"] = "94", ["For"] = "68"},
 ["34"] = {["HP"] = "140", ["EXP"] = "100", ["For"] = "70"},
 ["35"] = {["HP"] = "143", ["EXP"] = "107", ["For"] = "71"},
 ["36"] = {["HP"] = "145", ["EXP"] = "114", ["For"] = "72"},
 ["37"] = {["HP"] = "148", ["EXP"] = "122", ["For"] = "74"},
 ["38"] = {["HP"] = "151", ["EXP"] = "130", ["For"] = "75"},
 ["39"] = {["HP"] = "154", ["EXP"] = "139", ["For"] = "77"},
 ["40"] = {["HP"] = "157", ["EXP"] = "148", ["For"] = "78"},
 ["41"] = {["HP"] = "159", ["EXP"] = "158", ["For"] = "79"},
 ["42"] = {["HP"] = "162", ["EXP"] = "168", ["For"] = "81"},
 ["43"] = {["HP"] = "165", ["EXP"] = "179", ["For"] = "82"},
 ["44"] = {["HP"] = "168", ["EXP"] = "191", ["For"] = "84"},
 ["45"] = {["HP"] = "171", ["EXP"] = "203", ["For"] = "85"},
 ["46"] = {["HP"] = "174", ["EXP"] = "216", ["For"] = "87"},
 ["47"] = {["HP"] = "177", ["EXP"] = "230", ["For"] = "88"},
 ["48"] = {["HP"] = "180", ["EXP"] = "245", ["For"] = "90"},
 ["49"] = {["HP"] = "184", ["EXP"] = "261", ["For"] = "92"},
 ["50"] = {["HP"] = "187", ["EXP"] = "278", ["For"] = "93"},
 ["51"] = {["HP"] = "190", ["EXP"] = "296", ["For"] = "95"},
 ["52"] = {["HP"] = "193", ["EXP"] = "315", ["For"] = "96"},
 ["53"] = {["HP"] = "196", ["EXP"] = "335", ["For"] = "98"},
 ["54"] = {["HP"] = "200", ["EXP"] = "356", ["For"] = "100"},
 ["55"] = {["HP"] = "203", ["EXP"] = "379", ["For"] = "101"},
 ["56"] = {["HP"] = "207", ["EXP"] = "403", ["For"] = "103"},
 ["57"] = {["HP"] = "210", ["EXP"] = "429", ["For"] = "105"},
 ["58"] = {["HP"] = "213", ["EXP"] = "459", ["For"] = "106"},
 ["59"] = {["HP"] = "217", ["EXP"] = "485", ["For"] = "108"},
 ["60"] = {["HP"] = "220", ["EXP"] = "516", ["For"] = "110"},
 ["61"] = {["HP"] = "224", ["EXP"] = "549", ["For"] = "112"},
 ["62"] = {["HP"] = "228", ["EXP"] = "584", ["For"] = "114"},
 ["63"] = {["HP"] = "231", ["EXP"] = "621", ["For"] = "115"},
 ["64"] = {["HP"] = "235", ["EXP"] = "660", ["For"] = "117"},
 ["65"] = {["HP"] = "239", ["EXP"] = "702", ["For"] = "119"},
 ["66"] = {["HP"] = "243", ["EXP"] = "746", ["For"] = "121"},
 ["67"] = {["HP"] = "247", ["EXP"] = "793", ["For"] = "123"},
 ["68"] = {["HP"] = "251", ["EXP"] = "843", ["For"] = "125"},
 ["69"] = {["HP"] = "255", ["EXP"] = "896", ["For"] = "127"},
 ["70"] = {["HP"] = "259", ["EXP"] = "952", ["For"] = "129"},
 ["71"] = {["HP"] = "263", ["EXP"] = "1012", ["For"] = "131"},
 ["72"] = {["HP"] = "267", ["EXP"] = "1076", ["For"] = "133"},
 ["73"] = {["HP"] = "271", ["EXP"] = "1144", ["For"] = "135"},
 ["74"] = {["HP"] = "275", ["EXP"] = "1216", ["For"] = "137"},
 ["75"] = {["HP"] = "279", ["EXP"] = "1292", ["For"] = "139"},
 ["76"] = {["HP"] = "284", ["EXP"] = "1373", ["For"] = "142"},
 ["77"] = {["HP"] = "288", ["EXP"] = "1459", ["For"] = "144"},
 ["78"] = {["HP"] = "292", ["EXP"] = "1551", ["For"] = "146"},
 ["79"] = {["HP"] = "297", ["EXP"] = "1648", ["For"] = "148"},
 ["80"] = {["HP"] = "302", ["EXP"] = "1751", ["For"] = "151"},
 ["81"] = {["HP"] = "306", ["EXP"] = "1861", ["For"] = "153"},
 ["82"] = {["HP"] = "311", ["EXP"] = "1978", ["For"] = "155"},
 ["83"] = {["HP"] = "316", ["EXP"] = "2102", ["For"] = "158"},
 ["84"] = {["HP"] = "320", ["EXP"] = "2234", ["For"] = "160"},
 ["85"] = {["HP"] = "325", ["EXP"] = "2374", ["For"] = "162"},
 ["86"] = {["HP"] = "330", ["EXP"] = "2523", ["For"] = "165"},
 ["87"] = {["HP"] = "335", ["EXP"] = "2681", ["For"] = "167"},
 ["88"] = {["HP"] = "340", ["EXP"] = "2849", ["For"] = "170"},
 ["89"] = {["HP"] = "345", ["EXP"] = "3028", ["For"] = "172"},
 ["90"] = {["HP"] = "350", ["EXP"] = "3218", ["For"] = "175"},
 ["91"] = {["HP"] = "355", ["EXP"] = "3420", ["For"] = "177"},
 ["92"] = {["HP"] = "361", ["EXP"] = "3634", ["For"] = "180"},
 ["93"] = {["HP"] = "366", ["EXP"] = "3862", ["For"] = "183"},
 ["94"] = {["HP"] = "371", ["EXP"] = "4104", ["For"] = "185"},
 ["95"] = {["HP"] = "377", ["EXP"] = "4361", ["For"] = "188"},
 ["96"] = {["HP"] = "382", ["EXP"] = "4634", ["For"] = "191"},
 ["97"] = {["HP"] = "388", ["EXP"] = "4924", ["For"] = "194"},
 ["98"] = {["HP"] = "394", ["EXP"] = "5232", ["For"] = "197"},
 ["99"] = {["HP"] = "400", ["EXP"] = "5559", ["For"] = "200"},
}
--<includeonly>
function StatsKHR.CategorieEnnemi(args) 
    if args["boss"] or args["KHRboss"] then
        if args["KHR"] then return "[[Catégorie:Boss Kingdom Hearts: Re:coded]]" else return "[[Catégorie:Boss Kingdom Hearts: Coded]]" end 
    else
        if args["KHR"] then return "[[Catégorie:Ennemis Kingdom Hearts: Re:coded]]" else return "[[Catégorie:Ennemis Kingdom Hearts: Coded]]" end 
    end
end
--</includeonly>
function StatsKHR.Ennemi(args, multiples)
	local Template=require("Module:Stats/Template")
    local stringBuilder = ""
    if multiples then stringBuilder = stringBuilder .. Template.OpenTab(args, "KHR") end -- Ouvre un tab si nécessaire
    stringBuilder = stringBuilder .. Template.OpenContainer(args["theme"])
    if args["KHRlocBoss1"] ~= nil then
        stringBuilder = stringBuilder .. Template.OpenBox()
        stringBuilder = stringBuilder .. Template.Header("Statistiques",5)
        stringBuilder = stringBuilder .. Template.LabelRow({
            {["label"] = "Monde", ["style"] = "width:40%; padding-left:1em;"},
            {["label"] = 'HP', ["style"] = "width:15%;"},
            {["label"] = "EXP", ["style"] = "width:15%;"},
            {["label"] = "Force", ["style"] = "width:15%;"},
            {["label"] = "Défense", ["style"] = "width:15%;"}
        })
        for i=1,3 do
            if args["KHRlocBoss"..tostring(i)]~= nil then
                stringBuilder = stringBuilder .. Template.DataRow({
                    {["data"] = args["KHRlocBoss"..tostring(i)], ["class"]="textData"},
                    {["data"] = args["KHRHPBoss"..tostring(i)], ["class"]="numberData"},
                    {["data"] = args["KHREXPBoss"..tostring(i)] or "-", ["class"]="numberData"},
                    {["data"] = args["KHRForBoss"..tostring(i)], ["class"]="numberData"},
                    {["data"] = args["KHRDefBoss"..tostring(i)], ["class"]="numberData"},
                })
            end
        end
        stringBuilder = stringBuilder .. Template.CloseContainer()
        stringBuilder = stringBuilder .. Template.ContainerLine()
    end
    if args["KHRloc1"]~= nil then
        stringBuilder = stringBuilder .. Template.OpenBox()
        stringBuilder = stringBuilder .. Template.Header("Statistiques",5)
        stringBuilder = stringBuilder .. Template.LabelRow({
            {["label"] = "Monde", ["style"] = "width:40%; padding-left:1em;"},
            {["label"] = 'HP', ["style"] = "width:15%;"},
            {["label"] = "EXP", ["style"] = "width:15%;"},
            {["label"] = "Force", ["style"] = "width:15%;"},
            {["label"] = "Défense", ["style"] = "width:15%;"}
        })
        for i=1,10 do
            if args["KHRloc"..tostring(i)]~= nil then
                stringBuilder = stringBuilder .. Template.DataRow({
                    {["data"] = args["KHRloc"..tostring(i)], ["class"]="textData"},
                    {["data"] = Template.round(args["KHRHP"]*KHRNiv[args["KHRniv"..tostring(i)]]["HP"]), ["class"]="numberData"},
                    {["data"] = Template.round(args["KHREXP"]*KHRNiv[args["KHRniv"..tostring(i)]]["EXP"]), ["class"]="numberData"},
                    {["data"] = KHRNiv[args["KHRniv"..tostring(i)]]["For"], ["class"]="numberData"},
                    {["data"] = (args["KHRDefOverride"] or Template.round(args["KHRDef"]*KHRNiv[args["KHRniv"..tostring(i)]]["For"])), ["class"]="numberData"},
                })
            end
        end
        stringBuilder = stringBuilder .. Template.CloseContainer()
        stringBuilder = stringBuilder .. Template.ContainerLine()
    end
    if args["KHRlocBossFissure"] ~= nil then
        stringBuilder = stringBuilder .. Template.OpenBox()
        stringBuilder = stringBuilder .. Template.Header("Statistiques (Cyber-fissures)",4)
        stringBuilder = stringBuilder .. Template.LabelRow({
            {["label"] = "Fissure", ["style"] = "width:43%; padding-left:1em;"},
            {["label"] = 'HP', ["style"] = "width:19%;"},
            {["label"] = "Force", ["style"] = "width:19%;"},
            {["label"] = "Défense", ["style"] = "width:19%;"}
        })
        stringBuilder = stringBuilder .. Template.DataRow({
            {["data"] = args["KHRlocBossFissure"], ["class"]="textData"},
            {["data"] = args["KHRHPBossFissure"], ["class"]="numberData"},
            {["data"] = args["KHRForBossFissure"], ["class"]="numberData"},
            {["data"] = args["KHRDefBossFissure"], ["class"]="numberData"},
        })
        stringBuilder = stringBuilder .. Template.CloseContainer()
        stringBuilder = stringBuilder .. Template.ContainerLine()
    end
    if args["KHRlocFissure1"] ~= nil then
        stringBuilder = stringBuilder .. Template.OpenBox()
        stringBuilder = stringBuilder .. Template.Header("Statistiques (Cyber-fissures)",6)
        stringBuilder = stringBuilder .. Template.LabelRow({
            {["label"] = "Fissure", ["style"] = "width:50%; padding-left:1em;"},
            {["label"] = "Type", ["style"] = "width:10%; padding-left:0.4em;"},
            {["label"] = 'HP', ["style"] = "width:10%;"},
            {["label"] = "EXP", ["style"] = "width:10%;"},
            {["label"] = "Force", ["style"] = "width:10%;"},
            {["label"] = "Défense", ["style"] = "width:10%;"}
        })
        for i=1,21 do
            if args["KHRlocFissure"..tostring(i)]~= nil then
                local rowspan = (args["KHRbaseFissure"..tostring(i)] and 1 or 0) + (args["KHRbugFissure"..tostring(i)] and 1 or 0) + (args["KHRvertFissure"..tostring(i)] and 1 or 0)
                if args["KHRbaseFissure"..tostring(i)]~= nil then 
                    stringBuilder = stringBuilder .. Template.DataRow({
                        {["data"] = args["KHRlocFissure"..tostring(i)], ["class"]="textData", ["rowspan"] = rowspan},
                        {["data"] = "Base", ["class"]="textData"},
                        {["data"] = Template.round(args["KHRHP"]*KHRNiv[args["KHRnivFissure"..tostring(i)]]["HP"]), ["class"]="numberData"},
                        {["data"] = Template.round((args["KHREXPFissure"..tostring(i)] or args["KHREXP"])*KHRNiv[args["KHRnivFissure"..tostring(i)]]["EXP"]), ["class"]="numberData"},
                        {["data"] = KHRNiv[args["KHRnivFissure"..tostring(i)]]["For"], ["class"]="numberData"},
                        {["data"] = (args["KHRDefOverride"] or Template.round(args["KHRDef"]*KHRNiv[args["KHRnivFissure"..tostring(i)]]["For"])), ["class"]="numberData"},
                    })
                end
                if args["KHRbugFissure"..tostring(i)]~= nil then 
                    if args["KHRbaseFissure"..tostring(i)]== nil then
                        stringBuilder = stringBuilder .. Template.DataRow({
                            {["data"] = args["KHRlocFissure"..tostring(i)], ["class"]="textData", ["rowspan"] = rowspan},
                            {["data"] = "Bug", ["class"]="textData"},
                            {["data"] = Template.round(args["KHRHPBug"]*KHRNiv[args["KHRnivFissure"..tostring(i)]]["HP"]), ["class"]="numberData"},
                            {["data"] = Template.round((args["KHREXPFissure"..tostring(i)] or args["KHREXP"])*KHRNiv[args["KHRnivFissure"..tostring(i)]]["EXP"]), ["class"]="numberData"},
                            {["data"] = KHRNiv[args["KHRnivFissure"..tostring(i)]]["For"], ["class"]="numberData"},
                            {["data"] = (args["KHRDefOverride"] or Template.round(args["KHRDef"]*KHRNiv[args["KHRnivFissure"..tostring(i)]]["For"])), ["class"]="numberData"},
                        })
                    else
                        stringBuilder = stringBuilder .. Template.DataRow({
                            {["data"] = "Bug", ["class"]="textData"},
                            {["data"] = Template.round(args["KHRHPBug"]*KHRNiv[args["KHRnivFissure"..tostring(i)]]["HP"]), ["class"]="numberData"},
                            {["data"] = Template.round((args["KHREXPFissure"..tostring(i)] or args["KHREXP"])*KHRNiv[args["KHRnivFissure"..tostring(i)]]["EXP"]), ["class"]="numberData"},
                            {["data"] = KHRNiv[args["KHRnivFissure"..tostring(i)]]["For"], ["class"]="numberData"},
                            {["data"] = (args["KHRDefOverride"] or Template.round(args["KHRDef"]*KHRNiv[args["KHRnivFissure"..tostring(i)]]["For"])), ["class"]="numberData"},
                        })
                    end
                end
                if args["KHRvertFissure"..tostring(i)]~= nil then
                    if (args["KHRbugFissure"..tostring(i)]== nil and args["KHRbaseFissure"..tostring(i)]== nil) then
                        stringBuilder = stringBuilder .. Template.DataRow({
                            {["data"] = args["KHRlocFissure"..tostring(i)], ["class"]="textData", ["rowspan"] = rowspan},
                            {["data"] = "Vert", ["class"]="textData"},
                            {["data"] = Template.round(2*args["KHRHPBug"]*KHRNiv[args["KHRnivFissure"..tostring(i)]]["HP"]), ["class"]="numberData"},
                            {["data"] = Template.round((args["KHREXPFissure"..tostring(i)] or args["KHREXP"])*KHRNiv[args["KHRnivFissure"..tostring(i)]]["EXP"]), ["class"]="numberData"},
                            {["data"] = KHRNiv[args["KHRnivFissure"..tostring(i)]]["For"], ["class"]="numberData"},
                            {["data"] = (args["KHRDefOverride"] or Template.round(1.25*args["KHRDef"]*KHRNiv[args["KHRnivFissure"..tostring(i)]]["For"])), ["class"]="numberData"},
                        })
                    else
                        stringBuilder = stringBuilder .. Template.DataRow({
                            {["data"] = "Vert", ["class"]="textData"},
                            {["data"] = Template.round(2*args["KHRHPBug"]*KHRNiv[args["KHRnivFissure"..tostring(i)]]["HP"]), ["class"]="numberData"},
                            {["data"] = Template.round((args["KHREXPFissure"..tostring(i)] or args["KHREXP"])*KHRNiv[args["KHRnivFissure"..tostring(i)]]["EXP"]), ["class"]="numberData"},
                            {["data"] = KHRNiv[args["KHRnivFissure"..tostring(i)]]["For"], ["class"]="numberData"},
                            {["data"] = (args["KHRDefOverride"] or Template.round(1.25*args["KHRDef"]*KHRNiv[args["KHRnivFissure"..tostring(i)]]["For"])), ["class"]="numberData"},
                        })
                    end
                end
            end
        end
        stringBuilder = stringBuilder .. Template.CloseContainer()
        stringBuilder = stringBuilder .. Template.ContainerLine()
    end
    if args["KHR99niveaux"] ~= nil then
        stringBuilder = stringBuilder .. Template.OpenBox()
        stringBuilder = stringBuilder .. Template.Header("Statistiques (Selon le niveau de Digital-Sora)",1)
        local divisions = {1,26,51,76,100}
        for k = 1,4 do
            stringBuilder = stringBuilder .. Template.ContainerLine()
            stringBuilder = stringBuilder .. Template.OpenBox("collapsible collapsed")
            stringBuilder = stringBuilder .. Template.Separator("Niveaux "..tostring(divisions[k]).."-"..tostring(divisions[k+1]-1),5)
            stringBuilder = stringBuilder .. Template.LabelRow({
                {["label"] = "Niveau", ["style"] = "width:20%; padding-left:1em;"},
                {["label"] = 'HP', ["style"] = "width:20%;"},
                {["label"] = "EXP", ["style"] = "width:20%;"},
                {["label"] = "Force", ["style"] = "width:20%;"},
                {["label"] = "Défense", ["style"] = "width:20%;"}
            })
            for i=divisions[k],(divisions[k+1]-1) do
                stringBuilder = stringBuilder .. Template.DataRow({
                    {["data"] = i, ["class"]="textData"},
                    {["data"] = Template.round(args["KHRHP"]*KHRNiv[tostring(i)]["HP"]), ["class"]="numberData"},
                    {["data"] = Template.round(args["KHREXP"]*KHRNiv[tostring(i)]["EXP"]), ["class"]="numberData"},
                    {["data"] = KHRNiv[tostring(i)]["For"], ["class"]="numberData"},
                    {["data"] = (args["KHRDefOverride"] or Template.round(args["KHRDef"]*KHRNiv[tostring(i)]["For"])), ["class"]="numberData"},
                })
            end
            stringBuilder = stringBuilder .. Template.CloseContainer()
        end
        stringBuilder = stringBuilder .. Template.CloseContainer()
        stringBuilder = stringBuilder .. Template.ContainerLine()
    end
    if args["KHRloc2D1"] ~= nil or args["KHRloc3D1"] ~= nil or args["KHRlocLaby1"] ~= nil then
        stringBuilder = stringBuilder .. Template.OpenBox()
        stringBuilder = stringBuilder .. Template.Header("Statistiques (Serrures)",5)
        stringBuilder = stringBuilder .. Template.LabelRow({
            {["label"] = "Lieu", ["style"] = "width:40%; padding-left:1em;"},
            {["label"] = 'HP', ["style"] = "width:15%;"},
            {["label"] = "EXP", ["style"] = "width:15%;"},
            {["label"] = "Force", ["style"] = "width:15%;"},
            {["label"] = "Défense", ["style"] = "width:15%;"}
        })
        if args["KHRloc2D1"] ~= nil then
            stringBuilder = stringBuilder .. Template.Separator("Défilement latéral", 5)
            for i=1,3 do
                if args["KHRloc2D"..tostring(i)] then
                    stringBuilder = stringBuilder .. Template.DataRow({
                        {["data"] = args["KHRloc2D"..tostring(i)], ["class"]="textData"},
                        {["data"] = Template.round(args["KHRHP"]*KHRNiv[args["KHRniv2D"..tostring(i)]]["HP"]), ["class"]="numberData"},
                        {["data"] = Template.round(args["KHREXP"]*KHRNiv[args["KHRniv2D"..tostring(i)]]["EXP"]), ["class"]="numberData"},
                        {["data"] = KHRNiv[args["KHRniv2D"..tostring(i)]]["For"], ["class"]="numberData"},
                        {["data"] = (args["KHRDefOverride"] or Template.round(args["KHRDef"]*KHRNiv[args["KHRniv2D"..tostring(i)]]["For"])), ["class"]="numberData"},
                    })
                end
            end
        end
        if args["KHRloc3D1"] ~= nil then
            stringBuilder = stringBuilder .. Template.Separator("3D", 5)
            for i=1,4 do
                if args["KHRloc3D"..tostring(i)] then
                    stringBuilder = stringBuilder .. Template.DataRow({
                        {["data"] = args["KHRloc3D"..tostring(i)], ["class"]="textData"},
                        {["data"] = args["KHRHP3D"..tostring(i)], ["class"]="numberData"},
                        {["data"] = args["KHREXP3D"..tostring(i)], ["class"]="numberData"},
                        {["data"] = args["KHRFor3D"..tostring(i)], ["class"]="numberData"},
                        {["data"] = args["KHRDef3D"..tostring(i)], ["class"]="numberData"},
                    })
                end
            end
        end
        if args["KHRlocLaby1"] ~= nil then
            stringBuilder = stringBuilder .. Template.Separator("Labyrinthe", 5)
            for i=1,10 do
                if args["KHRlocLaby"..tostring(i)] then
                    stringBuilder = stringBuilder .. Template.DataRow({
                        {["data"] = args["KHRlocLaby"..tostring(i)], ["class"]="textData"},
                        {["data"] = Template.round(args["KHRHPLaby"]*KHRNiv[args["KHRnivLaby"..tostring(i)]]["HP"]), ["class"]="numberData"},
                        {["data"] = Template.round(args["KHREXPLaby"]*KHRNiv[args["KHRnivLaby"..tostring(i)]]["EXP"]), ["class"]="numberData"},
                        {["data"] = KHRNiv[args["KHRnivLaby"..tostring(i)]]["For"], ["class"]="numberData"},
                        {["data"] = (args["KHRDefOverride"] or Template.round(args["KHRDefLaby"]*KHRNiv[args["KHRnivLaby"..tostring(i)]]["For"])), ["class"]="numberData"},
                    })
                end
            end
        end
        stringBuilder = stringBuilder .. Template.CloseContainer()
        stringBuilder = stringBuilder .. Template.ContainerLine()
    end
    stringBuilder = stringBuilder .. Template.OpenBox()
    stringBuilder = stringBuilder .. Template.Header("Faiblesses/Résistances",4)
    stringBuilder = stringBuilder .. Template.LabelRow({
        {["label"] = "Brasier", ["style"] = "width:25%"},
        {["label"] = "Glacier", ["style"] = "width:25%"},
        {["label"] = "Foudre", ["style"] = "width:25%"},
        {["label"] = "Rafale", ["style"] = "width:25%"},
    })
    stringBuilder = stringBuilder .. Template.DataRow({
        {["data"] = args["KHRbrasier"] or "x1.0", ["class"]="numberData"},
        {["data"] = args["KHRglacier"] or "x1.0", ["class"]="numberData"},
        {["data"] = args["KHRfoudre"] or "x1.0", ["class"]="numberData"},
        {["data"] = args["KHRrafale"] or "x1.0", ["class"]="numberData"},
    })
    stringBuilder = stringBuilder .. Template.CloseContainer()
    stringBuilder = stringBuilder .. Template.ContainerLine()
    stringBuilder = stringBuilder .. Template.OpenBox()
    stringBuilder = stringBuilder .. Template.Header("Altérations d'état",3)
    stringBuilder = stringBuilder .. Template.LabelRow({
        {["label"] = "Enflammé", ["style"] = "width:33%"},
        {["label"] = "Gelé", ["style"] = "width:33%"},
        {["label"] = "Électrocuté", ["style"] = "width:33%"},
    })
    stringBuilder = stringBuilder .. Template.DataRow({
        {["data"] = args["KHRenflammé"] or "O", ["class"]="numberData"},
        {["data"] = args["KHRgelé"] or "O", ["class"]="numberData"},
        {["data"] = args["KHRélectrocuté"] or "O", ["class"]="numberData"},
    })
    stringBuilder = stringBuilder .. Template.LabelRow({
        {["label"] = "Projeté"},
        {["label"] = "Somni"},
        {["label"] = "Stop"},
    })
    stringBuilder = stringBuilder .. Template.DataRow({
        {["data"] = args["KHRprojeté"] or "O", ["class"]="numberData"},
        {["data"] = args["KHRsomni"] or "O", ["class"]="numberData"},
        {["data"] = args["KHRstop"] or "O", ["class"]="numberData"},
    })
    stringBuilder = stringBuilder .. Template.LabelRow({
        {["label"] = "Folie"},
        {["label"] = "Étourdissement"},
        {["label"] = "Aimant"},
    })
    stringBuilder = stringBuilder .. Template.DataRow({
        {["data"] = args["KHRfolie"] or "O", ["class"]="numberData"},
        {["data"] = args["KHRétourdissement"] or "O", ["class"]="numberData"},
        {["data"] = args["KHRaimant"] or "O", ["class"]="numberData"},
    })
    stringBuilder = stringBuilder .. Template.CloseContainer()
    if args["KHRrecomp"] ~= nil or args["KHRrecompOrbes"] ~= nil or args["KHRrecompDébutant"] ~= nil or args["KHRrecomp2D"] ~= nil or args["KHRrecomp3D"]~= nil or args["KHRrecompLaby"] ~= nil then
        stringBuilder = stringBuilder .. Template.ContainerLine()
        stringBuilder = stringBuilder .. Template.OpenBox()
        stringBuilder = stringBuilder .. Template.Header("Récompenses",4)
        if args["KHRrecomp"] ~= nil then
            stringBuilder = stringBuilder .. Template.DataRow({
                {["data"] = args["KHRrecomp"], ["class"]="textData", ["colspan"]=4}
            })
        end
        if args["KHRrecompOrbes"] ~= nil then
            stringBuilder = stringBuilder .. Template.MixedRow({
                {["label"] = 1, ["text"]="Orbes"},
                {["text"] = args["KHRrecompOrbes"], ["class"]="textData", ["colspan"]=3}
            })
        end
        if args["KHRrecompDébutant"] ~= nil then
            stringBuilder = stringBuilder .. Template.LabelRow({
                {["label"] = "Mode Débutant", ["style"]="width:25%;"},
                {["label"] = "Mode Standard", ["style"]="width:25%;"},
                {["label"] = "Mode Ambitieux", ["style"]="width:25%;"},
                {["label"] = "Mode Extrême", ["style"]="width:25%;"},
            })
            stringBuilder = stringBuilder .. Template.DataRow({
                {["data"] = args["KHRrecompDébutant"], ["class"]="textData"},
                {["data"] = args["KHRrecompStandard"], ["class"]="textData"},
                {["data"] = args["KHRrecompAmbitieux"], ["class"]="textData"},
                {["data"] = args["KHRrecompExtrême"], ["class"]="textData"},
            })
        end
        if args["KHRrecomp2D"] ~= nil or args["KHRrecomp3D"]~= nil or args["KHRrecompLaby"] ~= nil then
            stringBuilder = stringBuilder .. Template.Separator("Récompenses dans les Serrures",4)
            if args["KHRrecomp2D"] ~= nil then
                stringBuilder = stringBuilder .. Template.MixedRow({
                    {["label"]=1, ["text"] = "Défilement latéral"},
                    {["text"] = args["KHRrecomp2D"], ["colspan"]=3}
                })
            end
            if args["KHRrecomp3D"]~= nil then
                stringBuilder = stringBuilder .. Template.MixedRow({
                    {["label"]=1, ["text"] = "3D"},
                    {["text"] = args["KHRrecomp3D"], ["colspan"]=3}
                })
            end
            if args["KHRrecompLaby"] ~= nil then
                stringBuilder = stringBuilder .. Template.MixedRow({
                    {["label"]=1, ["text"] = "Labyrinthe"},
                    {["text"] = args["KHRrecompLaby"], ["colspan"]=3}
                })
            end
        end
        stringBuilder = stringBuilder .. Template.CloseContainer()
    end
    stringBuilder = stringBuilder .. Template.CloseFinal()
    if multiples then stringBuilder = stringBuilder .. Template.CloseTab() end -- Ferme un tab si nécessaire
    return stringBuilder
end

return StatsKHR
Sauf mention contraire, le contenu de la communauté est disponible sous licence CC-BY-SA.