Goto Micro AI: add [and] to a filter

Another efficiency improvement.  This ensures that the side of the unit
is checked first before the potentially complex rest of the filter is
evaluated.

(cherry-picked from commit 6c38b8ce93)
This commit is contained in:
mattsc 2018-06-06 07:50:37 -07:00
parent 6a64e6e37e
commit 22ca458bfd

View file

@ -26,7 +26,7 @@ function ca_goto:evaluation(cfg, data)
end
local all_units = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", { side = wesnoth.current.side } },
{ "and", wml.get_child(cfg, "filter") }
}