commit
ef04533840
1 changed files with 12 additions and 0 deletions
@ -0,0 +1,12 @@ |
|||||
|
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 |
Loading…
Reference in new issue