|
|
|
@ -88,19 +88,19 @@ def combat(j1, j2): |
|
|
|
j1.affiche_caracteristiques() |
|
|
|
j2.affiche_caracteristiques() |
|
|
|
|
|
|
|
if defenseur.pdv - attaquant.pdv > 10 and attaquant.inventaire != []: |
|
|
|
attaquant.affiche_inventaire() |
|
|
|
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)") |
|
|
|
bonus = int(input()) |
|
|
|
if bonus == 1: |
|
|
|
print("Utiliser arme (1) ou potion (2)") |
|
|
|
print("Utiliser arme pour affaiblir l'adversaire(1) ou potion pour se régenerer(2)") |
|
|
|
objet = int(input()) |
|
|
|
if objet == 1 : |
|
|
|
defenseur.change_pdv(-7) |
|
|
|
attaquant.inventaire.pop(0) |
|
|
|
attaquant.change_pdv(-18) |
|
|
|
defenseur.inventaire.pop(0) |
|
|
|
elif objet == 2: |
|
|
|
attaquant.change_pdv(7) |
|
|
|
attaquant.inventaire.pop() |
|
|
|
defenseur.change_pdv(25) |
|
|
|
defenseur.inventaire.pop() |
|
|
|
|
|
|
|
|
|
|
|
x = 1 |
|
|
|
|