Wolves Micro AI: fix problem with target unit filtering

This commit is contained in:
mattsc 2016-10-21 12:57:37 -07:00
parent 50146bc509
commit cf731dd923

View file

@ -11,7 +11,10 @@ local function get_wolves(cfg)
end
local function get_prey(cfg)
local prey = AH.get_attackable_enemies(H.get_child(cfg, "filter_second"))
-- Note: we cannot pass H.get_child() directly to AH.get_attackable_enemies()
-- as the former returns two values and the latter takes optional arguments
local filter_second = H.get_child(cfg, "filter_second")
local prey = AH.get_attackable_enemies(filter_second)
return prey
end