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.
23 lines
684 B
23 lines
684 B
import random
|
|
|
|
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']
|
|
elif self.cat == 'magicien' :
|
|
self.inventaire = ['bâton','potion']
|
|
elif self.cat == 'voleur':
|
|
self.inventaire = ['dague','potion']
|
|
elif self.cat == 'elfe':
|
|
self.inventaire = ['arc','potion']
|
|
|
|
# def jet_attaque (self):
|
|
# print (random.randint(1,20))
|
|
|
|
def affiche (self) :
|
|
print (" je m'appelle" , self.nom , "j'ai", self.pdv "pdv")
|
|
|
|
|