Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2002:
[Freeciv-Dev] Re: [Patch] Make get_city_*_bonus public
Home

[Freeciv-Dev] Re: [Patch] Make get_city_*_bonus public

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] Make get_city_*_bonus public
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 5 May 2002 12:11:52 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sat, May 04, 2002 at 05:43:00PM -0700, Raahul Kumar wrote:
> 
> --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> <snip>
> > /**************************************************************************
> > > > -...
> > > > + Return the factor (in %) by which the shield should be multiplied.
> > > > 
> > **************************************************************************/
> > > 
> > > I would prefer:
> > > 
> > > Return the %(> 100) by which the city's base shields should be 
> > > multiplied. 
> > 
> > I can't and wouldn't ensure that the factor is always >=100. It may be
> > quite possible that there is a building which increase the shield
> > output by 50% and reduce the science output by 50%.
> 
> Thinking of the future here. Currently you can indeed give such an ironclad
> guarantee. I take it you're thinking about the AC people's patches?

Just about the currently fixed formulas which will be broken up by the
generalized improvement patch.

> > > > +int get_city_shield_bonus(struct city *pcity)
> > > >  {
> > > > -  int tmp = 0;
> > > > +  int shield_bonus = 100;
> > > > +
> > > >    if (city_got_building(pcity, B_FACTORY)) {
> > > > -    if (city_got_building(pcity, B_MFG))
> > > > -      tmp = 100;
> > > > -    else
> > > > -      tmp = 50;
> > > > +    shield_bonus += 50;
> > > > +    if (city_got_building(pcity, B_MFG)) {
> > > > +      shield_bonus += 50;
> > > > +    }
> > > 
> > > What happens if a city sells the factory, and still has a mfg plant?
> > 
> > It doesn't get any bonus.
> 
> I think this is not a good behaviour. As a player, I would expect that selling
> my marketplace/library/factory would not result in loss of all my other
> improvements along those lines. A buglet. At the very least, if the 
> improvement
> does nothing it should not cost me upkeep.

Generalized improvement should give you the power to change this
without code changes.

> > > Substitute in bank/stock exchange/university/research center for
> > > factory. It seems the freeciv manual is wrong about the behaviour. I
> > > always thought that even after selling a marketplace your bank would
> > > be bringing in money.
> > 
> > This isn't a change my patch made.
> 
> I know. I don't like this behaviour. Think about it, all a spy has to do is
> sabotage 1 building and two others are now useless, and a productive science
> city is now worthless. Pretty stiff penalty. 

> Also a great way to throw a city into disorder. Take out the temple
> and it's done for.

Ack.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Many of my assistants were fans of Tolkien, who wrote 'Lord of the Rings'
  and a number of other children's stories for adults.  The first character
  alphabet that was programmed for my plotter was Elvish rather than Latin."
    -- from SAIs "life as a computer for a quarter of a century"


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