Skip to content

Commit

Permalink
Goto Micro AI: add [and] to a filter
Browse files Browse the repository at this point in the history
Another efficiency improvement.  This ensures that the side of the unit
is checked first before the potentially complex rest of the filter is
evaluated.
  • Loading branch information
mattsc committed Jun 7, 2018
1 parent 0dcbe1d commit 6c38b8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/ai/micro_ais/cas/ca_goto.lua
Expand Up @@ -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") }
}

Expand Down

0 comments on commit 6c38b8c

Please sign in to comment.