home · contact · privacy
TCE: Generalize test for death by hunger/dehydration.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 12 Mar 2016 20:12:00 +0000 (21:12 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 12 Mar 2016 20:12:00 +0000 (21:12 +0100)
plugins/server/TheCrawlingEater.py

index 1bd03d22e63b4779c97c5b6ccf72a81df9781418..7f8ca0be400d1725e72177b8887b1eb6726d74be 100644 (file)
@@ -282,10 +282,10 @@ def turn_over():
                         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 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):