Browse Source

Nouvelle sauvegarde

master
jordan 2 months ago
parent
commit
4f2317f321
  1. 14
      miniprojet.py

14
miniprojet.py

@ -40,20 +40,16 @@ class Personnage:
def change_pdv(self): def change_pdv(self):
nb_pdv = 10 nb_pdv = 10
if self.jet_defense() > 27 :
self.pdv = self.pdv + nb_pdv self.pdv = self.pdv + nb_pdv
return self.pdv return self.pdv
elif self.jet_defense() < 10 :
self.pdv = self.pdv - nb_pdv
return self.pdv
else:
return self.pdv
def change_exp(self): def change_exp(self):
nb_exp = 1 nb_exp = 1
if self.jet_attaque() > 23 :
self.exp = self.exp + nb_exp self.exp = self.exp + nb_exp
return self.exp return self.exp
else :
return self.exp
def affiche_caracteristiques(self):
print(f"NOM: {self.nom} \n CATEGORIE : {self.cat} \n PV : {self.pdv} \n XP : {self.exp}")
def affiche_inventaire(self):
print(f"Dans votre sac vous avez : {self.inventaire}")
Loading…
Cancel
Save