From 8a4a2982bd510e3cb90d7d9060c71d8deec23161 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sun, 13 Mar 2016 20:45:08 +0100 Subject: [PATCH] TCE: Only calc_effort on tiles where it makes sense. --- plugins/server/TheCrawlingEater.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/server/TheCrawlingEater.py b/plugins/server/TheCrawlingEater.py index c9854b5..02c9c3c 100644 --- a/plugins/server/TheCrawlingEater.py +++ b/plugins/server/TheCrawlingEater.py @@ -310,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 -- 2.30.2