Browse Source

classe personnage

master
ethan.dasilva 1 year ago
parent
commit
ef85a01eea
  1. 27
      jdr.py

27
jdr.py

@ -1 +1,26 @@
jhh
from math import sqrt
class Personnage:
def __init__(self,nom,pdv,exp,cat,inventaire):
self.nom = nom
self.pdv = 0
self.exp = 1
self.cat = cat
self.coef = 0
self.inventaire = []
if self.cat == "Chevalier":
self.inventaire == ["Grand bouclier", " Epée "]
self.pdv == 35
self.coef == 5
elif self.cat == "Mage":
self.inventaire == ["Spectre ", " Potion de soin "]
self.pdv == 20
self.coef == 2
elif self.cat == "Archer":
self.inventaire == ["Arc", " Flèches"]
self.pdv == 20
self.coef == 3
elif self.cat == "Cavalier":
self.inventaire == ["Lance", " Bouclier"]
self.pdv == 45
self.coef == 6

Loading…
Cancel
Save