Don't buy hearts, use them instant instead. Fixes #38

This commit is contained in:
Yohann D'ANELLO
2020-12-09 16:57:46 +01:00
parent 2d5a2e4c87
commit 4dbd4f7912
3 changed files with 5 additions and 4 deletions

View File

@ -49,7 +49,7 @@ class Item(Entity):
"""
self.held = True
self.held_by = player
self.map.remove_entity(self)
self.held_by.map.remove_entity(self)
player.add_to_inventory(self)
def save_state(self) -> dict:
@ -80,7 +80,7 @@ class Heart(Item):
When holding a heart, heal the player and don't put item in inventory.
"""
player.health = min(player.maxhealth, player.health + self.healing)
self.map.remove_entity(self)
player.map.remove_entity(self)
def save_state(self) -> dict:
"""