[Freeciv-Dev] Re: (PR#12781) Create AI guard API
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12781 >
Jason Short wrote:
...
> Is it correct that a unit may only have one bodyguard but a city may
> have many?
It is an implicit assumption of most of the bodyguard code. And multiple
unit-bodyguards are useless for rule-sets with killstack=1: that is, all
rule-sets for which the AI has been intended so far.
Perhaps we should allow units to have multiple guards, to provide better
behaviour for killstack=0 rule-sets?
> So a similar function for a city wouldn't be useful - nor is
> there any quick way to find out what units are guarding a city...
We could add a list of guards to the city struct. I did that for my big
movemap-using guards patch. But it is unnecessary for the existing code.
However, having each city (and unit?) have a list of its guard units
might be useful in the future. Is it worthwhile for me to do that?
Perhaps for version 2 of this API :-)
...
> Wait a minute. Units and cities can have the same IDs right (even if
> it's not true it's not a safe assumption)?
They can? The assumption that they can not is made in several places in
the current bodyguard code. Can someone confirm whether the IDs are
distinct?
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Benedict Adamson, 2005/04/13
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Per I. Mathisen, 2005/04/13
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Jason Short, 2005/04/13
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Per I. Mathisen, 2005/04/14
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API,
Benedict Adamson <=
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Jason Short, 2005/04/15
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Benedict Adamson, 2005/04/15
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Benoit Hudson, 2005/04/15
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Per I. Mathisen, 2005/04/18
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Jason Short, 2005/04/18
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Per I. Mathisen, 2005/04/18
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Mike Kaufman, 2005/04/18
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Benedict Adamson, 2005/04/18
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Vasco Alexandre da Silva Costa, 2005/04/18
- [Freeciv-Dev] Re: (PR#12781) Create AI guard API, Per I. Mathisen, 2005/04/19
|
|