Complete.Org: Mailing Lists: Archives: freeciv-ai: November 2002:
[freeciv-ai] Re: patch: protect palace
Home

[freeciv-ai] Re: patch: protect palace

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: patch: protect palace
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Mon, 18 Nov 2002 18:27:16 +0000 (GMT)

On Mon, 18 Nov 2002, Per I. Mathisen wrote:

> Taken from massive ai patch. I intend to commit it. Scream up if you
> disagree. - Per

AAAAAA!

Watch your includes!

Also, 
        10 - (11 - size) 
is a strange way to put things.  Can't you simplify it to 
        size - 1 ?  
Or just to 
        size, 
for that matter?

But it's a good idea, yes.

G.


> 
> Index: ai/advmilitary.c
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/ai/advmilitary.c,v
> retrieving revision 1.120
> diff -u -r1.120 advmilitary.c
> --- ai/advmilitary.c    2002/11/14 09:14:49     1.120
> +++ ai/advmilitary.c    2002/11/18 13:43:50
> @@ -28,6 +28,8 @@
>  #include "cityturn.h"
>  #include "gotohand.h"          /* warmap has been redeployed */
>  #include "settlers.h"
> +#include "diplomats.h"
> +#include "player.h"
> 
>  #include "aiair.h"
>  #include "aicity.h"
> @@ -429,6 +431,12 @@
>      if (unit_flag(punit, F_PIKEMEN)) pikemen = TRUE;
>    } unit_list_iterate_end;
> 
> +  /* Add some default danger to protect palace, but don't do this
> +   * early game. */
> +  if (city_got_building(pcity, B_PALACE)) {
> +    danger[0] += 10 - (11 - pcity->size);
> +  }
> +
>    players_iterate(aplayer) {
>      int boatspeed;
>      int boatid, boatdist;
> 
> 
> 
> 



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