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