|
|
|
@ -96,7 +96,7 @@ def combat(j1, j2): |
|
|
|
print("Utiliser arme pour affaiblir l'adversaire(1) ou potion pour se régenerer(2)") |
|
|
|
objet = int(input()) |
|
|
|
if objet == 1 : |
|
|
|
attaquant.change_pdv(-18) |
|
|
|
attaquant.change_pdv(-17) |
|
|
|
defenseur.inventaire.pop(0) |
|
|
|
elif objet == 2: |
|
|
|
defenseur.change_pdv(25) |
|
|
|
@ -107,7 +107,7 @@ 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é !") |
|
|
|
|