Author: cazfi
Date: Sun Sep 13 20:14:53 2015
New Revision: 29878

URL: http://svn.gna.org/viewcvs/freeciv?rev=29878&view=rev
Log:
AI want to conquer a city is based on the value of the city, not to hardcoded 
value.

See patch #6340

Modified:
    branches/S2_6/ai/default/advmilitary.c
    branches/S2_6/ai/default/aiunit.c

Modified: branches/S2_6/ai/default/advmilitary.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/ai/default/advmilitary.c?rev=29878&r1=29877&r2=29878&view=diff
==============================================================================
--- branches/S2_6/ai/default/advmilitary.c      (original)
+++ branches/S2_6/ai/default/advmilitary.c      Sun Sep 13 20:14:53 2015
@@ -1247,7 +1247,7 @@
     }
     if (unit_can_take_over(myunit) || acity_data->invasion.occupy > 0) {
       /* bonus for getting the city */
-      benefit += 40;
+      benefit += acity_data->worth / 5;
     }
 
     /* end dealing with cities */

Modified: branches/S2_6/ai/default/aiunit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/ai/default/aiunit.c?rev=29878&r1=29877&r2=29878&view=diff
==============================================================================
--- branches/S2_6/ai/default/aiunit.c   (original)
+++ branches/S2_6/ai/default/aiunit.c   Sun Sep 13 20:14:53 2015
@@ -1362,7 +1362,7 @@
                            || 0 < acity_data->invasion.occupy)) {
         /* There are units able to occupy the city after all defenders
          * are killed! */
-        benefit += 60;
+        benefit += acity_data->worth * reserves / 5;
       }
 
       attack = attack_value + acity_data->attack;


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to