Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] Re: (PR#12852) Major bug: AI ignores skill-level directive
Home

[Freeciv-Dev] Re: (PR#12852) Major bug: AI ignores skill-level directive

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#12852) Major bug: AI ignores skill-level directives
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Apr 2005 23:22:40 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12852 >

Jason Short wrote:

> Per, does this patch look okay?  If so I will apply it to both branches
> and we can have a quick 2.0.1 release.

That would be this patch.

? data/mom
? data/mom.serv
Index: ai/advdomestic.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/advdomestic.c,v
retrieving revision 1.128
diff -u -r1.128 advdomestic.c
--- ai/advdomestic.c    10 Mar 2005 20:05:22 -0000      1.128
+++ ai/advdomestic.c    22 Apr 2005 06:04:59 -0000
@@ -150,8 +150,11 @@
           || get_unit_type(unit_type)->pop_cost == 0)
       && pcity->surplus[O_FOOD] > utype_upkeep_cost(get_unit_type(unit_type),
                                                    gov, O_FOOD)) {
-    /* settler_want calculated in settlers.c called from ai_manage_cities() */
-    int want = pcity->ai.settler_want;
+    /* The settler want is calculated in settlers.c called from
+     * ai_manage_cities.  The expand value is the % that the AI should
+     * value expansion (basically to handicap easier difficutly levels)
+     * and is set when the difficulty level is changed (stdinhand.c). */
+    int want = pcity->ai.settler_want * pplayer->ai.expand / 100;
 
     if (ai->wonder_city == pcity->id) {
       want /= 5;

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