[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]
On Sun, Feb 17, 2002 at 11:11:23PM +0100, Petr Baudis wrote:
> Dear diary, on Sun, Feb 17, 2002 at 11:05:17PM CET, I got a letter,
> where Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> told me, that...
> > On Sun, Feb 17, 2002 at 09:29:23PM +0000, Gregory Berkolaiko wrote:
> > > --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > > > On Sun, Feb 17, 2002 at 07:10:08PM +0000, Gregory Berkolaiko wrote:
> > > > > --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > > > > > >
> > > > > > > /* We won't travel into cities, unless we are able to do
> > > > > > > so -
> > > > > > diplomats
> > > > > > > * and caravans can. */
> > > > > > > /* FIXME/TODO: special flag for this? --pasky */
> > > > > > > /* FIXME: either comment or code is wrong here :-)
> > > > > > > --pasky */
> > > > > > > if (map_get_city(x1, y1) && (unit_flag(punit, F_DIPLOMAT)
> > > > > > > ||
> > > > > > > unit_flag(punit, F_CARAVAN)))
> > > > > > > continue;
> > > > > > >
> > > > > >
> > > > > > I would suggest changing the comment to something like:
> > > > > > Traveling into cities is special for diplomats and caravans. So
> > > > > > skip
> > > > > > them.
> > > > >
> > > > > Eh?
> > > > > I didn't quite understand what Petr said but I think the code is
> > > > > wrong.
> > > > > There should be ! before testing for flags...
> > > >
> > > > Test it. If you disable the if altogether or invert it thing you will
> > > > get popup at the client side that a diplomat or caravan have entered
> > > > the city. IMHO the if is there to prevent this. And yes the comment
> > > > has to be updated. And yes this may lead to sub-optimal paths for
> > > > diplomats and caravans.
> > >
> > > 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))
> Then we should evade only foreign cities..
See can_unit_attack_unit_at_tile for the full story. Also
"get_attack_power(punit)>0" is used at some point.
> Also we will still try to get into those cities with explorers and
> settlers.. not a best idea, IMHO.
Why not?
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"If at first you don't succeed... well so much for skydiving."
- [Freeciv-Dev] [RFC] Behaviour of units in eXplore mode near cities, Petr Baudis, 2002/02/16
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Raimar Falke, 2002/02/17
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Gregory Berkolaiko, 2002/02/17
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Gregory Berkolaiko, 2002/02/18
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Raimar Falke, 2002/02/18
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Petr Baudis, 2002/02/20
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Mike Kaufman, 2002/02/20
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Petr Baudis, 2002/02/20
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Raimar Falke, 2002/02/20
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Reinier Post, 2002/02/20
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Raimar Falke, 2002/02/22
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Tony Stuckey, 2002/02/18
- [Freeciv-Dev] Re: [RFC] Behaviour of units in eXplore mode near cities, Raimar Falke, 2002/02/18
|
|