X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;ds=inline;f=plugins%2Fserver%2FTheCrawlingEater.py;h=02c9c3c0872f70137c249f0674a4bc87e8eda2f5;hb=8a4a2982bd510e3cb90d7d9060c71d8deec23161;hp=78d90b65ca5a241d998d73383be1b4ca2794782c;hpb=3247a076c85a8c350072e9e11b21d29d3cde4c59;p=plomrogue diff --git a/plugins/server/TheCrawlingEater.py b/plugins/server/TheCrawlingEater.py index 78d90b6..02c9c3c 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 @@ -305,8 +310,9 @@ def calc_effort(ta, t): t["T_POSY"], t["T_POSX"]) if 1 == move_result[0]: pos = (move_result[1] * world_db["MAP_LENGTH"]) + move_result[2] - narrowness = world_db["MAP"][pos] - ord("0") - return 2 ** narrowness + if chr(world_db["MAP"][pos]) in "012": + narrowness = world_db["MAP"][pos] - ord("0") + return 2 ** narrowness return 1 world_db["calc_effort"] = calc_effort