A few minor cleanups. Added game over sound to survival mode. Not sure how I missed that for this long lol.

This commit is contained in:
Storm Dragon
2025-09-09 18:12:51 -04:00
parent dc1557e71d
commit 949c12f193
3 changed files with 39 additions and 9 deletions

View File

@@ -86,6 +86,23 @@ class PowerUp(Object):
player.get_health() + 1,
player.get_max_health()
))
# Check for 100 coin bonus after adding shin bone coins
if player._coins >= 100:
# Only give extra lives in story mode, not survival mode (level_id 999)
if level.levelId != 999:
# Extra life
player._coins = 0
player._lives += 1
level.levelScore += 1000
play_sound(self.sounds['get_extra_life'])
else:
# In survival mode, reset coin counter but give bonus score instead
player._coins = 0
level.levelScore += 2000 # Double score bonus instead of extra life
speak("100 bone dust collected! Bonus score!")
play_sound(self.sounds.get('survivor_bonus', 'bone_dust')) # Use survivor_bonus sound if available, fallback to bone_dust
self.check_for_nunchucks(player)
elif self.item_type == 'witch_broom':
broomWeapon = Weapon.create_witch_broom()