Module:Sensibilités

De Poképédia
Sauter à la navigation Sauter à la recherche

Ceci est un script lui permettant de calculer les sensibilités d'un Pokémon suivant son ou ses types.

Exemple d'appel du module :
{{#invoke:Sensibilités|tableau|generation=6|type1=Psy|type2=Ténèbres}}

Où "type1" et "type2" (optionnel) sont les types du Pokémon, et "generation" le numéro de la génération dans laquelle on se trouve.

Remarque : pour éditer ce texte d'introduction : [[/doc]]


local p = {}

function p.tableau(frame)
	-- code, genmin
	local conf = {
		{"normal", 1},
		{"plante", 1},
		{"feu", 1},
		{"eau", 1},
		{"electrik", 1},
		{"glace", 1},
		{"combat", 1},
		{"poison", 1},
		{"sol", 1},
		{"vol", 1},
		{"psy", 1},
		{"insecte", 1},
		{"roche", 1},
		{"spectre", 1},
		{"dragon", 1},
		{"tenebres", 2},
		{"acier", 2},
		{"fee", 6}
	}
	
	local types = {
		normal = "normal",
		plante = "plante",
		feu = "feu",
		eau = "eau",
		electrik = "électrik",
		glace = "glace",
		combat = "combat",
		poison = "poison",
		sol = "sol",
		vol = "vol",
		psy = "psy",
		insecte = "insecte",
		roche = "roche",
		spectre = "spectre",
		dragon = "dragon",
		tenebres = "ténèbres",
		acier = "acier",
		fee = "fée"
	}
	
	-- coefG1, coefG2-5, coefG6-7+, coefPDM1, coefPDM2, coefPDM4
	local relations = {
		normal = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {1, 1, 1, 1, 1, 1},
			eau = {1, 1, 1, 1, 1, 1},
			plante = {1, 1, 1, 1, 1, 1},
			electrik = {1, 1, 1, 1, 1, 1},
			glace = {1, 1, 1, 1, 1, 1},
			combat = {1, 1, 1, 1, 1, 1},
			poison = {1, 1, 1, 1, 1, 1},
			sol = {1, 1, 1, 1, 1, 1},
			vol = {1, 1, 1, 1, 1, 1},
			psy = {1, 1, 1, 1, 1, 1},
			insecte = {1, 1, 1, 1, 1, 1},
			roche = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			spectre = {0, 0, 0, 0.5, 0.5, 0},
			dragon = {1, 1, 1, 1, 1, 1},
			tenebres = {0, 1, 1, 1, 1, 1},
			acier = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			fee = {0, 0, 1, 0, 0, 1},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		plante = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			eau = {2, 2, 2, 1.5, 1.4, 1.2},
			plante = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			electrik = {1, 1, 1, 1, 1, 1},
			glace = {1, 1, 1, 1, 1, 1},
			combat = {1, 1, 1, 1, 1, 1},
			poison = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			sol = {2, 2, 2, 1.5, 1.4, 1.2},
			vol = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			psy = {1, 1, 1, 1, 1, 1},
			insecte = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			roche = {2, 2, 2, 1.5, 1.4, 1.2},
			spectre = {1, 1, 1, 1, 1, 1},
			dragon = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			tenebres = {0, 1, 1, 1, 1, 1},
			acier = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			fee = {0, 0, 1, 0, 0, 1},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		feu = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			eau = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			plante = {2, 2, 2, 1.5, 1.4, 1.2},
			electrik = {1, 1, 1, 1, 1, 1},
			glace = {2, 2, 2, 1.5, 1.4, 1.2},
			combat = {1, 1, 1, 1, 1, 1},
			poison = {1, 1, 1, 1, 1, 1},
			sol = {1, 1, 1, 1, 1, 1},
			vol = {1, 1, 1, 1, 1, 1},
			psy = {1, 1, 1, 1, 1, 1},
			insecte = {2, 2, 2, 1.5, 1.4, 1.2},
			roche = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			spectre = {1, 1, 1, 1, 1, 1},
			dragon = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			tenebres = {0, 1, 1, 1, 1, 1},
			acier = {0, 2, 2, 1.5, 1.4, 1.2},
			fee = {0, 0, 1, 0, 0, 1},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		eau = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {2, 2, 2, 1.5, 1.4, 1.2},
			eau = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			plante = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			electrik = {1, 1, 1, 1, 1, 1},
			glace = {1, 1, 1, 1, 1, 1},
			combat = {1, 1, 1, 1, 1, 1},
			poison = {1, 1, 1, 1, 1, 1},
			sol = {2, 2, 2, 1.5, 1.4, 1.2},
			vol = {1, 1, 1, 1, 1, 1},
			psy = {1, 1, 1, 1, 1, 1},
			insecte = {1, 1, 1, 1, 1, 1},
			roche = {2, 2, 2, 1.5, 1.4, 1.2},
			spectre = {1, 1, 1, 1, 1, 1},
			dragon = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			tenebres = {0, 1, 1, 1, 1, 1},
			acier = {0, 1, 1, 1, 1, 1},
			fee = {0, 0, 1, 0, 0, 1},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		electrik = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {1, 1, 1, 1, 1, 1},
			eau = {2, 2, 2, 1.5, 1.4, 1.2},
			plante = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			electrik = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			glace = {1, 1, 1, 1, 1, 1},
			combat = {1, 1, 1, 1, 1, 1},
			poison = {1, 1, 1, 1, 1, 1},
			sol = {0, 0, 0, 0.5, 0.5, 0},
			vol = {2, 2, 2, 1.5, 1.4, 1.2},
			psy = {1, 1, 1, 1, 1, 1},
			insecte = {1, 1, 1, 1, 1, 1},
			roche = {1, 1, 1, 1, 1, 1},
			spectre = {1, 1, 1, 1, 1, 1},
			dragon = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			tenebres = {0, 1, 1, 1, 1, 1},
			acier = {0, 1, 1, 1, 1, 1},
			fee = {0, 0, 1, 0, 0, 1},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		glace = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			eau = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			plante = {2, 2, 2, 1.5, 1.4, 1.2},
			electrik = {1, 1, 1, 1, 1, 1},
			glace = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			combat = {1, 1, 1, 1, 1, 1},
			poison = {1, 1, 1, 1, 1, 1},
			sol = {2, 2, 2, 1.5, 1.4, 1.2},
			vol = {2, 2, 2, 1.5, 1.4, 1.2},
			psy = {1, 1, 1, 1, 1, 1},
			insecte = {1, 1, 1, 1, 1, 1},
			roche = {1, 1, 1, 1, 1, 1},
			spectre = {1, 1, 1, 1, 1, 1},
			dragon = {2, 2, 2, 1.5, 1.4, 1.2},
			tenebres = {0, 1, 1, 1, 1, 1},
			acier = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			fee = {0, 0, 1, 0, 0, 1},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		combat = {
			normal = {2, 2, 2, 1.5, 1.4, 1.2},
			feu = {1, 1, 1, 1, 1, 1},
			eau = {1, 1, 1, 1, 1, 1},
			plante = {1, 1, 1, 1, 1, 1},
			electrik = {1, 1, 1, 1, 1, 1},
			glace = {2, 2, 2, 1.5, 1.4, 1.2},
			combat = {1, 1, 1, 1, 1, 1},
			poison = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			sol = {1, 1, 1, 1, 1, 1},
			vol = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			psy = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			insecte = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			roche = {2, 2, 2, 1.5, 1.4, 1.2},
			spectre = {0, 0, 0, 0.5, 0.5, 0},
			dragon = {1, 1, 1, 1, 1, 1},
			tenebres = {0, 2, 2, 1.5, 1.4, 1.2},
			acier = {0, 2, 2, 1.5, 1.4, 1.2},
			fee = {0, 0, 0.5, 0, 0, 0.875},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		poison = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {1, 1, 1, 1, 1, 1},
			eau = {1, 1, 1, 1, 1, 1},
			plante = {2, 2, 2, 1.5, 1.4, 1.2},
			electrik = {1, 1, 1, 1, 1, 1},
			glace = {1, 1, 1, 1, 1, 1},
			combat = {1, 1, 1, 1, 1, 1},
			poison = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			sol = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			vol = {1, 1, 1, 1, 1, 1},
			psy = {1, 1, 1, 1, 1, 1},
			insecte = {2, 1, 1, 1, 1, 1},
			roche = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			spectre = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			dragon = {1, 1, 1, 1, 1, 1},
			tenebres = {0, 1, 1, 1, 1, 1},
			acier = {0, 0, 0, 0.5, 0.5, 0},
			fee = {0, 0, 2, 0, 0, 1.2},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		sol = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {2, 2, 2, 1.5, 1.4, 1.2},
			eau = {1, 1, 1, 1, 1, 1},
			plante = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			electrik = {2, 2, 2, 1.5, 1.4, 1.2},
			glace = {1, 1, 1, 1, 1, 1},
			combat = {1, 1, 1, 1, 1, 1},
			poison = {2, 2, 2, 1.5, 1.4, 1.2},
			sol = {1, 1, 1, 1, 1, 1},
			vol = {0, 0, 0, 0.5, 0.5, 0},
			psy = {1, 1, 1, 1, 1, 1},
			insecte = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			roche = {2, 2, 2, 1.5, 1.4, 1.2},
			spectre = {1, 1, 1, 1, 1, 1},
			dragon = {1, 1, 1, 1, 1, 1},
			tenebres = {0, 1, 1, 1, 1, 1},
			acier = {0, 2, 2, 1.5, 1.4, 1.2},
			fee = {0, 0, 1, 0, 0, 1},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		vol = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {1, 1, 1, 1, 1, 1},
			eau = {1, 1, 1, 1, 1, 1},
			plante = {2, 2, 2, 1.5, 1.4, 1.2},
			electrik = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			glace = {1, 1, 1, 1, 1, 1},
			combat = {2, 2, 2, 1.5, 1.4, 1.2},
			poison = {1, 1, 1, 1, 1, 1},
			sol = {1, 1, 1, 1, 1, 1},
			vol = {1, 1, 1, 1, 1, 1},
			psy = {1, 1, 1, 1, 1, 1},
			insecte = {2, 2, 2, 1.5, 1.4, 1.2},
			roche = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			spectre = {1, 1, 1, 1, 1, 1},
			dragon = {1, 1, 1, 1, 1, 1},
			tenebres = {0, 1, 1, 1, 1, 1},
			acier = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			fee = {0, 0, 1, 0, 0, 1},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		psy = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {1, 1, 1, 1, 1, 1},
			eau = {1, 1, 1, 1, 1, 1},
			plante = {1, 1, 1, 1, 1, 1},
			electrik = {1, 1, 1, 1, 1, 1},
			glace = {1, 1, 1, 1, 1, 1},
			combat = {2, 2, 2, 1.5, 1.4, 1.2},
			poison = {2, 2, 2, 1.5, 1.4, 1.2},
			sol = {1, 1, 1, 1, 1, 1},
			vol = {1, 1, 1, 1, 1, 1},
			psy = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			insecte = {1, 1, 1, 1, 1, 1},
			roche = {1, 1, 1, 1, 1, 1},
			spectre = {1, 1, 1, 1, 1, 1},
			dragon = {1, 1, 1, 1, 1, 1},
			tenebres = {0, 0, 0, 0.5, 0.5, 0},
			acier = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			fee = {0, 0, 1, 0, 0, 1},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		insecte = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			eau = {1, 1, 1, 1, 1, 1},
			plante = {2, 2, 2, 1.5, 1.4, 1.2},
			electrik = {1, 1, 1, 1, 1, 1},
			glace = {1, 1, 1, 1, 1, 1},
			combat = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			poison = {2, 0.5, 0.5, 0.9, 0.7, 0.875},
			sol = {1, 1, 1, 1, 1, 1},
			vol = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			psy = {2, 2, 2, 1.5, 1.4, 1.2},
			insecte = {1, 1, 1, 1, 1, 1},
			roche = {1, 1, 1, 1, 1, 1},
			spectre = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			dragon = {1, 1, 1, 1, 1, 1},
			tenebres = {0, 2, 2, 1.5, 1.4, 1.2},
			acier = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			fee = {0, 0, 0.5, 0, 0, 0.875},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		roche = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {2, 2, 2, 1.5, 1.4, 1.2},
			eau = {1, 1, 1, 1, 1, 1},
			plante = {1, 1, 1, 1, 1, 1},
			electrik = {1, 1, 1, 1, 1, 1},
			glace = {2, 2, 2, 1.5, 1.4, 1.2},
			combat = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			poison = {1, 1, 1, 1, 1, 1},
			sol = {0.5, 0.5, 0.5, 0.9, 0.7, 0.875},
			vol = {2, 2, 2, 1.5, 1.4, 1.2},
			psy = {1, 1, 1, 1, 1, 1},
			insecte = {2, 2, 2, 1.5, 1.4, 1.2},
			roche = {1, 1, 1, 1, 1, 1},
			spectre = {1, 1, 1, 1, 1, 1},
			dragon = {1, 1, 1, 1, 1, 1},
			tenebres = {0, 1, 1, 1, 1, 1},
			acier = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			fee = {0, 0, 1, 0, 0, 1},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		spectre = {
			normal = {0, 0, 0, 0.5, 0.5, 0},
			feu = {1, 1, 1, 1, 1, 1},
			eau = {1, 1, 1, 1, 1, 1},
			plante = {1, 1, 1, 1, 1, 1},
			electrik = {1, 1, 1, 1, 1, 1},
			glace = {1, 1, 1, 1, 1, 1},
			combat = {1, 1, 1, 1, 1, 1},
			poison = {1, 1, 1, 1, 1, 1},
			sol = {1, 1, 1, 1, 1, 1},
			vol = {1, 1, 1, 1, 1, 1},
			psy = {0, 2, 2, 1.5, 1.4, 1.2},
			insecte = {1, 1, 1, 1, 1, 1},
			roche = {1, 1, 1, 1, 1, 1},
			spectre = {2, 2, 2, 1.5, 1.4, 1.2},
			dragon = {1, 1, 1, 1, 1, 1},
			tenebres = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			acier = {0, 0.5, 1, 0.9, 0.7, 1},
			fee = {0, 0, 1, 0, 0, 1},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		dragon = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {1, 1, 1, 1, 1, 1},
			eau = {1, 1, 1, 1, 1, 1},
			plante = {1, 1, 1, 1, 1, 1},
			electrik = {1, 1, 1, 1, 1, 1},
			glace = {1, 1, 1, 1, 1, 1},
			combat = {1, 1, 1, 1, 1, 1},
			poison = {1, 1, 1, 1, 1, 1},
			sol = {1, 1, 1, 1, 1, 1},
			vol = {1, 1, 1, 1, 1, 1},
			psy = {1, 1, 1, 1, 1, 1},
			insecte = {1, 1, 1, 1, 1, 1},
			roche = {1, 1, 1, 1, 1, 1},
			spectre = {1, 1, 1, 1, 1, 1},
			dragon = {2, 2, 2, 1.5, 1.4, 1.2},
			tenebres = {0, 1, 1, 1, 1, 1},
			acier = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			fee = {0, 0, 0, 0, 0, 0},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		tenebres = {
			normal = {0, 1, 1, 1, 1, 1},
			feu = {0, 1, 1, 1, 1, 1},
			eau = {0, 1, 1, 1, 1, 1},
			plante = {0, 1, 1, 1, 1, 1},
			electrik = {0, 1, 1, 1, 1, 1},
			glace = {0, 1, 1, 1, 1, 1},
			combat = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			poison = {0, 1, 1, 1, 1, 1},
			sol = {0, 1, 1, 1, 1, 1},
			vol = {0, 1, 1, 1, 1, 1},
			psy = {0, 2, 2, 1.5, 1.4, 1.2},
			insecte = {0, 1, 1, 1, 1, 1},
			roche = {0, 1, 1, 1, 1, 1},
			spectre = {0, 2, 2, 1.5, 1.4, 1.2},
			dragon = {0, 1, 1, 1, 1, 1},
			tenebres = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			acier = {0, 0.5, 1, 0.9, 0.7, 1},
			fee = {0, 0, 0.5, 0, 0, 0.875},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		acier = {
			normal = {0, 1, 1, 1, 1, 1},
			feu = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			eau = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			plante = {0, 1, 1, 1, 1, 1},
			electrik = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			glace = {0, 2, 2, 1.5, 1.4, 1.2},
			combat = {0, 1, 1, 1, 1, 1},
			poison = {0, 1, 1, 1, 1, 1},
			sol = {0, 1, 1, 1, 1, 1},
			vol = {0, 1, 1, 1, 1, 1},
			psy = {0, 1, 1, 1, 1, 1},
			insecte = {0, 1, 1, 1, 1, 1},
			roche = {0, 2, 2, 1.5, 1.4, 1.2},
			spectre = {0, 1, 1, 1, 1, 1},
			dragon = {0, 1, 1, 1, 1, 1},
			tenebres = {0, 1, 1, 1, 1, 1},
			acier = {0, 0.5, 0.5, 0.9, 0.7, 0.875},
			fee = {0, 0, 2, 0, 0, 1.2},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		fee = {
			normal = {0, 0, 1, 0, 0, 1},
			feu = {0, 0, 0.5, 0, 0, 0.875},
			eau = {0, 0, 1, 0, 0, 1},
			plante = {0, 0, 1, 0, 0, 1},
			electrik = {0, 0, 1, 0, 0, 1},
			glace = {0, 0, 1, 0, 0, 1},
			combat = {0, 0, 2, 0, 0, 1.2},
			poison = {0, 0, 0.5, 0, 0, 0.875},
			sol = {0, 0, 1, 0, 0, 1},
			vol = {0, 0, 1, 0, 0, 1},
			psy = {0, 0, 1, 0, 0, 1},
			insecte = {0, 0, 1, 0, 0, 1},
			roche = {0, 0, 1, 0, 0, 1},
			spectre = {0, 0, 1, 0, 0, 1},
			dragon = {0, 0, 2, 0, 0, 1.2},
			tenebres = {0, 0, 2, 0, 0, 1.2},
			acier = {0, 0, 0.5, 0, 0, 0.875},
			fee = {0, 0, 1, 0, 0, 1},
			aucun = {1, 1, 1, 1, 1, 1}
		},
		aucun = {
			normal = {1, 1, 1, 1, 1, 1},
			feu = {1, 1, 1, 1, 1, 1},
			eau = {1, 1, 1, 1, 1, 1},
			plante = {1, 1, 1, 1, 1, 1},
			electrik = {1, 1, 1, 1, 1, 1},
			glace = {1, 1, 1, 1, 1, 1},
			combat = {1, 1, 1, 1, 1, 1},
			poison = {1, 1, 1, 1, 1, 1},
			sol = {1, 1, 1, 1, 1, 1},
			vol = {1, 1, 1, 1, 1, 1},
			psy = {1, 1, 1, 1, 1, 1},
			insecte = {1, 1, 1, 1, 1, 1},
			roche = {1, 1, 1, 1, 1, 1},
			spectre = {1, 1, 1, 1, 1, 1},
			dragon = {1, 1, 1, 1, 1, 1},
			tenebres = {1, 1, 1, 1, 1, 1},
			acier = {1, 1, 1, 1, 1, 1},
			fee = {1, 1, 1, 1, 1, 1},
			aucun = {1, 1, 1, 1, 1, 1}
		}
	}

	local jeu = frame:getArgument("jeu"):expand()
	if jeu ~= nil then jeu = string.gsub(string.lower(jeu), "pdm1", "pdm") end
	
	local generation = frame:getArgument("generation"):expand()
	if generation == nil then
		if jeu == "pdm" then generation = 3 elseif jeu == "pdm2" then generation = 4 elseif jeu == "pdm3" then generation = 5 elseif jeu == "pdm4" then generation = 6 else generation = 1 end
	else generation = tonumber(generation) end
	
	local type1 = frame:getArgument("type1"):expand()
	if type1 == nil then type1 = "aucun" else type1 = string.gsub(string.gsub(string.gsub(string.gsub(string.lower(type1),"é","e"),"è","e"),"É","e"),"È","e") end
	
	local type2 = frame:getArgument("type2"):expand()
	if type2 == nil then type2 = "aucun" else type2 = string.gsub(string.gsub(string.gsub(string.gsub(string.lower(type2),"é","e"),"è","e"),"É","e"),"È","e") end
	
	-- position du coef a charger depuis les tables de relations
	local poscoef = 1
	if generation >=6 then poscoef = 3
	elseif generation >= 2 then poscoef = 2
	end
	if jeu == "pdm" then poscoef = 4 elseif jeu == "pdm2" then poscoef = 5 elseif jeu == "pdm4" then poscoef = 6 end
	
	local images = {}
	local efficacites = {}
	local remarques = {}
	for _,subconf in ipairs(conf) do
		
		local genmin = subconf[2]
		
		if generation >= genmin then 
			local code = subconf[1]
			local coef = relations[code][type1][poscoef]*relations[code][type2][poscoef]
			
			local classe = "standard"
			if jeu == "pdm" then
				if coef > 1.5 then classe = "doublefaiblesse"
				elseif coef > 1 then classe = "faiblesse"
				elseif coef == 0.5 then classe = "immunité"
				elseif coef < 0.9 then classe = "doublerésistance"
				elseif coef < 1 then classe = "résistance"
				end
			elseif jeu == "pdm2" then
				if coef > 1.4 then classe = "doublefaiblesse"
				elseif coef > 1 then classe = "faiblesse"
				elseif coef == 0.5 then classe = "immunité"
				elseif coef < 0.7 then classe = "doublerésistance"
				elseif coef < 1 then classe = "résistance"
				end
			elseif jeu == "pdm4" then
				if coef > 1.2 then classe = "doublefaiblesse"
				elseif coef > 1 then classe = "faiblesse"
				elseif coef == 0 then classe = "immunité"
				elseif coef < 0.875 then classe = "doublerésistance"
				elseif coef < 1 then classe = "résistance"
				end
			else
				if coef > 2 then classe = "doublefaiblesse"
				elseif coef > 1 then classe = "faiblesse"
				elseif coef == 0 then classe = "immunité"
				elseif coef < 0.5 then classe = "doublerésistance"
				elseif coef < 1 then classe = "résistance"
				end
			end
		
			local affichage = ""
			if coef == 0.5 then affichage = "× ½"
			elseif coef == 0.25  then affichage = "× ¼"
			elseif coef ~= 1 then affichage = "× " .. string.gsub( mw.ustring.sub( coef, 1, 4 ), "%.", "," ) end
		
			table.insert(images, "<td>[[Fichier:Miniat type "..types[code]..".png]]</td>")
			table.insert(efficacites, "<td class='"..classe.."'>"..affichage)
			if frame:getArgument("remarque-"..types[code]):expand() then
				local numremarque = table.getn(remarques)+1
				table.insert(efficacites, " <sup><small>[[#remarque-sensibilite-"..numremarque.."|"..numremarque.."]]</small></sup>")
				table.insert(remarques, "<li id='remarque-sensibilite-"..numremarque.."'>"..numremarque.." : "..frame:getArgument("remarque-"..types[code]):expand().."</li>")
			end
			table.insert(efficacites, "</td>")
		end
	end
	
	if table.getn(remarques) > 0 then
		table.insert(remarques, 1, "<tr><th colspan='"..table.getn(images).."'>Remarque(s)</th></tr><tr><td colspan='"..table.getn(images).."' style='text-align: justify;'><small><ul>")
		table.insert(remarques, "</ul></small></td></tr>")
	end
	
	-- contrainte : A + 5xB = nombreTypes
	local colspans = {}
	if table.getn(images) == 15 then colspans = {5,2}
	elseif table.getn(images) == 17 then colspans = {2,3}
	else colspans = {3,3}
	end

	if jeu == "pdm" then
		legende = { "× ½", "× 0,81", "× 0,9", "× 1,5", "× 2,25" }
	elseif jeu == "pdm2" then
		legende = { "× ½", "× 0,49", "× 0,7", "× 1,4", "× 1,96" }
	elseif jeu == "pdm4" then
		legende = { "× 0", "× 0,76", "× 0,87", "× 1,2", "× 1,44" }
	elseif jeu == "pdm3" then
		legende = { "{{?}}", "{{?}}", "{{?}}", "{{?}}", "{{?}}" }
	else
		legende = { "× 0", "× ¼", "× ½", "× 2", "× 4" }
	end
	
	return "<table class='tableaustandard centre sensibilite "..string.lower(frame:getArgument("type1"):expand()).."' style='max-width: 100%;'><tr><th colspan='"..table.getn(images).."'>Sensibilités de "..mw.text.split(frame:getParent():getTitle(),"/",true)[1].."</th></tr><tr><th colspan='"..table.getn(images).."'>Liste des sensibilités</th></tr><tr>"..table.concat(images, "").."</tr><tr>"..table.concat(efficacites, "").."</tr><tr style='font-size: 90%;'><th colspan='"..colspans[1].."'>Légende</th><td colspan='"..colspans[2].."'><span style='background: #AAAAAA;'>"..legende[1].."</span> : [[Table des types#Immunité|Inefficacité]]</td><td colspan='"..colspans[2].."'><span style='background: #3AF24B;'>"..legende[2].."</span> : Double [[Table des types#Résistance|résistance]]</td><td colspan='"..colspans[2].."'><span style='background: #AAFFAA;'>"..legende[3].."</span> : [[Table des types#Résistance|Résistance]]</td><td colspan='"..colspans[2].."'><span style='background: #FFAAAA;'>"..legende[4].."</span> : [[Table des types#Faiblesse|Faiblesse]]</td><td colspan='"..colspans[2].."'><span style='background: #FF5E4D;'>"..legende[5].."</span> : Double [[Table des types#Faiblesse|faiblesse]]</td></tr>"..table.concat(remarques, "").."</table>"
end

return p