Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Tech cost patch v4
Home

[Freeciv-Dev] Tech cost patch v4

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Petr Baudis <pasky@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Tech cost patch v4
From: Juha Litola <slave@xxxxxxxxxxxx>
Date: Wed, 28 Nov 2001 18:11:39 +0200

On Wed, Nov 28, 2001 at 04:13:48PM +0100, Petr Baudis wrote:

> > > Shouldn't you also modify ai/advmilitary.c ? >:)
> > I hope not, I haven't got faintest idea what happens there. Someone
> > more familiar with ai should probably check if modifications are
> > needed.
> Use grep. Your GREAT friend! It tells me:
> freeciv/ai/advmilitary.c:        techcost = techdist * (techdist + 
> pplayer->research.researchpoints) *
> freeciv/ai/advmilitary.c:      l = k * (k + pplayer->research.researchpoints) 
> * game.researchcost;
> So run your favourite editor, hunt these lines and modify them :-).
My version didn't have line with techcost, only two lines with l = k...
Fixed them to use new goal_tech_cost function which I added to 
common/tech.c. aitech.c seems to use research_time so it should work.
Hopefully ai will now be ok.

I also added gtk-client to show costs for goals.

--
// Juha Litola

Attachment: tech_cost_style4.diff
Description: Text document

Attachment: pgpA2BKDhdMAa.pgp
Description: PGP signature


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