From: Christian Heller Date: Sun, 13 Mar 2016 19:43:52 +0000 (+0100) Subject: TCE: Add levitation over holes on GRACE >= 24. X-Git-Tag: tce~11 X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/new_day?a=commitdiff_plain;h=58fede8382def2daee74ce614f6826243ad93f03;p=plomrogue TCE: Add levitation over holes on GRACE >= 24. --- diff --git a/plugins/server/TheCrawlingEater.py b/plugins/server/TheCrawlingEater.py index 78d90b6..c9854b5 100644 --- a/plugins/server/TheCrawlingEater.py +++ b/plugins/server/TheCrawlingEater.py @@ -63,7 +63,8 @@ def actor_pee(t): if not world_db["test_air"](t): return t["T_BLADDER"] -= 1 - world_db["wetmap"][t["pos"]] += 1 + if chr(world_db["MAP"][t["pos"]]) not in "*&": + world_db["wetmap"][t["pos"]] += 1 def play_drop(): @@ -87,7 +88,7 @@ def actor_drop(t): world_db["MAP"][t["pos"]] = ord("-") elif world_db["MAP"][t["pos"]] == ord("-"): world_db["MAP"][t["pos"]] = ord("0") - else: + elif chr(world_db["MAP"][t["pos"]]) not in "*&": world_db["MAP"][t["pos"]] += 1 t["T_BOWEL"] -= 1 @@ -217,6 +218,8 @@ def actor_move(t): world_db["MAP"][t["pos"]] = ord("0") if world_db["GRACE"] < 8: log("You can now eat ALL walls.") + if world_db["GRACE"] < 24: + log("You will now LEVITATE over holes.") world_db["GRACE"] += 8 elif t == world_db["Things"][0]: log("You try to MOVE there, but fail.") @@ -226,6 +229,8 @@ def test_hole(t): if world_db["GRACE"] >= 32 and world_db["MAP"][t["pos"]] == ord("&"): world_db["die"](t, "YOU WIN, CONGRATULATIONS.") return False + if world_db["GRACE"] >= 24: + return True if chr(world_db["MAP"][t["pos"]]) in "*&": world_db["die"](t, "You FALL in a hole, and die.") return False