[Freeciv-Dev] Re: [PATCH2] Re: AI questions
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Nov 24, 2001 at 09:29:59PM +0100, Petr Baudis wrote:
> So here it goes, splitted into two separate patches. First one improves
> formatting, second one changes testing for B_CITY by testing for zero upkeep
> in
> ruleset.
>
> Also, I'm including corrected version of explorer patch, grep betrayed me and
> didn't show tokens in server/unit(hand|tools).c - I really hope i will
> *finally* start posting correct patches :|.
> diff -ru freeciv/ai/aicity.c freeciv+pasky/ai/aicity.c
> --- freeciv/ai/aicity.c Sat Nov 24 20:26:37 2001
> +++ freeciv+pasky/ai/aicity.c Sat Nov 24 20:36:45 2001
> @@ -315,7 +315,10 @@
>
> for (id = 0; id < game.num_impr_types; id++) {
> /* selling walls to buy defenders is counterproductive -- Syela */
> - if (can_sell_building(pcity, id) && id != B_CITY) {
> + /* Selling palace too. Virtually selling of every building with
> + * original upkeep 0. We can't exempt all buildings with real
> + * upkeep 0 because e.g. B_ASMITHS. --pasky */
> + if (can_sell_building(pcity, id) && improvement_types[i].upkeep) {
This is such a place where more then just the change is required. Yes
I would agree that the change is reasonable at first sight. However
you have to understand it. So the question is which improvements make
"can_sell_building(pcity, id) && improvement_types[i].upkeep" true and
aren't city walls or the palace. This would be one extra check and a
freelog and a test run. However you have to keep in mind that
can_sell_building depends on the city.
So this becames:
for (id = 0; id < game.num_impr_types; id++) {
if((!is_wonder(id)) && improvement_types[id].upkeep)
{
if(id!=B_CITY && id!=B_PALACE)
freelog(LOG_NORMAL,"%d",id);
}
Can you test this?
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"That's fundamental game play! My main enemy is *ALWAYS* fighting
a 4-front war. I make sure of it!"
-- Tony Stuckey, freeciv-dev
- [Freeciv-Dev] Re: AI, (continued)
- [Freeciv-Dev] Re: AI, Petr Baudis, 2001/11/25
- [Freeciv-Dev] Re: AI, Petr Baudis, 2001/11/25
- [Freeciv-Dev] Re: AI, Raahul Kumar, 2001/11/27
- [Freeciv-Dev] Re: AI (THRESHOLD magic), Petr Baudis, 2001/11/27
- [Freeciv-Dev] Re: AI (THRESHOLD magic), Raahul Kumar, 2001/11/28
- [Freeciv-Dev] Re: AI (THRESHOLD magic), Raahul Kumar, 2001/11/28
- [Freeciv-Dev] [PATCH2] Re: AI questions, Petr Baudis, 2001/11/24
- [Freeciv-Dev] Re: [PATCH2] Re: AI questions, Raahul Kumar, 2001/11/24
- [Freeciv-Dev] Re: [PATCH2] Re: AI questions, Petr Baudis, 2001/11/25
- [Freeciv-Dev] Re: [PATCH2] Re: AI questions, Raimar Falke, 2001/11/26
- [Freeciv-Dev] Re: [PATCH2] Re: AI questions,
Raimar Falke <=
- [Freeciv-Dev] Re: [PATCH2] Re: AI questions, Petr Baudis, 2001/11/25
- [Freeciv-Dev] Re: [PATCH2] Re: AI questions, Petr Baudis, 2001/11/25
- [Freeciv-Dev] Re: [PATCH2] Re: AI questions, Raimar Falke, 2001/11/25
- [Freeciv-Dev] Re: [PATCH2] Re: AI questions, Petr Baudis, 2001/11/25
- [Freeciv-Dev] Re: AI questions, Raahul Kumar, 2001/11/24
- [Freeciv-Dev] Re: AI questions, Petr Baudis, 2001/11/24
- [Freeciv-Dev] Re: AI questions, Ross W. Wetmore, 2001/11/25
- [Freeciv-Dev] Re: AI questions, Raahul Kumar, 2001/11/26
- [Freeciv-Dev] Re: AI questions, Ross W. Wetmore, 2001/11/30
[Freeciv-Dev] Re: AI questions, Reinier Post, 2001/11/24
|
|