corentin.bollet
1 year ago
1 changed files with 12 additions and 9 deletions
@ -1,16 +1,19 @@ |
|||
from random import randint |
|||
class Personnage: |
|||
def __init__(self, nom, cat): |
|||
self.nom = nom |
|||
self.pdv = 20 |
|||
self.exp = 1 |
|||
self.cat = cat |
|||
match self.cat: |
|||
case "guerrier": |
|||
if self.cat == "guerrier": |
|||
self.inventaire = ["epee"] |
|||
case "magicien": |
|||
if self.cat == "magicien": |
|||
self.inventaire = ["baton"] |
|||
case "voleur": |
|||
if self.cat == "voleur": |
|||
self.inventaire = ["dague"] |
|||
case "elfe": |
|||
if self.cat == "elfe": |
|||
self.inventaire = ["arc"] |
|||
self.inventaire.append("potion") |
|||
def jet_attaque(self): |
|||
"""renvoie le jet d'atttaque""" |
|||
pass |
|||
|
Loading…
Reference in new issue