Browse Source

class personnage ajouté

master
marvyn.meunier 1 year ago
parent
commit
4b01f3fb97
  1. 25
      jdr.py

25
jdr.py

@ -1,6 +1,25 @@
class Personnage : class Personnage :
def __init__(self,nom,pdv,exp,cat,inventaire) def __init__(self,nom,pdv,exp,cat,inventaire,coef)
self.nom = nom self.nom = nom
self.pdv = pdv self.pdv = 20
self.exp = exp self.exp = 1
self.cat = cat self.cat = cat
self.coef = 0
self.inventaire = []
if self.cat == "voleur"
self.inventaire = ["sac en toile" , "dague" ]
self.pdv = 25
self.coef = 3
if self.cat == "sorciere"
self.inventaire = ["pôtion poison" , "baguette" ]
self.pdv = 30
self.coef = 10
if self.cat == "chasseur"
self.inventaire = ["epee" , "bouclie" , " fusarbalette "]
self.pdv = 40
self.coef = 10
if self.cat == "mage"
self.inventaire = ["potion de soin" , "baton" ]
self.pdv = 10
self.coef = 5
def jet_attaque(self):
Loading…
Cancel
Save