Skip to content

Commit 7a78e59

Browse files
authored
Merge pull request gdquest-demos#72 from WolfgangSenff/fix-heal-typo-issue-71
Fix healing typo to correct behavior
2 parents 5f2445c + 5fbfcd4 commit 7a78e59

File tree

1 file changed

+1
-1
lines changed
  • 2018/04-24-finite-state-machine/player/health

1 file changed

+1
-1
lines changed

2018/04-24-finite-state-machine/player/health/health.gd

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func take_damage(amount, effect=null):
4444

4545
func heal(amount):
4646
health += amount
47-
health = max(health, max_health)
47+
health = min(health, max_health)
4848
emit_signal("health_changed", health)
4949
# print("%s got healed by %s points. Health: %s/%s" % [get_name(), amount, health, max_health])
5050

0 commit comments

Comments
 (0)