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