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

@ -84,7 +84,10 @@ class Player(FightingEntity):
elif entity.is_item():
entity.hold(self)
elif entity.is_friendly():
self.map.logs.add_message(entity.talk_to(self))
# self.map.logs.add_message(entity.talk_to(self))
self.map.logs.add_message(self.hit(entity))
if entity.dead:
self.add_xp(randint(3, 7))
return super().check_move(y, x, move_if_possible)
def recalculate_paths(self, max_distance: int = 8) -> None: