From: Christian Heller Date: Thu, 25 Feb 2016 00:04:34 +0000 (+0100) Subject: Plugin: Simplify decrement_lifepoints. X-Git-Tag: tce~152 X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/gitweb.js?a=commitdiff_plain;h=60635efe557798d2392c85e93dea62e2b8c8214d;p=plomrogue Plugin: Simplify decrement_lifepoints. --- diff --git a/plugins/server/PleaseTheIslandGod.py b/plugins/server/PleaseTheIslandGod.py index f513300..4005f28 100644 --- a/plugins/server/PleaseTheIslandGod.py +++ b/plugins/server/PleaseTheIslandGod.py @@ -321,7 +321,6 @@ def decrement_lifepoints(t): t["T_LIFEPOINTS"] -= 1 _id = [_id for _id in world_db["Things"] if world_db["Things"][_id] == t][0] if 0 == t["T_LIFEPOINTS"]: - sadness = world_db["ThingTypes"][t["T_TYPE"]]["TT_LIFEPOINTS"] for id in t["T_CARRIES"]: t["T_CARRIES"].remove(id) world_db["Things"][id]["T_POSY"] = t["T_POSY"] @@ -337,7 +336,7 @@ def decrement_lifepoints(t): t["T_MEMMAP"] = False t["T_MEMDEPTHMAP"] = False t["T_MEMTHING"] = [] - return sadness + return world_db["ThingTypes"][t["T_TYPE"]]["TT_LIFEPOINTS"] return 0 def actor_move(t):