From 09977e86ff50411088536e6af4e27ccdba70b400 Mon Sep 17 00:00:00 2001 From: cazfi Date: Sat, 13 May 2017 23:18:14 +0000 Subject: [PATCH] Remove hard limitation that AI wonder cities never build settlers See hrm Bug #660089 git-svn-id: svn://svn.gna.org/svn/freeciv/branches/S2_6@35569 a0f10bec-cc02-0410-94fc-a9cfff90b4cd --- ai/default/daidomestic.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ai/default/daidomestic.c b/ai/default/daidomestic.c index a1b86fb3c4..30ebaaf744 100644 --- a/ai/default/daidomestic.c +++ b/ai/default/daidomestic.c @@ -460,11 +460,14 @@ void domestic_advisor_choose_build(struct ai_type *ait, struct player *pplayer, settler_want = city_data->settler_want * pplayer->ai_common.expand / 100; if (adv->wonder_city == pcity->id) { - settler_want /= 5; + if (!settler_type || settler_type->pop_cost > 0) { + settler_want /= 5; + } else { + settler_want /= 2; + } } if (settler_type - && (pcity->id != adv->wonder_city || settler_type->pop_cost == 0) && pcity->surplus[O_FOOD] > utype_upkeep_cost(settler_type, pplayer, O_FOOD)) { if (settler_want > 0) { @@ -489,7 +492,11 @@ void domestic_advisor_choose_build(struct ai_type *ait, struct player *pplayer, founder_want = city_data->founder_want; if (adv->wonder_city == pcity->id) { - founder_want /= 5; + if (founder_type->pop_cost > 0) { + founder_want /= 5; + } else { + founder_want /= 2; + } } if (adv->max_num_cities <= city_list_size(pplayer->cities)) { @@ -501,8 +508,6 @@ void domestic_advisor_choose_build(struct ai_type *ait, struct player *pplayer, / TRAIT_DEFAULT_VALUE; if (founder_type - && (pcity->id != adv->wonder_city - || founder_type->pop_cost == 0) && pcity->surplus[O_FOOD] >= utype_upkeep_cost(founder_type, pplayer, O_FOOD)) { -- 2.11.4.GIT