Basic item and monster interface
This commit is contained in:
15
dungeonbattle/entities/items.py
Normal file
15
dungeonbattle/entities/items.py
Normal file
@ -0,0 +1,15 @@
|
||||
from ..interfaces import Entity
|
||||
|
||||
class Item(Entity):
|
||||
held:bool
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(self, *args, **kwargs)
|
||||
self.held = False
|
||||
|
||||
def drop(self, x:int, y:int):
|
||||
self.held = False
|
||||
self.move(x, y)
|
||||
|
||||
def hold(self):
|
||||
self.held = True
|
Reference in New Issue
Block a user