Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2000:
[Freeciv-Dev] Re: [FreeCiv-Cvs] jjm: Fixes city_turns_to_build() to cons
Home

[Freeciv-Dev] Re: [FreeCiv-Cvs] jjm: Fixes city_turns_to_build() to cons

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [FreeCiv-Cvs] jjm: Fixes city_turns_to_build() to consider the 1 s...
From: "Mike Jing" <miky40@xxxxxxxxxxx>
Date: Sat, 29 Jan 2000 17:06:10 EST
Reply-to: mike_jing@xxxxxxxxx

At Sat, 29 Jan 2000 13:54:31, Jeff Mallatt Wrote
Fixes city_turns_to_build() to consider the 1 shield given to
cities that are not in disorder, but have a zero shield
surplus.  Removes duplicate city_turns_to_build() from gui-mui
code.
Addresses PR#238.
Patch submitted by Mike Jing <miky40@xxxxxxxxxxx>.

Is this really right?  I'm pretty sure that in CivII, if a city
has a surplus of zero, it doesn't build anything.  The CivII
"turns to build" acts as if it does, but I assume that's just
it's way of avoiding divide by zero.

You are correct.  Neither Civ1 nor Civ2 give this "extra"
shield.

If that's the case, it's better be fixed in Freeciv. The code is in server/cityturn.c, line 1128:

  if(pcity->shield_surplus<=0 && !city_unhappy(pcity))
    pcity->shield_surplus=1;

Since I have never played Civ2, I didn't know if this is the correct behavior. In fact, at first I was mystified and thought it was a bug. I actually asked Jeff about it some time ago and he pointed out the above code to me. So when the "turns to build" patch was applied I thought this should be taken into consideration. Now it seems this is indeed a bug. Oh well...

Mike

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


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