From 489c37d9c091676e9962150635f589016bbab091 Mon Sep 17 00:00:00 2001 From: trystan deneuve <> Date: Thu, 19 Sep 2024 11:49:33 +0200 Subject: [PATCH] rezhaiuf --- mini_projet_jeu_de_role.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mini_projet_jeu_de_role.py b/mini_projet_jeu_de_role.py index 796ae93..c85e359 100644 --- a/mini_projet_jeu_de_role.py +++ b/mini_projet_jeu_de_role.py @@ -50,7 +50,6 @@ class Personnage: def affiche_caracteristiques(self): - # print("Votre personnage s'apelle :", self.nom ,".Il appartient a la categorie des:", self.cat ,".Il a acctuellement", self.hp ," points de vie et ", self.xp ,"d'experience.") print(f"Votre nom : {self.nom}\n" f"Votre categorie : {self.cat}\n" f"Vos points de vie : {self.hp}\n" @@ -67,6 +66,10 @@ class Personnage: print("Votre personnage a : Arc, Potion") + + + + def jeu(self, attaquant, defenseur): attaquant = print(input("Quel est le nom de l'attaquant ? ",)) @@ -74,6 +77,7 @@ def jeu(self, attaquant, defenseur): if self.jet_attaque > self.jet_defense : - defenseur + self.hp_defenseur - randint(1,8) if self.jet_attaque < self.jet_defense : - attaquant \ No newline at end of file + self.hp_attaquant - randint(1,4) + print(self.affiche_caractéristiques) \ No newline at end of file