Finally remembered to remove some debug statements. Added a finish level fanfare for the skeleton, complete with wicked laugh. Work on level 8, it used to be a tiny level, now it's better and has a ghost boss.
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user