From 5b841bc0e6219e8a5185189a7f085ea9b50bef28 Mon Sep 17 00:00:00 2001 From: enora <> Date: Mon, 22 Sep 2025 11:45:13 +0200 Subject: [PATCH] commit --- personnageEnora.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/personnageEnora.py b/personnageEnora.py index 1270b7a..80d6da7 100644 --- a/personnageEnora.py +++ b/personnageEnora.py @@ -89,8 +89,8 @@ def combat(j1, j2): j2.affiche_caracteristiques() if attaquant.pdv - defenseur.pdv > 10 and defenseur.inventaire != [] and defenseur.pdv > 0: - defenseur.affiche_inventaire() print("Veux-tu utiliser quelque chose de ton inventaire? oui (1) non(2)") + defenseur.affiche_inventaire() bonus = int(input()) if bonus == 1: print("Utiliser arme pour affaiblir l'adversaire(1) ou potion pour se régenerer(2)") @@ -102,12 +102,12 @@ def combat(j1, j2): defenseur.change_pdv(25) defenseur.inventaire.pop() - + x = 1 while x == 1: while j1.pdv > 0 and j2.pdv > 0: combat(j1, j2) - #attaquant, defenseur = defenseur, attaquant + attaquant, defenseur = defenseur, attaquant if attaquant.pdv > defenseur.pdv : attaquant.change_exp(1) print (attaquant.nom , "a gagné !") @@ -118,4 +118,6 @@ while x == 1: defenseur.pdv = 20 print("rejouer? oui(1)/ non(0)") x = int(input()) - \ No newline at end of file + +j1.affiche_caracteristiques() +j2.affiche_caracteristiques() \ No newline at end of file