Respect passive leader aspect in experimental AI
This commit is contained in:
parent
950729c72f
commit
16e6f91b11
1 changed files with 5 additions and 0 deletions
|
@ -42,6 +42,11 @@ return {
|
|||
local start_time, ca_name = os.clock(), 'castle_switch'
|
||||
if AH.print_eval() then print(' - Evaluating castle_switch CA:', os.clock()) end
|
||||
|
||||
if ai.get_passive_leader() then
|
||||
-- Turn off this CA if the leader is passive
|
||||
return 0
|
||||
end
|
||||
|
||||
local leader = wesnoth.get_units {
|
||||
side = wesnoth.current.side,
|
||||
canrecruit = 'yes',
|
||||
|
|
Loading…
Add table
Reference in a new issue