This commit is contained in:
Lyzzy 2024-03-10 14:30:20 +01:00
parent 726c5ee2a2
commit 248fc2a112

View file

@ -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):