From: Christian Heller Date: Sat, 12 Mar 2016 00:35:22 +0000 (+0100) Subject: TCE: Eat on every wall attack, not just on successful ones. X-Git-Tag: tce~42 X-Git-Url: https://plomlompom.com/repos/blog?a=commitdiff_plain;h=2bf9dbbeca48cfde11566275d10ca91912257a0b;p=plomrogue TCE: Eat on every wall attack, not just on successful ones. --- diff --git a/plugins/server/TheCrawlingEater.py b/plugins/server/TheCrawlingEater.py index 52807b8..ab88cad 100644 --- a/plugins/server/TheCrawlingEater.py +++ b/plugins/server/TheCrawlingEater.py @@ -126,14 +126,10 @@ def actor_eat(t): height = world_db["MAP"][pos] - ord("0") if t["T_STOMACH"] >= 32 or height == 5: return - eaten = False - if height == 3 and 0 == int(rand.next() % 2): - t["T_STOMACH"] += height - eaten = True - elif height == 4 and 0 == int(rand.next() % 5): - t["T_STOMACH"] += height - eaten = True + t["T_STOMACH"] += 1 log("You EAT.") + eaten = (height == 3 and 0 == int(rand.next() % 2)) or \ + (height == 4 and 0 == int(rand.next() % 5)) if eaten: world_db["MAP"][pos] = ord("0") if t["T_STOMACH"] > 32: