fixed a bug with count_free_hexes_in_castle...
...being incorrectly used when considering recruitment opportunities in aspect_recruitment candidate action - it turned out that that function doesn't count *current* free hexes in castle
This commit is contained in:
parent
a70b56aa7d
commit
f36decea40
1 changed files with 2 additions and 3 deletions
|
@ -128,9 +128,8 @@ double aspect_recruitment_phase::evaluate()
|
|||
return BAD_SCORE;
|
||||
}
|
||||
|
||||
std::set<map_location> checked_hexes;
|
||||
checked_hexes.insert(leader->first);
|
||||
if(count_free_hexes_in_castle(leader->first, checked_hexes)==0) {
|
||||
map_location recruit_loc = find_vacant_tile(get_info().map, get_info().units, leader->first, VACANT_CASTLE);
|
||||
if (!get_info().map.on_board(recruit_loc)) {
|
||||
return BAD_SCORE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue