Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2002:
[Freeciv-Dev] Re: Introducing a new define for IgTer units (PR#1359)
Home

[Freeciv-Dev] Re: Introducing a new define for IgTer units (PR#1359)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, <bugs@xxxxxxxxxxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Introducing a new define for IgTer units (PR#1359)
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Thu, 4 Apr 2002 11:49:54 +0100 (BST)

On Wed, 3 Apr 2002, Raahul Kumar wrote:

> 
> --- Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx> wrote:
> > The idea of the patch is very right.  The implementation is not that good 
> > and terribly far from being full (see 1 and 2 below)
> > 
> > On Tue, 2 Apr 2002, Raahul Kumar wrote:
> > 
> > > Just read the patch. New #define, introducing IGTER_MOVE_BONUS. Replacing 
> > > a
> > few misplaced 3's and SINGLE_MOVE's with the correct constant.
> > 
> > 1. by definition of IGTER units 
> > IGTER_MOVE_BONUS = SINGLE_MOVE / MOVE_COST_ROAD
> > 
> 
> I'm not sure I agree with you here. I considered doing exactly what you
> proposed
> above. My reasoning is why lock in SINGLE MOVE or MOVE_COST_ROAD when really
> they have nothing to do with igter units. Who says you can't have igter units
> that cross squares with 1/6 move cost? This is not so hypothetical. I'm
> planning
> to make SINGLE_MOVE 6 instead of 3 so I can have these kind of fractional
> movepoints.

According to the docs, igter units treat every terrain as a road.

> > 2. Only three differences are fixed.
> > A simple search gives far more hits:
> 
> I know. I haven't touched these ones because I've got patches fixing
> functions that fix these as incidentals.

interlacing patches...  that's difficult

>  
> > ai/advmilitary.c, line 203 -- else if (unit_flag(punit, F_IGTER))
> > ai/advmilitary.c, line 462 -- if (unit_type_flag(i, F_IGTER) && !def) cur 
> > *= 3;
> 
> This one I'm still unsure of. This cur doesn't seem to be just move_rate.
> 
> > ai/advmilitary.c, line 597 -- q = (acity ? 1 : unit_types[n].move_rate * 
> > (unit_type_flag(n, F_IGTER) ? 3 : 1));
> > ai/advmilitary.c, line 598 -- if (unit_type_flag(i, F_IGTER)) m *= 
> > SINGLE_MOVE; /* not quite right */
> > ai/advmilitary.c, line 731 -- if (unit_type_flag(v, F_IGTER)) m *= 3; /* 
> > not quite right */
> 
> > ai/advmilitary.c, line 795 -- if (unit_flag(pdef, F_IGTER)) dist *= 3;
> 
> Dist is not always move_rate either. I've yet to untangle exactly what dist 
> is.
> 
> > ai/advmilitary.c, line 800 -- if (unit_type_flag(v, F_IGTER)) m *= 3; /* 
> > not quite right */
> > ai/aiunit.c, line 191 -- if (unit_flag(punit, F_IGTER)) {
> 
> > ai/aiunit.c, line 1219 -- if (unit_flag(punit, F_IGTER)) d_val /= 1.5;
> 
> What are you expecting me to do with d_val /= 1.5. I don't know what to put
> here instead. I'm not going to touch this at all.
> 
> > ai/aiunit.c, line 1600 -- if (unit_flag(punit, F_IGTER)) m *= SINGLE_MOVE;
> > ai/aiunit.c, line 1789 -- if (unit_flag(aunit, F_IGTER)) n *= 3;
> 
> I'm getting replacing n in the next patch. Fear not. These lines will 
> disappear
> soon.  
>  
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
> 



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