Added a currency : the hazel (for hazelnuts). The player and the merchants possess a certain quantity of hazel
This commit is contained in:
parent
76bbee7e6d
commit
4fdf08cab9
|
@ -12,11 +12,12 @@ class Player(FightingEntity):
|
||||||
max_xp: int = 10
|
max_xp: int = 10
|
||||||
inventory: list
|
inventory: list
|
||||||
paths: Dict[Tuple[int, int], Tuple[int, int]]
|
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,
|
def __init__(self, maxhealth: int = 20, strength: int = 5,
|
||||||
intelligence: int = 1, charisma: int = 1, dexterity: int = 1,
|
intelligence: int = 1, charisma: int = 1, dexterity: int = 1,
|
||||||
constitution: int = 1, level: int = 1, current_xp: int = 0,
|
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,
|
super().__init__(name="player", maxhealth=maxhealth, strength=strength,
|
||||||
intelligence=intelligence, charisma=charisma,
|
intelligence=intelligence, charisma=charisma,
|
||||||
dexterity=dexterity, constitution=constitution,
|
dexterity=dexterity, constitution=constitution,
|
||||||
|
@ -25,6 +26,7 @@ class Player(FightingEntity):
|
||||||
self.max_xp = max_xp
|
self.max_xp = max_xp
|
||||||
self.inventory = list()
|
self.inventory = list()
|
||||||
self.paths = dict()
|
self.paths = dict()
|
||||||
|
self.hazel = hazel
|
||||||
|
|
||||||
def move(self, y: int, x: int) -> None:
|
def move(self, y: int, x: int) -> None:
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue