diff --git a/data/ai/micro_ais/cas/ca_wolves_move.lua b/data/ai/micro_ais/cas/ca_wolves_move.lua index a41337a08a1..7432cb76500 100644 --- a/data/ai/micro_ais/cas/ca_wolves_move.lua +++ b/data/ai/micro_ais/cas/ca_wolves_move.lua @@ -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