AI: fix score assignment in castle switch candidate action

This commit is contained in:
mattsc 2019-11-29 06:55:42 -08:00
parent f5990b7e95
commit 620da22082

View file

@ -172,9 +172,9 @@ function ca_castle_switch:evaluation(cfg, data, filter_own)
local unit = wesnoth.units.get(loc[1], loc[2])
if (not AH.is_visible_unit(wesnoth.current.side, unit)) then
should_wait = false
break
elseif unit.moves > 0 then
should_wait = true
break
end
end
if should_wait then