From: Christian Heller Date: Fri, 11 Mar 2016 10:36:54 +0000 (+0100) Subject: TCE: Fix actor_move bug (separation of bowel filling, wall disposal). X-Git-Tag: tce~52 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%22https:/validator.w3.org/ledger?a=commitdiff_plain;h=61a2d80135c77f445984dab6e8049b0033b5d989;p=plomrogue TCE: Fix actor_move bug (separation of bowel filling, wall disposal). --- 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():