diff --git a/levels/Wicked Quest/8.json b/levels/Wicked Quest/8.json index 6b9315c..b0c1327 100644 --- a/levels/Wicked Quest/8.json +++ b/levels/Wicked Quest/8.json @@ -239,6 +239,87 @@ "collectible": true, "static": true }, + { + "x_range": [60, 85], + "y": 15, + "type": "skull_storm", + "damage": 4, + "maximum_skulls": 3, + "frequency": { + "min": 1, + "max": 3 + } + }, + { + "x_range": [335, 345], + "y": 0, + "enemy_type": "ghoul", + "health": 6, + "damage": 3, + "attack_range": 2, + "attack_pattern": { + "type": "hunter", + "turn_threshold": 4 + } + }, + { + "x_range": [335, 395], + "y": 15, + "type": "skull_storm", + "damage": 4, + "maximum_skulls": 5, + "frequency": { + "min": 2, + "max": 4 + } + }, + { + "x_range": [350, 360], + "y": 0, + "enemy_type": "ghoul", + "health": 6, + "damage": 3, + "attack_range": 2, + "attack_pattern": { + "type": "hunter", + "turn_threshold": 4 + } + }, + { + "x": 355, + "y": 0, + "type": "grave", + "sound": "grave", + "static": true, + "zombie_spawn_chance": 20, + "item": "guts" + }, + { + "x_range": [365, 375], + "y": 0, + "enemy_type": "ghoul", + "health": 6, + "damage": 3, + "attack_range": 2, + "attack_pattern": { + "type": "hunter", + "turn_threshold": 4 + } + }, + { + "x_range": [393, 397], + "y": 3, + "sound": "coin", + "collectible": true, + "static": true + }, + { + "x": 395, + "y": 3, + "sound": "coffin", + "type": "coffin", + "item": "jack_o_lantern" + }, { "x_range": [400, 415], "y": 0, diff --git a/sounds/_finish_level.ogg b/sounds/_finish_level.ogg new file mode 100644 index 0000000..2d0d643 --- /dev/null +++ b/sounds/_finish_level.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3766bd0355b16a209e9c6f5f3252240db76e917a7d18941aa676fc33e904a5f +size 80177 diff --git a/src/level.py b/src/level.py index b444717..b80710a 100644 --- a/src/level.py +++ b/src/level.py @@ -28,6 +28,7 @@ class Level: self.rightBoundary = levelData["boundaries"]["right"] self.isLocked = levelData.get("locked", False) # Default to False if not specified self.levelId = levelData["level_id"] + self.levelName = levelData.get("name", "Unnamed Level") # Get footstep sound for this level, default to 'footstep' if not specified self.footstepSound = levelData.get("footstep_sound", "footstep") diff --git a/src/player.py b/src/player.py index 8b2598f..6633a59 100644 --- a/src/player.py +++ b/src/player.py @@ -133,8 +133,11 @@ class Player: self._jack_o_lantern_count += 1 def add_guts(self): - """Apply guts, increase max_health by 2""" - self._maxHealth += 2 + """Apply guts, increase max_health by 2 if less than 20 else restore health""" + if self._maxHealth < 20: + self._maxHealth += 2 + else: + self._health = self._maxHealth def throw_projectile(self): """Throw a jack o'lantern if we have any""" diff --git a/src/powerup.py b/src/powerup.py index fa02e0b..e3e0785 100644 --- a/src/powerup.py +++ b/src/powerup.py @@ -102,8 +102,6 @@ class PowerUp(Object): def check_for_nunchucks(self, player): """Check if player has materials for nunchucks and create if conditions are met""" - print("Checking for nunchucks.") - print(f"Player has {player.shinBoneCount} shin bones and {player.collectedItems}.") if (player.shinBoneCount >= 2 and 'guts' in player.collectedItems and not any(weapon.name == "nunchucks" for weapon in player.weapons)): diff --git a/wicked_quest.py b/wicked_quest.py index 0462827..0ac975d 100644 --- a/wicked_quest.py +++ b/wicked_quest.py @@ -141,18 +141,18 @@ class WickedQuest: # Update time in stats self.currentLevel.player.stats.update_stat('Total time', timeTaken, levelOnly=True) - report = [f"Level {self.currentLevel.levelId} Complete!"] - report.append(f"Time taken: {minutes} minutes and {seconds} seconds") + report = [f"Time taken: {minutes} minutes and {seconds} seconds"] # Add all level stats for key in self.currentLevel.player.stats.level: if key != 'Total time': # Skip time since we already displayed it report.append(f"{key}: {self.currentLevel.player.stats.get_level_stat(key)}") - # Stop all sounds and music - pygame.mixer.stop() + # Stop all sounds and music then play fanfare try: + speak(f"Level {self.currentLevel.levelId}, {self.currentLevel.levelName}, complete!") pygame.mixer.music.stop() + cut_scene(self.sounds, '_finish_level') except: pass