[Freeciv-Dev] Re: [IAMBACK] [PATCH] [1.3] cleanup of proccess_*_want() (
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, 6 Apr 2002, Raahul Kumar wrote:
> --- Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx> wrote:
>
>
> > The below comment is nonsense. The clause does not apply to battleships.
> >
> > + /* I was getting four-figure desire for battleships otherwise. -- Syela
> > */
> > + if (!walls && unit_types[best_unit_type].move_type == LAND_MOVING) {
> > best *= pcity->ai.wallvalue;
> > + best /= POWER_FACTOR;
> > + }
> >
>
> What does the comment apply to then?
How should I know? I didn't write it... I vote "remove it".
Comment should provide insight, not puzzle.
> >
> > /**************************************************************************
> > +This function decides, what unit would be best for erasing enemy. It is
> > called,
> > +when we just want to kill something, we've found it but we don't have the
> > unit
> > +for killing that built yet - here we'll choose the type of that unit.
> >
> > This function does something really strange, not quite what you say.
> > But I guess your explanation is as good as any.
>
> What does it do? Petr comment is a reasonable explanation. Don't be so vague.
> How do you want it changed?
I don't really understand that. Trace the tree up from this function.
It's really weird.
No, leave the comment as it is.
> > + /* Citywalls give a defensive bonus of 300%. So for units that lack
> > the
> > + * ability to ignore city walls, the lack of a city wall makes them
> > 3
> > + * times as dangerous. Yet in this check we multiply by 9.
> > WHY????????
> > + * (Pulls out hair and screams). -- Raahul */
> > + /* FIXME: Use acity->ai.wallvalue? --pasky */
> > + vuln *= 9;
> > + }
> >
> > Raahul, please stop ruining your hairstyle!
> > City walls give bonus of 200% (that's multiplying by 3)
> > vulnerability is quadratic, so we perform mental calculation
> > 3*3 = 9 and fill in the result
>
> Back the truck up there G. I'm not quite sure I follow. Yes, vulnerability is
> quadratic. From there to multiplying city wall value by 3 is beyond me.
> Explain
> it to me without the missing steps.
I was just trying to save your hair... :((
Ok, vulnerability is Defense_Power * HP * FirePower squared
Walls increase Defense_Power three-fold.
Therefore vulnerability would increase nine-fold.
This is taking into account that although there no city-walls in the enemy
city yet, the enemy will probably build them before we get there.
The existing city walls are taken into account by
unit_vulnerability_virtual2 what_a_lovely_name_for_a_function.
> > All of my complaints are about your comments which is non-essential.
> > I haven't checked line-by-line correspondence but if you run a few
> > autogames, I think the patch can be safely committed and human resources
> > directed to pastures new (like the dreaded and bugged f_s_t_k).
>
> Not the f_s_t_k. Anything but that. What have I done to deserve this?
Don't be afraid. We will cover you back ;)
G.
- [Freeciv-Dev] Re: [IAMBACK] [PATCH] [1.3] cleanup of proccess_*_want() (PR#1295), Petr Baudis, 2002/04/05
- [Freeciv-Dev] Re: [IAMBACK] [PATCH] [1.3] cleanup of proccess_*_want() (PR#1295), Raahul Kumar, 2002/04/06
- [Freeciv-Dev] Re: [IAMBACK] [PATCH] [1.3] cleanup of proccess_*_want() (PR#1295), Gregory Berkolaiko, 2002/04/06
- [Freeciv-Dev] Re: [PATCH] [1.4] cleanup of proccess_*_want() (PR#1295), Petr Baudis, 2002/04/07
- [Freeciv-Dev] Re: [PATCH] [1.4] cleanup of proccess_*_want() (PR#1295), Raahul Kumar, 2002/04/07
- [Freeciv-Dev] Re: [PATCH] [1.5] cleanup of proccess_*_want() (PR#1295), Petr Baudis, 2002/04/08
|
|