2020-11-27 15:56:22 +00:00
|
|
|
from ..interfaces import FriendlyEntity, Map
|
2020-11-27 17:35:52 +00:00
|
|
|
from .player import Player
|
2020-11-27 15:56:22 +00:00
|
|
|
|
|
|
|
class Merchant(FriendlyEntity) :
|
|
|
|
"""
|
|
|
|
The class for merchants in the dungeon
|
|
|
|
"""
|
2020-11-27 17:35:52 +00:00
|
|
|
name = "Merchant"
|
2020-11-27 15:56:22 +00:00
|
|
|
inventory = list
|
2020-11-27 17:35:52 +00:00
|
|
|
hazel = int
|
2020-11-27 15:56:22 +00:00
|
|
|
|
2020-11-27 17:35:52 +00:00
|
|
|
def __init__(self, inventory : list, hazel : int = 75):
|
2020-11-27 15:56:22 +00:00
|
|
|
super().__init__()
|
|
|
|
self.inventory = inventory
|
2020-11-27 17:35:52 +00:00
|
|
|
self.hazel = hazel
|
2020-11-27 15:56:22 +00:00
|
|
|
|
|
|
|
def talk_to(self, player : Player) -> None:
|
|
|
|
"""
|
|
|
|
This function is used to open the merchant's inventory in a menu,
|
|
|
|
and allow the player to buy/sell objects
|
|
|
|
"""
|
|
|
|
#TODO
|
2020-11-27 17:35:52 +00:00
|
|
|
|
|
|
|
class Sunflower(FriendlyEntity) :
|
|
|
|
"""
|
|
|
|
A friendly sunflower
|
|
|
|
"""
|
|
|
|
dialogue_option = ["Flower power!!", "The sun is warm today"]
|
|
|
|
|
|
|
|
def __init__(self, maxhealth: int = 15,
|
|
|
|
*args, **kwargs) -> None:
|
|
|
|
super().__init__(name="sunflower",
|
|
|
|
maxhealth=maxhealth, *args, **kwargs)
|