summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrom <romangraef@gmail.com>2021-04-27 02:03:38 +0200
committerrom <romangraef@gmail.com>2021-04-27 02:03:38 +0200
commit993cf633979d8e96ad5eb051e44ab3a4a2ceccfa (patch)
treefdd51077ede138769c0d613e52f6aa997be4e031
parent7e36fd48dcf376ca7df49451590333ff1a942e46 (diff)
downloadldjam48-993cf633979d8e96ad5eb051e44ab3a4a2ceccfa.tar.gz
ldjam48-993cf633979d8e96ad5eb051e44ab3a4a2ceccfa.tar.bz2
ldjam48-993cf633979d8e96ad5eb051e44ab3a4a2ceccfa.zip
peacefulfix
-rw-r--r--scenes/levels/base_level.gd5
1 files 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")