diff --git a/projet_jdr.py b/projet_jdr.py index b09a47c..29f49f9 100644 --- a/projet_jdr.py +++ b/projet_jdr.py @@ -15,9 +15,16 @@ class Personnage : elif self.cat == 'elfe': self.inventaire = ['arc','potion'] -# def jet_attaque (self): -# print (random.randint(1,20)) - - def affiche (self) : - print (" je m'appelle" , self.nom , "j'ai", self.pdv "pdv") + def jet_attaque (self): + lanceA = random.randint(1,20) + if self.cat =='guerrier' or self.cat =='magicien': + jet_att = lanceA + self.exp* 10 + elif self.cat =='voleur': + jet_att = lanceA + self.exp * 3 + elif self.cat =='elfe': + jet_att = lanceA + self.exp * 8 + + + +