diff --git a/squirrelbattle/entities/friendly.py b/squirrelbattle/entities/friendly.py new file mode 100644 index 0000000..7cbd03a --- /dev/null +++ b/squirrelbattle/entities/friendly.py @@ -0,0 +1,20 @@ +from ..interfaces import FriendlyEntity, Map + +class Merchant(FriendlyEntity) : + """ + The class for merchants in the dungeon + """ + + inventory = list + + def __init__(self, inventory : list): + super().__init__() + self.inventory = inventory + + 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 + diff --git a/squirrelbattle/interfaces.py b/squirrelbattle/interfaces.py index 7fc4171..b629b96 100644 --- a/squirrelbattle/interfaces.py +++ b/squirrelbattle/interfaces.py @@ -435,4 +435,7 @@ class FriendlyEntity(Entity): super().__init__(*args, **kwargs) self.maxhealth = maxhealth self.health = maxhealth if health is None else health + + def talk_to(self, player : Player) -> None: + #TODO