home · contact · privacy
turn_over(): hunger() before Thing action, so no suicide corpses hunger.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 1 Sep 2015 01:16:22 +0000 (03:16 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 1 Sep 2015 01:16:22 +0000 (03:16 +0200)
roguelike-server

index 0b9af475806fee19e756484cbc064b3bd29ce500..e4b23e0b7b02d39e642e6232f534044f6e3b02fd 100755 (executable)
@@ -1048,15 +1048,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