X-Git-Url: https://plomlompom.com/repos/?p=plomrogue;a=blobdiff_plain;f=server%2Fai.py;h=21f7115a3e941dd29ebbc3d2cec654e1cb6c540d;hp=db40625659d00878ef866e467d6973c09ee563e7;hb=273682ce18f635f121da5903272c366652470533;hpb=2f7c446f698dbcf510a4997e1689e3a2df3e24be diff --git a/server/ai.py b/server/ai.py index db40625..21f7115 100644 --- a/server/ai.py +++ b/server/ai.py @@ -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"]]