Stop score from appearing as a float.

This commit is contained in:
Storm Dragon
2025-02-14 22:56:44 -05:00
parent 9fd23478bb
commit 7a11bbb7ae

View File

@@ -103,7 +103,7 @@ class WickedQuest:
if keys[pygame.K_h]: if keys[pygame.K_h]:
speak(f"{player.get_health()} health of {player.get_max_health()}") speak(f"{player.get_health()} health of {player.get_max_health()}")
if keys[pygame.K_i]: if keys[pygame.K_i]:
speak(f"Level {self.currentLevel.levelId}, {self.currentLevel.levelName}. {player.get_health()} health of {player.get_max_health()}. {self.currentLevel.levelScore} points on this level so far. {player.get_lives()} lives remaining.") speak(f"Level {self.currentLevel.levelId}, {self.currentLevel.levelName}. {player.get_health()} health of {player.get_max_health()}. {int(self.currentLevel.levelScore)} points on this level so far. {player.get_lives()} lives remaining.")
if keys[pygame.K_l]: if keys[pygame.K_l]:
speak(f"{player.get_lives()} lives") speak(f"{player.get_lives()} lives")
if keys[pygame.K_j]: # Check jack o'lanterns if keys[pygame.K_j]: # Check jack o'lanterns
@@ -150,7 +150,7 @@ class WickedQuest:
if key != 'Total time': # Skip time since we already displayed it if key != 'Total time': # Skip time since we already displayed it
report.append(f"{key}: {self.currentLevel.player.stats.get_level_stat(key)}") report.append(f"{key}: {self.currentLevel.player.stats.get_level_stat(key)}")
report.append(f"Score: {self.currentLevel.levelScore}") report.append(f"Score: {int(self.currentLevel.levelScore)}")
# Stop all sounds and music then play fanfare # Stop all sounds and music then play fanfare
try: try: