From 3ac188103ad976071fa6dbb067529fd392951a2f Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Wed, 13 May 2020 19:32:52 +0200 Subject: [PATCH] Player's movement adds fatigue --- src/entities/Player.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/entities/Player.py b/src/entities/Player.py index 90ec6c1..ffe48ac 100644 --- a/src/entities/Player.py +++ b/src/entities/Player.py @@ -38,13 +38,13 @@ class Player(Entity): Lowers player's statistics. """ # looses hunger every 10 steps taken - if self.movePoints % 10 == 0: - self.statistics.set_hunger(5) + if self.movePoints % 15 == 0: + self.statistics.set_hunger(1) # gets more thirsty every 5 steps - if self.movePoints % 5 == 0: - self.statistics.set_thirst(6) + if self.movePoints % 10 == 0: + self.statistics.set_thirst(2) # gets tired every step - self.statistics.set_stamina(-2) + self.statistics.set_stamina(-1) def applyTimeFatigue(self, tickTime): """ @@ -121,6 +121,8 @@ class Player(Entity): # Else move else: self.moveForward() + + self.applyWalkingFatigue() return True else: return False