|
|
|
@ -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) |