Module:Fiche de créature/Fallout
Ce module contient la structure du modèle {{Fiche de créature de Fallout}}.
local localdata = require( 'Module:Infobox/Localdata' )
function resistance(localdata, type)
local sd = localdata[type .. ' sd ']
local rd = localdata[type .. ' rd ']
if not sd or not rd then
return nil
end
return '<span class="avt-infobox-armor-rdsd">' .. sd ..
'</span> · <span class="avt-infobox-armor-rdsd">' ..
rd .. ' %</span>'
end
return {
parts = {
{ type = "table", rows = {
{ type = "row", label = "Nom", icon = "test", value = "nom" },
{ type = "row", label = "Proto ID", icon = "test", value = "id" },
{ type = "row", label = "Points d'expérience", icon = "niveau", value = "niveau" },
{ type = "row", label = "Points de vie", icon = "pv", value = "pv" },
{ type = "row", label = "Vitesse de guérison", icon = "vitesse de guérison", value = "guérison" },
{ type = "row", label = "Classe d'armure", icon = "ca", value = "ca" },
{ type = "row", label = "Séquence", icon = "séquence", value = "séquence" },
{ type = "row", label = "Points d'action", icon = "pa", value = "pa" },
{ type = "row", label = "Dégâts de mêlée", icon = "mêlée", value = "dégâts de mêlée" },
{ type = "row", label = "Chances de critique", icon = "chance", value = "critiques" }
}},
{ type = "table", title = "Résistances ([[Seuil de dégâts|SD]] · [[Résistance aux dégâts|RD]])", rows = {
{ type = "row", label = "Normal", icon = "dégâts", value = function(localdata) return resistance(localdata, "normal") end },
{ type = "row", label = "Laser", icon = "laser", value = function(localdata) return resistance(localdata, "laser") end },
{ type = "row", label = "Feu", icon = "feu", value = function(localdata) return resistance(localdata, "feu") end },
{ type = "row", label = "Plasma", icon = "plasma", value = function(localdata) return resistance(localdata, "plasma") end },
{ type = "row", label = "Électricité", icon = "électricité", value = function(localdata) return resistance(localdata, "électricité") end },
{ type = "row", label = "Explosif", icon = "explosion", value = function(localdata) return resistance(localdata, "explosion") end },
{ type = "row", label = "IEM", icon = "iem", value = function(localdata) return resistance(localdata, "iem") end }
}},
{ type = "list", title = "Attaques", items = {
{ type = "item", value = "attaque1" },
{ type = "item", value = "attaque2" },
{ type = "item", value = "attaque3" },
{ type = "item", value = "attaque4" },
{ type = "item", value = "attaque5" }
}},
{ type = "list", title = "Capacités", items = {
{ type = "item", value = "capacité1" },
{ type = "item", value = "capacité2" },
{ type = "item", value = "capacité3" },
{ type = "item", value = "capacité4" },
{ type = "item", value = "capacité5" }
}}
}
}