Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: [PATCH] [1.1] cleanup of proccess_*_want() (PR#1295)]
Home

[Freeciv-Dev] Re: [PATCH] [1.1] cleanup of proccess_*_want() (PR#1295)]

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] [1.1] cleanup of proccess_*_want() (PR#1295)]
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Mon, 4 Mar 2002 12:16:06 +0100

Dear diary, on Mon, Mar 04, 2002 at 04:15:32AM CET, I got a letter,
where Raahul Kumar <raahul_da_man@xxxxxxxxx> told me, that...
> 
> --- Petr Baudis <pasky@xxxxxxxxxxx> wrote:
> > Dear diary, on Sun, Mar 03, 2002 at 09:46:21PM CET, I got a letter,
> > where "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx> told me, that...
> > > On Sun, 3 Mar 2002, Petr Baudis wrote:
> > > >   so, now I'm trying my luck with getting something slightly larger and
> > more
> > > > complicated into CVS - this cleanup cleans
> > proccess_(defender|attacker)_want()
> > > > functions, corrects TODO appropriatelly, and renames pcity->ai.(f|a) 
> > > > into
> > > > something more descriptive. Behaviour is not changed (autogames are
> > same).
> > > 
> > > One behaviour that should be changed is the AI's inclination to build way
> > > too many city walls and coastal fortresses, while leaving its cities
> > > without a single defender when it thinks they are out of danger. Too many
> > > times I've seen these cities invaded and taken over by barbarians.
> > 
> > Post a patch on the top of this ;). Oh well, or it won't be probably so hard
> > to
> > fix..  but I'm not sure if the problem lies here or in assess_danger() or
> > in...
> > 
> > But no behaviour changes in this patch, please.
> > 
> > > >    bool walls = city_got_citywalls(pcity);
> > > 
> > > > +        if (walls && move_type == LAND_MOVING) {
> > > > +          desire *= pcity->ai.wallvalue;
> > > > +          desire /= 10;
> 
> POWER_FACTOR should be here instead of 10.

It shouldn't. ai.wallvalue is just multiplied by 10 so that it has enough
precision and doesn't have to be a float. See assess_danger().

-- 

                                Petr "Pasky" Baudis

* elinks maintainer                * IPv6 guy (XS26 co-coordinator)
* IRCnet operator                  * FreeCiv AI hacker
.
"If you have acquired knowledge, what do you lack?
    If you lack knowledge, what have you acquired?"
Lev. R. 1:6
.
Public PGP key && geekcode && homepage: http://pasky.ji.cz/~pasky/


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