home · contact · privacy
TCE: Lessen hunger / thirst growth speed.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 12 Mar 2016 00:11:55 +0000 (01:11 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 12 Mar 2016 00:11:55 +0000 (01:11 +0100)
plugins/server/TheCrawlingEater.py

index b1dc407898d86bb25092012585a9a023b156b6fe..52807b83019ae76ccf136a09510418c9c2c2aa40 100644 (file)
@@ -281,14 +281,15 @@ def turn_over():
                     if t["T_BLADDER"] > 16:
                         if 0 == (rand.next() % (33 - t["T_BLADDER"])):
                             action_db["actor_pee"](t)
-                    t["T_STOMACH"] -= 1
-                    t["T_BOWEL"] += 1
-                    t["T_KIDNEY"] -= 1
-                    t["T_BLADDER"] += 1
-                    if t["T_STOMACH"] == 0:
-                        world_db["die"](t, "You DIE of hunger.")
-                    elif t["T_KIDNEY"] == 0:
-                        world_db["die"](t, "You DIE of dehydration.")
+                    if 0 == world_db["TURN"] % 5:
+                        t["T_STOMACH"] -= 1
+                        t["T_BOWEL"] += 1
+                        t["T_KIDNEY"] -= 1
+                        t["T_BLADDER"] += 1
+                        if t["T_STOMACH"] == 0:
+                            world_db["die"](t, "You DIE of hunger.")
+                        elif t["T_KIDNEY"] == 0:
+                            world_db["die"](t, "You DIE of dehydration.")
         water = 0
         positions_to_wet = []
         for pos in range(world_db["MAP_LENGTH"] ** 2):