Healer Support MAI: added [filter_second] option to choose healees.

This commit is contained in:
jleldridge 2013-05-07 01:01:05 -04:00
parent a5c8c92b9e
commit 7a2c8dbce2
2 changed files with 5 additions and 1 deletions

View file

@ -101,7 +101,10 @@ return {
formula = '$this_unit.moves = 0', { "and", cfg.filter }
}
local all_units = wesnoth.get_units{ side = wesnoth.current.side }
local all_units = wesnoth.get_units{ side = wesnoth.current.side,
{"and", cfg.filter_second}
}
local healees, units_MP = {}, {}
for i,u in ipairs(all_units) do
-- Potential healees are units without MP that don't already have a healer (also without MP) next to them

View file

@ -161,6 +161,7 @@ function wesnoth.wml_actions.micro_ai(cfg)
cfg_hs.max_threats = cfg.max_threats
cfg_hs.filter = H.get_child(cfg, "filter")
cfg_hs.filter_second = H.get_child(cfg, "filter_second")
end
-- Set up the CA add/delete parameters