More work on survival mode.

This commit is contained in:
Storm Dragon
2025-09-07 11:13:01 -04:00
parent ce353d0ed9
commit 2bc27c0e28
19 changed files with 154 additions and 41 deletions

View File

@@ -56,7 +56,7 @@ class PowerUp(Object):
return True
def apply_effect(self, player):
def apply_effect(self, player, level=None):
"""Apply the item's effect when collected"""
if self.item_type == 'hand_of_glory':
player.start_invincibility()
@@ -69,7 +69,13 @@ class PowerUp(Object):
elif self.item_type == 'jack_o_lantern':
player.add_jack_o_lantern()
elif self.item_type == 'extra_life':
player.extra_life()
# Don't give extra lives in survival mode
if level and level.levelId == 999:
# In survival mode, give bonus score instead
level.levelScore += 2000
speak("Extra life found! Bonus score in survival mode!")
else:
player.extra_life()
elif self.item_type == 'shin_bone': # Add shin bone handling
player.shinBoneCount += 1
player._coins += 5
@@ -122,3 +128,4 @@ class PowerUp(Object):
player.scoreboard.increase_score(basePoints + rangeModifier)
play_sound(self.sounds['get_nunchucks'])
player.stats.update_stat('Items collected', 1)