diff --git a/jdr_el-hajam.py b/jdr_el-hajam.py index 44b9adc..2f30518 100644 --- a/jdr_el-hajam.py +++ b/jdr_el-hajam.py @@ -58,11 +58,17 @@ class Personnage: return self.exp def Combat(): + pile_face = randint(1, 2) while joueur1.hp > 0 and joueur2.hp: - if player1 + if pile_face = 1 : + if player1.jet_attaque() > player2.jet_defense(): + player2.change_hp(- random.randint(1, 8)) + print("Le joueur 1 a réussi son attaque !") + else: + + - -nom1 = Personnage(input("Bonjour, quel est votre nom ? ")) +nom = Personnage(input("Bonjour, quel est votre nom ? ")) joueur1.cat = input("Choisissez la catégorie du joueur 1, tapez 1 pour être un guerrier, 2 pour être un magicien, 3 pour être un voleur, 4 pour être un elfe: ") if joueur1.cat == "1": print("Le joueur 1 est un guerrier")