From 61a2d80135c77f445984dab6e8049b0033b5d989 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Fri, 11 Mar 2016 11:36:54 +0100 Subject: [PATCH] TCE: Fix actor_move bug (separation of bowel filling, wall disposal). --- plugins/server/TheCrawlingEater.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/plugins/server/TheCrawlingEater.py b/plugins/server/TheCrawlingEater.py index 7a63416..7c05e78 100644 --- a/plugins/server/TheCrawlingEater.py +++ b/plugins/server/TheCrawlingEater.py @@ -147,17 +147,21 @@ def actor_move(t): else: if t["T_BOWEL"] >= 32 or chr(world_db["MAP"][pos]) == "X": return - elif chr(world_db["MAP"][pos]) == "%" and 0 == int(rand.next() % 2): + eaten = False + if chr(world_db["MAP"][pos]) == "%" and 0 == int(rand.next() % 2): t["T_BOWEL"] += 3 + eaten = True elif chr(world_db["MAP"][pos]) in "#BEH" and 0 == int(rand.next() % 5): t["T_BOWEL"] += 4 + eaten = True log("You EAT.") - if world_db["wetmap"][pos] == 48: - world_db["MAP"][pos] = ord("_") - else: - world_db["MAP"][pos] = ord("~") - if t["T_BOWEL"] > 32: - t["T_BOWEL"] = 32 + if eaten: + if world_db["wetmap"][pos] == 48: + world_db["MAP"][pos] = ord("_") + else: + world_db["MAP"][pos] = ord("~") + if t["T_BOWEL"] > 32: + t["T_BOWEL"] = 32 def make_map(): -- 2.30.2