From ff41e2950667a19f69dca2b6f5241b7e0b8e2be2 Mon Sep 17 00:00:00 2001 From: "alexi.forestier" Date: Wed, 13 Sep 2023 11:28:56 +0200 Subject: [PATCH] ajout de la classe Personnage --- jdr.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/jdr.py b/jdr.py index e69de29..5bcbff0 100644 --- a/jdr.py +++ b/jdr.py @@ -0,0 +1,34 @@ +class Personnage: + def init__(self, nom, cat): + self.nom = nom + self.cat = cat + self.pdv = 0 + self.exp = 1 + self.coef = 0 + self.inventaire = [] + if self.cat == "Géant": + self.inventaire = ["3 Rochers géants", "Grosse potion"] + self.pdv = 100 + self.coef = 6 + elif self.cat == "Fée": + self.inventaire = ["Arc féerique", "Potion"] + self.pdv = 70 + self.coef = 9 + elif self.cat == "Démon": + self.inventaire = ["épée malveillante", "Potion"] + self.pdv = 80 + self.coef = 8 + elif self.cat == "Déesee": + self.inventaire = ["Bâton miraculeux", "Potion"] + self.pdv = 90 + self.coef = 7 + + def jet_attaque(self): + + + + + + + + \ No newline at end of file