From 993cf633979d8e96ad5eb051e44ab3a4a2ceccfa Mon Sep 17 00:00:00 2001 From: rom Date: Tue, 27 Apr 2021 02:03:38 +0200 Subject: peacefulfix --- scenes/levels/base_level.gd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scenes/levels/base_level.gd b/scenes/levels/base_level.gd index bb2dcaa..7add4cc 100644 --- a/scenes/levels/base_level.gd +++ b/scenes/levels/base_level.gd @@ -83,9 +83,10 @@ func _on_Level_lost_heart(instakill): if instakill: _health = 0 _health -= 1 - _health = 10 + if Settings.difficulty == Settings.Difficulty.PEACEFUL: + _health = 10 _health_bar.set_health(_health) - if instakill: + if instakill and Settings.difficulty == Settings.Difficulty.PEACEFUL: _load_next_level() if _health <= 0: get_tree().change_scene("res://scenes/game_over.tscn") -- cgit