Complete.Org:
Mailing Lists:
Archives:
freeciv-ai:
November 2002: [freeciv-ai] Re: ripped out active diplomats patch... |
[freeciv-ai] Re: ripped out active diplomats patch...[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 14 Nov 2002, Gregory Berkolaiko wrote: > 5(**) In the same function, why you don't change for > already_considered_for_diplomat field?Or is it only to prevent building > too many diplomats? Yes. It is not reset before we come here, so using it would be bad. Not sure where/when we can safely reset it, either. Not a big problem, generally. This is a more generally issue, really. > /* Check if we can achieve something... */ > if (punit->moves_left <= 0) { > return; /* ... no */ > } > if (real_distance_to_target(punit) == 1) { > ai_unit_new_role(punit, AIUNIT_NONE, -1, -1); > ai_diplomat_city(punit, ctarget); > } > What if the role was DEFEND_HOME? What if? This code won't be used if so. Problem? Rest fixed. + Added some missing code. If you ran the code I sent, you would be running old diplomats code... + Remove code which made diplomat stay and defend if general urgency... this didn't work well... diplomat sat idle while attackers descended (by boat, by faster means, from another city, etc) on the city and whacked our ass... better to go on attack. + Fixed find city to defend code, now will split up and defend multiple cities rather than all go to same city. - We usually don't have enough cash to incite in the beginning of the game. But I am reluctant to raise taxes or increase reserves, since it is too easy to get the AI into "perpetual taxmen mode" this way. New version attached. - Per
non_massive_aidip2.diff
aidiplomat.c
aidiplomat.h
|