mirror of
https://github.com/n0remac/game-jam-2020.git
synced 2025-12-09 16:05:21 -06:00
capped healing to max_health
This commit is contained in:
@@ -169,6 +169,8 @@ class Player(Mob):
|
||||
|
||||
def heal(self):
|
||||
self.health+=Config.HEAL_AMOUNT
|
||||
if self.health > self.max_health:
|
||||
self.health = self.max_health
|
||||
|
||||
def harden(self):
|
||||
self.armor+=Config.ARMOR_AMOUNT
|
||||
|
||||
Reference in New Issue
Block a user