You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2 KiB

3 weeks ago
from random import randint
class Presonnage:
def __init__(self,nom,cat)
self.nom = nom
self.pdv = 20
self.exp = 1
self.cat = cat
if self.cat == "guerrier":
self.inventaire = ["épée","potion"]
if self.cat == "magicien":
self.inventaire = ["bâton","potion"]
if self.cat == "voleur":
self.inventaire = ["dague","potion"]
3 weeks ago
if self.cat == "elfe":
self.inventaire = ["arc","potion"]
def jet_attaque (self):
3 weeks ago
if self.cat == "guerrier":
3 weeks ago
return = randint(1,20) + self.exp*10
if self.cat == "magicien":
return = randint(1,20) + self.exp*10
if self.cat == "voleur":
return = randint(1,20) + self.exp*3
if self.cat == "elfe":
return = randint(1,20) + self.exp*8
def jet_defense (self):
if self.cat == "guerrier":
return = randint(1,20) + self.exp*8
if self.cat == "magicien":
return = randint(1,20) + self.exp*7
if self.cat == "voleur":
return = randint(1,20) + self.exp*9
if self.cat == "elfe":
return = randint(1,20) + self.exp*10