Shin bones now restore health like they are supposed to do. Healing now happens even if invincible. Thanks Ember for the bug report.
This commit is contained in:
@@ -189,10 +189,12 @@ class Player:
|
||||
|
||||
def set_health(self, value):
|
||||
"""Set health and handle death if needed."""
|
||||
if self.isInvincible:
|
||||
return # No damage while invincible
|
||||
|
||||
old_health = self._health
|
||||
|
||||
# Oops, allow healing while invincible.
|
||||
if self.isInvincible and value < old_health:
|
||||
return
|
||||
|
||||
self._health = max(0, value) # Health can't go below 0
|
||||
|
||||
if self._health == 0 and old_health > 0:
|
||||
|
Reference in New Issue
Block a user