Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] (PR#5672) Changing production categories when having to mu
Home

[Freeciv-Dev] (PR#5672) Changing production categories when having to mu

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ue80@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#5672) Changing production categories when having to much shields
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 2 Sep 2003 13:39:49 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[ue80@xxxxxxxxxxxxxxxxxxxxx - Mon Sep  1 18:51:48 2003]:

> Set production in a size 1 city to settlers. Wait until you have 200
> shields, change the production to warrior and set the next item in the
> worklist to foo (foo item from improvement/wonder) You get the warrior
> and have ~ 190 shields for the wonder or improvement. That shouldn't be
> possible. You should lose 95 shields when doing that.

As discussed in a separate thread, I think this is a bug.  The
unpenalized shields you get to use the turn after building something
should be restricted to just those shields produced on the last turn
when it was built.

So if you have 196 shields and change your production to warrior, with a
surplus of 4, then you'll end up next turn with 190 shields (196+4-10)
and you'll still be making a warrior.  But if you change to a wonder,
186 of these shields will be penalized (at 50%) so you'll end up with
just 97 shields.

OTOH in the most common case it still works as it does now: if you have
8 shields with +4 surplus and you're building a warrior next turn you'll
end up with 2.  And however you change your production these 2 will not
be penalized.

Here's a patch.  It's more complicated than I would have thought since
an extra piece of data has to be sent all around: the city's surplus
from the previous turn.

Please test.  Design board, please comment.

jason

Attachment: production_penalties.diff
Description: production_penalties.diff


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