AI: use ai_helper.robust_move_and_attack() in all CAs

This commit is contained in:
mattsc 2019-12-05 12:45:45 -08:00
parent 96dd9c1712
commit 2cc8cce0e8
3 changed files with 3 additions and 3 deletions

View file

@ -239,7 +239,7 @@ function ca_castle_switch:execution(cfg, data, filter_own)
if AH.print_exec() then AH.print_ts(' Executing castle_switch CA') end
if AH.show_messages() then wesnoth.wml_actions.message { speaker = leader.id, message = 'Switching castles' } end
AH.checked_move(ai, data.CS_leader, data.CS_leader_target[1], data.CS_leader_target[2])
AH.robust_move_and_attack(ai, data.CS_leader, data.CS_leader_target, nil, { partial_move = true })
data.CS_leader, data.CS_leader_target = nil
end

View file

@ -71,7 +71,7 @@ end
function ca_move_to_any_enemy:execution(cfg, data)
if AH.print_exec() then AH.print_ts(' Executing move_to_any_enemy CA') end
AH.checked_move_full(ai, MTAE_unit, MTAE_destination[1], MTAE_destination[2])
AH.robust_move_and_attack(ai, MTAE_unit, MTAE_destination)
MTAE_unit, MTAE_destination = nil,nil
end

View file

@ -92,7 +92,7 @@ end
function ca_village_hunt:execution(cfg, data, filter_own)
if AH.print_exec() then AH.print_ts(' Executing village_hunt CA') end
AH.checked_move_full(ai, VH_unit, VH_dst[1], VH_dst[2])
AH.robust_move_and_attack(ai, VH_unit, VH_dst)
VH_unit, VH_dst = nil, nil
end