X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=plomrogue%2Fthings.py;h=c8ef346b13a05e831d092f9430d9a93c49a8473e;hb=dfb05774efac717d1adc699e97b6140599e5df1e;hp=3686ab0c2a2b78f41e024a5f9c8ef14958fc285d;hpb=a2ae7f2fa2c5188c91c093800404779895c35891;p=plomrogue2 diff --git a/plomrogue/things.py b/plomrogue/things.py index 3686ab0..c8ef346 100644 --- a/plomrogue/things.py +++ b/plomrogue/things.py @@ -452,6 +452,7 @@ class Thing_CookieSpawner(Thing): class ThingAnimate(Thing): + weariness = 0 def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) @@ -480,6 +481,7 @@ class ThingAnimate(Thing): task = self.next_task[0] self.next_task = [None] task.check() + task.todo += self.weariness * 10 return task def proceed(self): @@ -624,6 +626,11 @@ class Thing_Player(ThingAnimate): elif self.tripping > 0 and self.tripping % 250 == 0: self.send_msg('RANDOM_COLORS') self.game.changed = True + if random.random() > 0.9999: + if self.standing: + self.weariness += 1 + elif self.weariness > 0: + self.weariness -= 1 def send_msg(self, msg): for c_id in self.game.sessions: