home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5cdce6d
)
Server: Minor AI algorithm performance optimization.
author
Christian Heller
<c.heller@plomlompom.de>
Thu, 3 Mar 2016 01:19:15 +0000
(
02:19
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Thu, 3 Mar 2016 01:19:15 +0000
(
02:19
+0100)
server/ai.py
patch
|
blob
|
history
diff --git
a/server/ai.py
b/server/ai.py
index 71961a33c401d3ec6d5be95318d61f811f43f6f9..54bdb6f2d282affbd301ea46f16499aec6422eec 100644
(file)
--- a/
server/ai.py
+++ b/
server/ai.py
@@
-59,12
+59,7
@@
def get_dir_to_target(t, filter):
def animates_in_fov(maplength):
return [Thing for Thing in world_db["Things"].values()
if Thing["T_LIFEPOINTS"] and not Thing["carried"]
def animates_in_fov(maplength):
return [Thing for Thing in world_db["Things"].values()
if Thing["T_LIFEPOINTS"] and not Thing["carried"]
- and not Thing == t and 118 == t["fovmap"][Thing["pos"]]]
-
- #def animates_in_fov_gen(maplength):
- # return (Thing for Thing in world_db["Things"].values()
- # if Thing["T_LIFEPOINTS"] and not Thing["carried"]
- # and not Thing == t and 118 == t["fovmap"][Thing["pos"]])
+ and 118 == t["fovmap"][Thing["pos"]] and not Thing == t]
def good_attack_target(v):
eat_cost = eat_vs_hunger_threshold(t["T_TYPE"])
def good_attack_target(v):
eat_cost = eat_vs_hunger_threshold(t["T_TYPE"])