Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] Re: (PR#7236) removal of most direct references to build_c
Home

[Freeciv-Dev] Re: (PR#7236) removal of most direct references to build_c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: use_less@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7236) removal of most direct references to build_cost
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Mon, 2 Feb 2004 04:30:56 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7236 >

On Mon, Feb 02, 2004 at 03:48:36AM -0800, Per I. Mathisen wrote:
> > > server/cityturn.c, line ~1200
> > >
> > >unit_list_iterate(map_get_tile(pcity->x,pcity->y)->units, punit) {
> > >   cost += unit_type(punit)->build_cost * game.incite_cost.unit_factor;
> > > } unit_list_iterate_end;
> > >
> > > /* Buildings */
> > > built_impr_iterate(pcity, i) {
> > >   if (!is_wonder(i)) {
> > >     cost += improvement_value(i) * game.incite_cost.improvement_factor;
> > >   } else {
> > >     cost += improvement_value(i) * 2 *
> > > game.incite_cost.improvement_factor;
> > >   }
> > > } built_impr_iterate_end;
> > >
> > > I set these to buy costs because I wanted to make sure the calculation
> > > for inciting the city was independent of the number of shields and more
> > > a reflection of the buying cost. If my accelerated production patch
> > > were applied here, the price of inciting a city would drop.
> 
> Why shouldn't it? The relative value of the buildings would drop as they
> become faster to build. I don't really care either way, though.
> 
> > Both are AI estimates. I think the original code was already a
> > kludge.
> 
> The second is not AI code.

I mistake it for city_gold_worth. Same structure.

> The first, while not very good code, is not a kludge.

It compares gold with shields directly. Or is the factor of 2 the
exchange between gold and shields?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "How about the new language C&? No, that's not 'c ampersand', 'c reference', 
  'reference to c' or 'c and'. It's pronounced 'campersand', to confuse the 
  hell out of people who are unfamiliar with it, and it will, of course, 
  have no pointers."
    -- Xazziri in comp.lang.c++ about C#




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