From b571085ec1d405e3e794e48b6269e5a90aa8b355 Mon Sep 17 00:00:00 2001 From: julien <> Date: Mon, 14 Sep 2026 09:39:33 +0200 Subject: [PATCH] quelques modifs --- projet poo.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/projet poo.py b/projet poo.py index 677e967..d18928e 100644 --- a/projet poo.py +++ b/projet poo.py @@ -64,7 +64,7 @@ def combat() : elif degats > defense : perte_pv = randint(-8,-1) perso2.change_pv(perte_pv) - print(f"{perso1.nom} inflige {abs(perte_pv)} dégâts à {perso2.nom}") + print(f"{perso1.nom} inflige {abs(perte_pv)} dégâts d'attaque à {perso2.nom}") print() elif degats < defense : perte_pv = randint(-4,-1) @@ -78,7 +78,7 @@ def combat() : elif degats > defense : perte_pv = randint(-8,-1) perso1.change_pv(perte_pv) - print(f"{perso2.nom} inflige {abs(perte_pv)} dégâts à {perso1.nom}") + print(f"{perso2.nom} inflige {abs(perte_pv)} dégâts d'attaque à {perso1.nom}") print() elif degats < defense : perte_pv = randint(-4,-1) @@ -89,7 +89,16 @@ def combat() : print() perso2.affiche_caracteristiques() print() - print("appuyer sur entrer pour continuer") + if perso1.pv == 0 : + print("le combat est terminé") + print(f"{perso2.nom} a triomphé de {perso1.nom}") + perso2.change_exp(1) + elif perso2.pv == 0 : + print("le combat est terminé") + print(f"{perso1.nom} a triomphé de {perso2.nom}") + perso1.change_exp(1) + else : + print("appuyer sur entrer pour continuer") input()