home · contact · privacy
Server: Minor code simplification.
[plomrogue] / server / ai.py
index db40625659d00878ef866e467d6973c09ee563e7..21f7115a3e941dd29ebbc3d2cec654e1cb6c540d 100644 (file)
@@ -64,8 +64,7 @@ def get_dir_to_target(t, filter):
         return False
 
     def good_flee_target(m):
-        own_corpse_id = world_db["ThingTypes"][t["T_TYPE"]]["TT_CORPSE_ID"]
-        corpse_type = world_db["ThingTypes"][own_corpse_id]
+        corpse_type = world_db["ThingTypes"][tt["TT_CORPSE_ID"]]
         targetness = 0 if corpse_type["TT_TOOL"] != "food" \
                        else corpse_type["TT_TOOLPOWER"]
         type = world_db["ThingTypes"][m["T_TYPE"]]