Added a currency : the hazel (for hazelnuts). The player and the merchants possess a certain quantity of hazel

This commit is contained in:
eichhornchen 2020-11-27 17:11:59 +01:00
parent 76bbee7e6d
commit 4fdf08cab9

View File

@ -12,11 +12,12 @@ class Player(FightingEntity):
max_xp: int = 10
inventory: list
paths: Dict[Tuple[int, int], Tuple[int, int]]
hazel: int #It is the currency of this game
def __init__(self, maxhealth: int = 20, strength: int = 5,
intelligence: int = 1, charisma: int = 1, dexterity: int = 1,
constitution: int = 1, level: int = 1, current_xp: int = 0,
max_xp: int = 10, *args, **kwargs) -> None:
max_xp: int = 10, hazel: int = 42, *args, **kwargs) -> None:
super().__init__(name="player", maxhealth=maxhealth, strength=strength,
intelligence=intelligence, charisma=charisma,
dexterity=dexterity, constitution=constitution,
@ -25,6 +26,7 @@ class Player(FightingEntity):
self.max_xp = max_xp
self.inventory = list()
self.paths = dict()
self.hazel = hazel
def move(self, y: int, x: int) -> None:
"""