[Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Dear diary, on Thu, Dec 20, 2001 at 03:56:35PM CET, I got a letter,
where Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx> told me, that...
> > +Get value of best usable title on city map.
>
> Usable tile.
Eek ;).
> > }
> > + /* If units are making us unhappy, count that too. */
> > + sad += pcity->ppl_unhappy[3] - pcity->ppl_unhappy[2];
> > + /* Angry citizens has to be counted double!? */
>
> they _have_ to be counted double
Hey, this was in original source too! ;))
> > - j += 16 * (sad + bored); /* Desperately seeking Colosseum */
> > - while (i) { i--; j += 16; } /* 16 is debatable value */
> > - /* using (i && bored) led to a lack of foresight,
> > - especially re: Chapel -- Syela */
> > - freelog(LOG_DEBUG, "%s: %d elvis %d sad %d bored %d size %d max %d
> > val",
> > + value += SADVAL * (sad + content);
> > +
> > + /* Usage of (happy && bored) led to a lack of foresight, especially
> > + * re: Chapel -- Syela */
> > + while (happy) { happy--; happy += SADVAL; }
> ^^^^^^^^
> surely you mean value here ;)
Ouch. I don't get it, but my autogame tests just *didn't* catch that. And
funny that even both Raahul and Ross didn't notice it as well. Coincidence can
be really evil.
> actually i liked the name "bored". with an appropriate comment it's
> quite good and funny
I feel pretty neutral about this.
> > +Pollution benefit or cost of given improvement.
> > +
> > +Positive return value: less pollution if this improvement would be
> > built
> > +Negative return value: more pollution if this improvement would be
> > built
> > +Higher distance from zero means higher effect, naturally.
>
> Maybe "Bigger absolute value means greater effect" ?
I thought about absolute value and didn't like it. When i read it now,
i like it somewhat more :).
> The below is very anti-generalised improvements, right?
>
> > + /* Count production bonuses generated by various buildings. */
> > + if (city_got_building(pcity, B_FACTORY) || impr_type == B_FACTORY) {
> > + prodbonus += 50;
> > + if (city_got_building(pcity, B_MFG) || impr_type == B_MFG) {
> > + prodbonus *= 2;
> > }
Whole pollution_cost was very anti-generalised improvements.
But this is step in the right direction, IMHO, as I think it's still much
better than if B_FACTORY, add 100 if B_MFG, else add 50.
Generalised improvements is also reason why I'm going to skip ai_build_eval()
this time, as such an effort hasn't big mean for now.
> In general the patch is very good and I can only pity it's sad fate.
Ehm? What? Sad fate?! ;)
Attached patch implemented your dreams.
--
Petr "Pasky" Baudis
UN*X programmer, UN*X administrator, hobbies = IPv6, IRC, FreeCiv hacking
.
"A common mistake that people make, when trying to design
something completely foolproof is to underestimate the
ingenuity of complete fools."
-- Douglas Adams in Mostly Harmless
.
Public PGP key, geekcode and stuff: http://pasky.ji.cz/~pasky/
advdomestic.c.diff
Description: Text document
- [Freeciv-Dev] [PATCH] advdomestic.c cleanup (PR#1149), Petr Baudis, 2001/12/19
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Gregory Berkolaiko, 2001/12/21
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Petr Baudis, 2001/12/21
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Gregory Berkolaiko, 2001/12/21
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Raimar Falke, 2001/12/21
- [Freeciv-Dev] Re: [PATCH] advdomestic.c cleanup (PR#1149), Gregory Berkolaiko, 2001/12/21
|
|