[freeciv-ai] patch: protect palace
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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;
- [freeciv-ai] patch: protect palace,
Per I. Mathisen <=
|
|