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

[freeciv-ai] patch: protect palace

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] patch: protect palace
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Mon, 18 Nov 2002 13:51:25 +0000 (GMT)

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

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]