« Module:Fiche de créature/Fallout » : différence entre les versions
Page créée avec « 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" }, { t... » |
Aucun résumé des modifications |
||
(4 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 2 : | Ligne 2 : | ||
function resistance(localdata, type) | function resistance(localdata, type) | ||
local sd = localdata[type..' sd '] | local sd = localdata[type .. ' sd'] | ||
local rd = localdata[type..' rd '] | local rd = localdata[type .. ' rd'] | ||
if not sd or not rd then | if not sd or not rd then | ||
return nil | return nil | ||
Ligne 15 : | Ligne 15 : | ||
parts = { | parts = { | ||
{ type = "table", rows = { | { type = "table", rows = { | ||
{ type = "row", label = "Nom", icon = " | { type = "row", label = "Nom", icon = "sic", value = "nom" }, | ||
{ type = "row", label = "Proto ID", icon = " | { type = "row", label = "Proto ID", icon = "réparation", value = "protoid" }, | ||
{ type = "row", label = "Points d'expérience", icon = " | { type = "row", label = "Points d'expérience", icon = "xp", value = "xp" }, | ||
{ type = "row", label = "Points de vie", icon = "pv", value = "pv" }, | { 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 = "Vitesse de guérison", icon = "vitesse de guérison", value = "guérison" }, | ||
Ligne 24 : | Ligne 24 : | ||
{ type = "row", label = "Points d'action", icon = "pa", value = "pa" }, | { 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 = "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 = " | { 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 = "table", title = "Résistances ([[Seuil de dégâts|SD]] · [[Résistance aux dégâts|RD]])", rows = { | ||
Ligne 37 : | Ligne 35 : | ||
{ type = "row", label = "IEM", icon = "iem", value = function(localdata) return resistance(localdata, "iem") end } | { type = "row", label = "IEM", icon = "iem", value = function(localdata) return resistance(localdata, "iem") end } | ||
}}, | }}, | ||
{ type = "list", title = "Attaques", | { type = "list", title = "Attaques", prefix = "attaque", max = 5 }, | ||
{ type = "list", title = "Capacités", prefix = "capacité", max = 5 }, | |||
{ type = "list", title = "Capacités", | |||
} | } | ||
} | } |
Dernière version du 13 février 2022 à 00:01
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 = "sic", value = "nom" },
{ type = "row", label = "Proto ID", icon = "réparation", value = "protoid" },
{ type = "row", label = "Points d'expérience", icon = "xp", value = "xp" },
{ 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", prefix = "attaque", max = 5 },
{ type = "list", title = "Capacités", prefix = "capacité", max = 5 },
}
}