190 : Lose a life

Balthazar:

give the player 3 lives

function init_game() { ... // Game state. _game.game_over = false; _game.game_win = false; _game.current_level = 0; _game.player_lives = 3; ... }
function start_level(level_id) { ... } function lose_life() { _game.player_lives--; if (_game.player_lives > 0) { _player.health = _player.health_max; } else { _game.game_over = true; } } function adjust_health(amount) { _player.health += amount; if (_player.health <= 0) { _player.health = 0; _game.game_over = true; lose_life(); } if (_player.health > _player.health_max) { _player.health = _player.health_max; } }

Congratulations! You've earned the Vitality II - Reincarnation badge!

GOTO 192 if you already have the Treasure I - Key and Sprite II - Image badges.

GOTO 100