diff --git a/projet_jdr.py b/projet_jdr.py index 2903df7..b09a47c 100644 --- a/projet_jdr.py +++ b/projet_jdr.py @@ -6,12 +6,18 @@ class Personnage : self.pdv = 20 self.exp = 1 self.cat = cat - - + if self.cat == 'guerrier': + self.inventaire = ['épée','potion'] + elif self.cat == 'magicien' : + self.inventaire = ['bâton','potion'] + elif self.cat == 'voleur': + self.inventaire = ['dague','potion'] + elif self.cat == 'elfe': + self.inventaire = ['arc','potion'] # def jet_attaque (self): # print (random.randint(1,20)) - + def affiche (self) : + print (" je m'appelle" , self.nom , "j'ai", self.pdv "pdv") -print ("je m'appelle" ,nom, "j'ai" , pdv) \ No newline at end of file