corentin.bollet
1 year ago
1 changed files with 16 additions and 0 deletions
@ -0,0 +1,16 @@ |
|||
class Personnage: |
|||
def __init__(self, nom, cat): |
|||
self.nom = nom |
|||
self.pdv = 20 |
|||
self.exp = 1 |
|||
self.cat = cat |
|||
match self.cat: |
|||
case "guerrier": |
|||
self.inventaire = ["epee"] |
|||
case "magicien": |
|||
self.inventaire = ["baton"] |
|||
case "voleur": |
|||
self.inventaire = ["dague"] |
|||
case "elfe": |
|||
self.inventaire = ["arc"] |
|||
self.inventaire.append("potion") |
Loading…
Reference in new issue