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.
12 lines
322 B
12 lines
322 B
from random import randint
|
|
class Personnage:
|
|
def __init__(nom, cat):
|
|
self.nom = nom
|
|
self.pdv = 20
|
|
self.exp = 0
|
|
self.cat = cat
|
|
|
|
def jet_attaque(self):
|
|
de = randint(1, 20)
|
|
if self.cat == "guerrier" or self.cat == "magicien":
|
|
return de + self.exp*10
|