commit bd8c15075eb152b9f186f56ed82d7b4552957284 Author: tommy Date: Tue Sep 9 14:20:13 2025 +0200 premier commit diff --git a/jeu.py b/jeu.py new file mode 100644 index 0000000..a244571 --- /dev/null +++ b/jeu.py @@ -0,0 +1,50 @@ +class Personnage: + def __init__(self): + self.__nom = input("entrez votre nom") + self.pdv = 20 + self.exp = 1 + self.cat = choisir_categorie + self.inventaire = [] + + + def choisir_categorie(self): + print("\nChoisissez une catégorie de personnage:") + print("1. Guerrier") + print("2. Mage") + print("3. Voleur") + print("4. Elfe") + + choix = input("Entrez le numéro de votre choix: ") + + if choix == "1": + self.cat = "Guerrier" + self.inventaire.append("Épée") + self.inventaire.append("Potion") + elif choix == "2": + self.cat = "Mage" + self.inventaire.append("Bâton") + self.inventaire.append("Potion") + elif choix == "3": + self.cat = "Voleur" + self.inventaire.append("Dague") + self.inventaire.append("Potion") + elif choix == "4": + self.cat = "Elfe" + self.inventaire.append("Arc") + self.inventaire.append("Potion") + + else: + print("Choix invalide, réessayez.") + return self.choisir_categorie() + + + + + + ### def jet_attaque(self): + +# def jet_defense(self): + # def change_pdv(self): + # def change_exp(self): + # def affiche_caracteristiques(self): + #def affiche_inventaire(self): \ No newline at end of file