Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2002:
[Freeciv-Dev] Re: city_incite_cost
Home

[Freeciv-Dev] Re: city_incite_cost

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: city_incite_cost
From: rf13@xxxxxxxxxxxxxxxxx
Date: Thu, 26 Sep 2002 06:22:59 -0700

On Wed, Sep 25, 2002 at 05:21:30PM +0000, Per I. Mathisen wrote:
> On Wed, 25 Sep 2002, Thomas Strub wrote:
> > i think that the city_incite_cost for cities with units, buildings and
> > wonders in it is to cheap.
> >
> > My approach for city_value is not final, so feel free to upgrade it.
> 
> I intend to change this function to
> 
>       int city_incite_cost(pplayer, pcity)
> 
> and remove pcity->incite_revolt_cost before adding the AI diplomats patch,
> in order to get some code consistency. This means moving the
> half-price-if-previously-your-city check into this function.

Yes please do. I hate functions which set some field and also return a
value (same or not).

> Anyway, back to your patch.
> 
>    if (city_got_building(pcity, B_PALACE)) {
>      pcity->incite_revolt_cost = INCITE_IMPOSSIBLE_COST;
> 
> I think INCITE_IMPOSSIBLE_COST should be changed to -1, so that bugs
> dealing with it don't get hidden but properly blow up in our faces.

You need a capability if you do this.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx


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