Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2005:
[Freeciv-Dev] Re: (PR#13772) CVS: civserver get_invention assert
Home

[Freeciv-Dev] Re: (PR#13772) CVS: civserver get_invention assert

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: yautja@xxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#13772) CVS: civserver get_invention assert
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 25 Aug 2005 11:33:49 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13772 >

Mateusz Stefek wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=13772 >
> 
>>[yautja@xxxxxxxxxxxxxxx - Thu Aug 25 07:17:34 2005]:
>>
>> > civserver: tech.c:60: get_invention: Assertion `tech == (200-2) || 
>>(tech >= 0 && tech < game.control.num_tech_types)' failed.
>>Abort
>>
>>Happens in the savegame if you turndone / timeout. Only things that stop 
>>it is giving a new research goal or changing the science rate.
> 
> Evaluation for Great Library:
> 
>       case EFT_TECH_PARASITE:
>         v += (total_bulbs_required(pplayer) * (100 - game.info.freecost)
>             * (nplayers - amount)) / (nplayers * amount * 100);
>         break;
> 
> The bug is that total_bulbs_required can't be called for A_UNSET. 
> This evaluation is also strange it strongly depends on current research
> progress. I propose the attached evaluation, which seems to be little
> more reasonable.

Shouldn't we divide by bulbs_last_turn not multiply by it?

Why does the amount of research we have matter at all?  What should 
matter is how many techs (bulbs) are available to be parasitized.  If we 
assign a fixed gold cost for each bulb (1 bulb ~= 1 gold) then we can 
ammortize this gain and find the exact gold benefit of making the wonder.

P.S.  All want calculations should be in units of gold.

-jason





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