(PR#9063) Bug: AI can't handle notradesize/fulltradesize

"Mateusz Stefek" <mstefek-IjDXvh/[email protected]>
Newsgroups gmane.games.freeciv.ai
Message-ID <[email protected]>
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9063 >

> [mstefek - Fri Sep 24 10:16:15 2004]:
> 
> Here's a patch. It helps a bit.
> You can really see a difference in worker arrangement.
> Of course it doesn't solve whole problem, but it's worth commiting
> AI should build more harbours and irrigate more.
> --
> mateusz
>
notrade.diff (text/x-patch, 723 B)
Index: cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.264
diff -u -r1.264 cityturn.c
--- cityturn.c	22 Sep 2004 02:00:58 -0000	1.264
+++ cityturn.c	24 Sep 2004 10:11:21 -0000
@@ -205,7 +205,11 @@
    * are on a different scale.  Later the ai may wish to adjust its
    * priorities - this should be done via a separate set of variables. */
   if (pcity->size > 1) {
-    cmp.factor[FOOD] = 10;
+    if (pcity->size <= game.notradesize) {
+      cmp.factor[FOOD] = 15;
+    } else {
+      cmp.factor[FOOD] = 10;
+    }
   } else {
     /* Growing to size 2 is the highest priority. */
     cmp.factor[FOOD] = 20;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.