From 098f4dcc09da38a5b8d09cc01a1c6141a9a6b912 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 12 Mar 2016 21:12:00 +0100 Subject: [PATCH] TCE: Generalize test for death by hunger/dehydration. --- plugins/server/TheCrawlingEater.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/server/TheCrawlingEater.py b/plugins/server/TheCrawlingEater.py index 1bd03d2..7f8ca0b 100644 --- a/plugins/server/TheCrawlingEater.py +++ b/plugins/server/TheCrawlingEater.py @@ -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): -- 2.30.2