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.
38 lines
900 B
38 lines
900 B
from random import randint
|
|
|
|
class Personnage :
|
|
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"]
|
|
if self.cat = "elfe":
|
|
self.inventaire = ["arc","potion"]
|
|
|
|
|
|
|
|
def jet_attaque(self):
|
|
lancé dé = randit(1, 20)
|
|
"""revoie le jet d'attaque"""
|
|
return = self.attaque
|
|
|
|
|
|
|
|
|
|
|
|
def jet_defence(self):
|
|
pass
|
|
def change_pdv(self):
|
|
pass
|
|
def change_exp(self):
|
|
pass
|
|
def affiche_carracteristiques(self):
|
|
pass
|
|
def affiche_inventaire(self):
|
|
pass
|