Validate all level data before starting game. No more getting to level 10 before realizing there's an error in the json syntax. Notify players when the level is locked with a boss level message.
This commit is contained in:
@@ -40,7 +40,10 @@ class Level:
|
||||
self.player.set_footstep_sound(self.footstepSound)
|
||||
|
||||
# Level intro message
|
||||
levelIntro = f"Level {levelData['level_id']}, {levelData['name']}. {levelData['description']}"
|
||||
levelIntro = f"Level {levelData['level_id']}, {levelData['name']}. "
|
||||
if self.isLocked:
|
||||
levelIntro += "This is a boss level. You must defeat all enemies before you can advance. "
|
||||
levelIntro += levelData['description']
|
||||
messagebox(levelIntro)
|
||||
|
||||
# Handle level music
|
||||
|
@@ -31,7 +31,7 @@ class Weapon:
|
||||
return cls(
|
||||
name="witch_broom",
|
||||
damage=3,
|
||||
range=2.5,
|
||||
range=3,
|
||||
attackSound="player_broom_attack",
|
||||
hitSound="player_broom_hit",
|
||||
cooldown=500,
|
||||
|
Reference in New Issue
Block a user