diff --git a/viecher.py b/viecher.py index f75babf..9aa4fa1 100644 --- a/viecher.py +++ b/viecher.py @@ -137,7 +137,7 @@ class Fighter(Objects): class MainCharacter(Fighter): - def __init__(self, name, ms, sprite, x, y, health, damage, level, asp, atr) -> None: + def __init__(self, name, ms, sprite, x, y, health, damage, level, asp, atr, killed =[]) -> None: super().__init__(name, ms, sprite, x, y, health, damage, level, asp, atr) self.book = Book(0, 0, [], None, None) self.talking = False @@ -145,6 +145,7 @@ class MainCharacter(Fighter): self.health = Hearts(health, sprite=['fullheart.png', 'fullheart.png', 'fullheart.png', 'fullheart.png', 'fullheart.png'], x=900, y= 50, hurtCooldown=self.hurtCooldown) self.thinks = Thinks(self.x+20, self.y-50, 150, 100, 'brr Im freezing') self.freezing = True + self.killed = killed #amount of mobs that were killed def draw(self, screen): if self.hidden: @@ -208,11 +209,7 @@ class MainCharacter(Fighter): self.y -= (2 + self.rect.height - (touches.rect.y - self.y)) return elif isinstance(touches, NPC): - if keys[pg.K_f]: - touches.talk(objects) - return - else: - return + return if self.x <= touches.rect.x: self.x -= (self.rect.width - (touches.rect.x - self.x)) elif self.x > touches.rect.x: self.x += (self.rect.width - (self.x - touches.rect.x - touches.rect.width * 0.66)) @@ -493,7 +490,7 @@ class Fireball(Spells): self.die(objects, Mobs) class Windslash(Spells): - def __init__(self, name, ms, x, y, moveto, damage, sprite = 'weapons/windslash.png', life_ticks=700) -> None: + def __init__(self, name, ms, x, y, moveto, damage, sprite = 'weapons/windslash.png', life_ticks=1000) -> None: super().__init__(name, ms, sprite, x, y, moveto, damage, life_ticks) def update(self, objects):