|
@ -6,33 +6,58 @@ class Personnage : |
|
|
self.pdv = 20 |
|
|
self.pdv = 20 |
|
|
self.exp = 1 |
|
|
self.exp = 1 |
|
|
self.cat = cat |
|
|
self.cat = cat |
|
|
if self.cat = "guerrier": |
|
|
if self.cat == "guerrier": |
|
|
self.inventaire = ["épée","potion"] |
|
|
self.inventaire = ["épée","potion"] |
|
|
if self.cat = "magicien": |
|
|
if self.cat == "magicien": |
|
|
self.inventaire = ["bâton","potion"] |
|
|
self.inventaire = ["bâton","potion"] |
|
|
if self.cat = "voleur": |
|
|
if self.cat == "voleur": |
|
|
self.inventaire = ["dague","potion"] |
|
|
self.inventaire = ["dague","potion"] |
|
|
if self.cat = "elfe": |
|
|
if self.cat == "elfe": |
|
|
self.inventaire = ["arc","potion"] |
|
|
self.inventaire = ["arc","potion"] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def jet_attaque(self): |
|
|
def jet_attaque(self): |
|
|
lancé dé = randit(1, 20) |
|
|
|
|
|
"""revoie le jet d'attaque""" |
|
|
"""revoie le jet d'attaque""" |
|
|
return = self.attaque |
|
|
lance = randit(1, 20) |
|
|
|
|
|
if self.cat == "guerrier": |
|
|
|
|
|
return lance + self.exp * 10 |
|
|
|
|
|
if self.cat == "magicien": |
|
|
|
|
|
return lance + self.exp * 10 |
|
|
|
|
|
if self.cat == "voleur": |
|
|
|
|
|
return lance + self.exp * 3 |
|
|
|
|
|
if self.cat == "elfe": |
|
|
|
|
|
return lance + self.exp * 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def jet_defence(self): |
|
|
|
|
|
"""revoie le jet de défence""" |
|
|
|
|
|
lance = randit(1, 20) |
|
|
|
|
|
if self.cat == "guerrier": |
|
|
|
|
|
return lance + self.exp * 8 |
|
|
|
|
|
if self.cat == "magicien": |
|
|
|
|
|
return lance + self.exp * 7 |
|
|
|
|
|
if self.cat == "voleur": |
|
|
|
|
|
return lance + self.exp * 9 |
|
|
|
|
|
if self.cat == "elfe": |
|
|
|
|
|
return lance + self.exp * 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def jet_defence(self): |
|
|
|
|
|
pass |
|
|
|
|
|
def change_pdv(self): |
|
|
def change_pdv(self): |
|
|
pass |
|
|
pass |
|
|
|
|
|
|
|
|
def change_exp(self): |
|
|
def change_exp(self): |
|
|
pass |
|
|
pass |
|
|
|
|
|
|
|
|
def affiche_carracteristiques(self): |
|
|
def affiche_carracteristiques(self): |
|
|
pass |
|
|
print("nom perso , catégorie perso, points de vie perso, expérience perso") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def affiche_inventaire(self): |
|
|
def affiche_inventaire(self): |
|
|
|
|
|
print |
|
|
pass |
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def maf(x): |
|
|
|
|
|
"""fait qqch""" |
|
|
|
|
|
pass |