Work in progress on printing a store menu. Its buggy though
This commit is contained in:
@ -1,13 +1,14 @@
|
||||
from ..interfaces import FriendlyEntity
|
||||
from ..translations import gettext as _
|
||||
from .player import Player
|
||||
from .items import Item
|
||||
from random import choice
|
||||
|
||||
|
||||
class Merchant(FriendlyEntity) :
|
||||
"""
|
||||
The class for merchants in the dungeon
|
||||
"""
|
||||
name = "Merchant"
|
||||
inventory = list
|
||||
hazel = int
|
||||
|
||||
@ -17,10 +18,13 @@ class Merchant(FriendlyEntity) :
|
||||
"""
|
||||
return ["maxhealth", "health", "inventory", "hazel"]
|
||||
|
||||
def __init__(self, inventory : list, hazel : int = 75):
|
||||
super().__init__()
|
||||
self.inventory = inventory
|
||||
def __init__(self, name : str = "merchant", hazel : int = 75):
|
||||
super().__init__(name = name)
|
||||
self.hazel = hazel
|
||||
self.name = name
|
||||
self.inventory = []
|
||||
for i in range(5) :
|
||||
self.inventory.append(choice(Item.get_all_items())())
|
||||
|
||||
def talk_to(self, player : Player) -> str:
|
||||
"""
|
||||
|
Reference in New Issue
Block a user