Display message if we are dead

This commit is contained in:
Yohann D'ANELLO
2020-11-11 01:17:00 +01:00
parent 6e8cfdcb1a
commit 56ba9d186e
2 changed files with 11 additions and 2 deletions

View File

@ -50,6 +50,9 @@ class Player(FightingEntity):
the player fights this entity.
It rewards some XP if it is dead.
"""
# Don't move if we are dead
if self.dead:
return False
for entity in self.map.entities:
if entity.y == y and entity.x == x and \
isinstance(entity, FightingEntity):