From 4fdf08cab901b8e687f246965d3764231c52f1e0 Mon Sep 17 00:00:00 2001 From: eichhornchen Date: Fri, 27 Nov 2020 17:11:59 +0100 Subject: [PATCH] Added a currency : the hazel (for hazelnuts). The player and the merchants possess a certain quantity of hazel --- squirrelbattle/entities/player.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/squirrelbattle/entities/player.py b/squirrelbattle/entities/player.py index 702b055..502f200 100644 --- a/squirrelbattle/entities/player.py +++ b/squirrelbattle/entities/player.py @@ -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: """