Author: cazfi Date: Tue Feb 16 14:45:10 2016 New Revision: 31937 URL: http://svn.gna.org/viewcvs/freeciv?rev=31937&view=rev Log: When AI switches to war footing mode, make settler and worker wants wants zero instead of keeping what ever value they used to have.
See bug #24404 Modified: trunk/ai/default/aicity.c Modified: trunk/ai/default/aicity.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aicity.c?rev=31937&r1=31936&r2=31937&view=diff ============================================================================== --- trunk/ai/default/aicity.c (original) +++ trunk/ai/default/aicity.c Tue Feb 16 14:45:10 2016 @@ -856,6 +856,11 @@ adv_free_choice(choice); TIMING_LOG(AIT_CITY_MILITARY, TIMER_STOP); if (dai_on_war_footing(ait, pplayer) && city_data->choice.want > 0) { + city_data->settler_want = 0; + city_data->founder_want = 0; + city_data->founder_turn = game.info.turn; /* Do not consider zero we set here + * valid value, if real want is needed. + * Recalculate immediately in such situation. */ continue; /* Go, soldiers! */ } /* Will record its findings in pcity->settler_want */ @@ -868,6 +873,8 @@ /* Will record its findings in pcity->founder_want */ contemplate_new_city(ait, pcity); /* Avoid recalculating all the time.. */ + /* This means AI is not very opportunistic if there happens to open up spot for + * a new city. */ city_data->founder_turn = game.info.turn + fc_rand(AI_CITY_RECALC_SPEED) + AI_CITY_RECALC_SPEED; } else if (pcity->server.debug) { _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits