From: Christian Heller Date: Thu, 12 Mar 2015 01:28:44 +0000 (+0100) Subject: turn_over(): hunger() before Thing action, so no suicide corpses hunger. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7Bdb.prefix%7D%7D/process_efforts?a=commitdiff_plain;h=ca7b5ea22cb91244e0836034b1477d565da8df35;p=plomrogue turn_over(): hunger() before Thing action, so no suicide corpses hunger. --- diff --git a/roguelike-server b/roguelike-server index 887bf7e..e9db093 100755 --- a/roguelike-server +++ b/roguelike-server @@ -1125,15 +1125,16 @@ def turn_over(): break ai(Thing) try_healing(Thing) - Thing["T_PROGRESS"] += 1 - taid = [a for a in world_db["ThingActions"] - if a == Thing["T_COMMAND"]][0] - ThingAction = world_db["ThingActions"][taid] - if Thing["T_PROGRESS"] == ThingAction["TA_EFFORT"]: - eval("actor_" + ThingAction["TA_NAME"])(Thing) - Thing["T_COMMAND"] = 0 - Thing["T_PROGRESS"] = 0 hunger(Thing) + if Thing["T_LIFEPOINTS"]: + Thing["T_PROGRESS"] += 1 + taid = [a for a in world_db["ThingActions"] + if a == Thing["T_COMMAND"]][0] + ThingAction = world_db["ThingActions"][taid] + if Thing["T_PROGRESS"] == ThingAction["TA_EFFORT"]: + eval("actor_" + ThingAction["TA_NAME"])(Thing) + Thing["T_COMMAND"] = 0 + Thing["T_PROGRESS"] = 0 thingproliferation(Thing, proliferable_map) if whilebreaker: break