Added a familiar class that follows the player around and hits monsters when it sees one. Added a trumpet, an instance of familiar. Closes #46.

This commit is contained in:
eichhornchen
2020-12-18 17:29:59 +01:00
parent 8ecbf13eae
commit dadafc84eb
5 changed files with 100 additions and 17 deletions

View File

@ -60,7 +60,12 @@ class Monster(FightingEntity):
for move in moves:
if move():
break
def move(self, y: int, x:int) -> None:
"""
Overwrites the move function to recalculate paths.
"""
super().move(y, x)
self.recalculate_paths()
class Tiger(Monster):
"""