|
|
|
@ -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,6 +89,15 @@ def combat() : |
|
|
|
print() |
|
|
|
perso2.affiche_caracteristiques() |
|
|
|
print() |
|
|
|
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() |
|
|
|
|
|
|
|
|