class Personnage: def __init__(self, nom, cat): self.nom = nom self.categories = { "guerrier" : ["sword", "potion"], "magicien" : ["stick", "potion"], "thief" : ["dagger", "potion"], "elfe" : ["bow", "potion"] } self.pdv = 20 self.xp = 1 self.cat = cat self.inv = self.categories[self.cat] def jet_attaque(self): pass