AI: fix passive_leader_shares_keep usage

This commit is contained in:
mattsc 2019-11-22 13:00:31 -08:00
parent c81ecca23b
commit 96faf5b54d
2 changed files with 2 additions and 2 deletions

View file

@ -1149,7 +1149,7 @@ void readonly_context_impl::recalculate_move_maps() const
possible_moves_ = moves_map();
srcdst_ = move_map();
calculate_possible_moves(possible_moves_,srcdst_,dstsrc_,false,false,&get_avoid());
if (get_passive_leader()||get_passive_leader_shares_keep()) {
if (get_passive_leader() && !get_passive_leader_shares_keep()) {
unit_map::iterator i = resources::gameboard->units().find_leader(get_side());
if (i.valid()) {
map_location loc = i->get_location();

View file

@ -80,7 +80,7 @@ double goto_phase::evaluate()
for(std::vector<map_location>::const_iterator g = gotos.begin(); g != gotos.end(); ++g) {
unit_map::const_iterator ui = units_.find(*g);
// passive_leader: never moves or attacks
if(ui->can_recruit() && get_passive_leader() && !get_passive_leader_shares_keep()){
if(ui->can_recruit() && get_passive_leader()){
continue;
}
// end of passive_leader