This commit is contained in:
eichhornchen 2020-12-31 15:00:20 +01:00
parent de3aba396d
commit 7cd4721daa
3 changed files with 12 additions and 12 deletions

View File

@ -48,7 +48,7 @@ class CreditsDisplay(Display):
self.height + self.y - 2, self.height + self.y - 2,
self.width + self.x - 2) self.width + self.x - 2)
def display_ascii_art(self): def display_ascii_art(self) -> None:
with open(ResourceManager.get_asset_path("ascii-art-ecureuil.txt"))\ with open(ResourceManager.get_asset_path("ascii-art-ecureuil.txt"))\
as f: as f:
ascii_art = f.read().split("\n") ascii_art = f.read().split("\n")

View File

@ -64,12 +64,12 @@ class Familiar(FightingEntity):
super().__init__(maxhealth=maxhealth, *args, **kwargs) super().__init__(maxhealth=maxhealth, *args, **kwargs)
self.target = None self.target = None
## @property # @property
## def dialogue_option(self) -> list: # def dialogue_option(self) -> list:
## """ # """
## Debug function (to see if used in the real game) # Debug function (to see if used in the real game)
## """ # """
## return [_("My target is"+str(self.target))] # return [_("My target is"+str(self.target))]
def act(self, p: Player, m: Map) -> None: def act(self, p: Player, m: Map) -> None:
""" """
@ -84,8 +84,8 @@ class Familiar(FightingEntity):
elif self.target.dead: elif self.target.dead:
self.target = p self.target = p
if self.target == p: if self.target == p:
#Look for monsters around the player to kill TOFIX : if monster is out # Look for monsters around the player to kill TOFIX : if monster is
#of range, continue targetting player. # out of range, continue targetting player.
for entity in m.entities: for entity in m.entities:
if (p.y - entity.y) ** 2 + (p.x - entity.x) ** 2 <= 9 and\ if (p.y - entity.y) ** 2 + (p.x - entity.x) ** 2 <= 9 and\
isinstance(entity, Monster): isinstance(entity, Monster):

View File

@ -25,5 +25,5 @@ class FakePad:
def getmaxyx(self) -> Tuple[int, int]: def getmaxyx(self) -> Tuple[int, int]:
return 42, 42 return 42, 42
def inch(self, y, x) -> str: def inch(self, y: int, x: int) -> str:
return "i" return "i"