Author: cazfi Date: Tue Feb 16 14:45:22 2016 New Revision: 31939 URL: http://svn.gna.org/viewcvs/freeciv?rev=31939&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: branches/S2_5/ai/default/aicity.c Modified: branches/S2_5/ai/default/aicity.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/ai/default/aicity.c?rev=31939&r1=31938&r2=31939&view=diff ============================================================================== --- branches/S2_5/ai/default/aicity.c (original) +++ branches/S2_5/ai/default/aicity.c Tue Feb 16 14:45:22 2016 @@ -765,6 +765,11 @@ military_advisor_choose_build(ait, pplayer, pcity, &city_data->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 */ @@ -777,6 +782,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