Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities
Home

[Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Petr Baudis <pasky@xxxxxxxxxxx>
Cc: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>, Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities
From: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 20 Feb 2002 12:48:37 -0600

On Wed, Feb 20, 2002 at 07:42:12PM +0100, Petr Baudis wrote:
> Dear diary, on Mon, Feb 18, 2002 at 03:13:48PM CET, I got a letter,
> where Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> told me, that...
> > On Mon, Feb 18, 2002 at 12:33:22PM +0000, Gregory Berkolaiko wrote:
> > >  --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote: 
> > > > On Sun, Feb 17, 2002 at 09:29:23PM +0000, Gregory Berkolaiko wrote:
> > > > >
> > > > > yep, you are right.
> > > > > than nobody should go to cities while exploring (explorers shouldn't
> > > > attack,
> > > > > right?)
> > > > 
> > > > We could expand the test to
> > > >   if (map_get_city(x1, y1) && (unit_flag(punit, F_DIPLOMAT) ||
> > > >                                unit_flag(punit, F_CARAVAN)) ||
> > > >                                is_military_unit(punit))
> > > 
> > > which leaves us whom?  
> > 
> > > explorers?  can they go into cities?  no.
> > 
> > What have I forgot here? Why can't explorers be moved into cities?
> 
> I hope we're talking about foreign cities. As I said, we should generally test
> if the city is foreign, no problem in moving through own cities.

this reminds me that at the bottom of your patch, you should at least write
a comment to the effect of "when ai diplomacy happens, this should change
so a unit doesn't always move into (attempt to conquer) an ally's city when 
it could be doing something better."

since diplomacy is non-functional anyway, you could write that code here
just have the new function return 1 (or zero) if that's what you need for
it to do nothing. 

-mike


[Prev in Thread] Current Thread [Next in Thread]