37 lines
968 B
Python
37 lines
968 B
Python
from ..interfaces import FriendlyEntity
|
|
from ..translations import gettext as _
|
|
from .player import Player
|
|
|
|
|
|
class Merchant(FriendlyEntity) :
|
|
"""
|
|
The class for merchants in the dungeon
|
|
"""
|
|
name = "Merchant"
|
|
inventory = list
|
|
hazel = int
|
|
|
|
def __init__(self, inventory : list, hazel : int = 75):
|
|
super().__init__()
|
|
self.inventory = inventory
|
|
self.hazel = hazel
|
|
|
|
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
|
|
|
|
|
|
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)
|