X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7B%20card_id%20%7D%7D/delete?a=blobdiff_plain;f=plugins%2Fserver%2FTheCrawlingEater.py;h=7c05e78c8874323288191f1805137a0438d8eb1b;hb=61a2d80135c77f445984dab6e8049b0033b5d989;hp=7a634165d8e83249426a9a0a3e0f708e2e88e5cb;hpb=3e0b61dfec2261beabdfc7839505e03eb060da2d;p=plomrogue 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():