From: Skullheadx <704277@pdsb.net> Date: Wed, 13 Jul 2022 18:10:52 +0000 (-0400) Subject: enemy health + win bug X-Git-Url: http://git.skullheadx.com/projects.html?a=commitdiff_plain;h=0dba2f6198d7df70b55cc04df5c7baac428b1f91;p=Pygame-Jam.git enemy health + win bug --- diff --git a/Enemy.py b/Enemy.py index e8f605a..c3d0fcc 100644 --- a/Enemy.py +++ b/Enemy.py @@ -148,7 +148,7 @@ class Skeleton(Actor): self.direction = -1 self.prev_direction = self.direction - # self.health = 0 # for debugging without getting killed + self.health = 75 # for debugging without getting killed self.weapon = Sword(self.position, (0, 0), self.width, -1) diff --git a/Game.py b/Game.py index b09cbda..10f5ea9 100644 --- a/Game.py +++ b/Game.py @@ -165,6 +165,8 @@ class Game: self.collision_layer["body"], [self.collision_layer["world"], self.collision_layer["body"]], goon_skin=False) self.collision_layer["body"].add(self.king) + for enemy in self.skeletons: + enemy.dead = True for particle in particles: particle.update(delta) @@ -195,8 +197,8 @@ class Game: surf.blit(self.sky, (0, 0)) if (self.level == 4): - print(get_camera_offset()) - if self.king is not None: + # print(get_camera_offset()) + if self.king is not None and isinstance(self.king, King): if self.king.skeleton_attack == True: for i in range(random.randint(1, 2)): if(len(self.skeleton_spawn_coords) < 2):