Friendly entities are now a subclass of fighting entities, and can die. The T key is now used to talk to friendly entities

This commit is contained in:
eichhornchen
2020-12-04 00:27:25 +01:00
parent 654bab7c1d
commit 3886bee1ba
5 changed files with 57 additions and 16 deletions

View File

@ -10,6 +10,12 @@ class Merchant(FriendlyEntity) :
name = "Merchant"
inventory = list
hazel = int
def keys(self) -> list :
"""
Returns a friendly entitie's specific attributes
"""
return ["maxhealth", "health", "inventory", "hazel"]
def __init__(self, inventory : list, hazel : int = 75):
super().__init__()
@ -22,8 +28,7 @@ class Merchant(FriendlyEntity) :
and allow the player to buy/sell objects
"""
# TODO
class Sunflower(FriendlyEntity) :
"""
A friendly sunflower