diff --git a/config.py b/config.py index 20884bd..41d074c 100644 --- a/config.py +++ b/config.py @@ -14,3 +14,6 @@ max_decay = 3 # The value is choosen randomly between these two. Obviously a lower number is better. min_workpower = 1 max_workpower = 3 +# This defines the bounds of how much a Tamagotchi can recover when eating/sleeping/playing etc. +min_recovery = 10 +max_recovery = 20 diff --git a/config.pyc b/config.pyc index 45dcc48..7a3f02c 100644 Binary files a/config.pyc and b/config.pyc differ diff --git a/tamagotchi.py b/tamagotchi.py index a0b468a..c248336 100644 --- a/tamagotchi.py +++ b/tamagotchi.py @@ -11,10 +11,9 @@ class Tamagotchi: decayspeed = 0 potential = 0 power = 0 + recovery = 0 - recovery = 10 - - def __init__(self, name, hunger, happiness, hygiene, sleep, decayspeed, potential): + def __init__(self, name, hunger, happiness, hygiene, sleep, decayspeed, potential,recovery): self.name = name self.hunger = [hunger, hunger] self.happiness = [happiness, happiness] @@ -25,6 +24,7 @@ class Tamagotchi: self.decayspeed = decayspeed self.potential = potential self.power = potential + self.recovery = recovery def feed_other(self, tamagotchi): self.status = 'Working' diff --git a/tamagotchi.pyc b/tamagotchi.pyc index 0fcad13..414be85 100644 Binary files a/tamagotchi.pyc and b/tamagotchi.pyc differ diff --git a/util.py b/util.py index eaef25c..82d32a0 100644 --- a/util.py +++ b/util.py @@ -15,5 +15,6 @@ class Util: sleep = random.randrange(min_stat,max_stat,1) decayspeed = random.randrange(min_decay,max_decay,1) potential = random.randrange(min_workpower, max_workpower,1) + recovery = random.randrange(min_recovery, max_recovery, 1) - return Tamagotchi(name,hunger,happiness,hygiene,sleep,decayspeed,potential) + return Tamagotchi(name,hunger,happiness,hygiene,sleep,decayspeed,potential,recovery) diff --git a/util.pyc b/util.pyc index 258b700..de51284 100644 Binary files a/util.pyc and b/util.pyc differ