Author: cazfi
Date: Fri Jul 31 14:00:12 2015
New Revision: 29277

URL: http://svn.gna.org/viewcvs/freeciv?rev=29277&view=rev
Log:
Made AI to value Have_Contacts effect more.

See patch #5844

Modified:
    trunk/ai/default/daieffects.c

Modified: trunk/ai/default/daieffects.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/daieffects.c?rev=29277&r1=29276&r2=29277&view=diff
==============================================================================
--- trunk/ai/default/daieffects.c       (original)
+++ trunk/ai/default/daieffects.c       Fri Jul 31 14:00:12 2015
@@ -318,8 +318,18 @@
     }
     break;
   case EFT_HAVE_CONTACTS:
-    v += 3 * nplayers;
-    break; 
+    {
+      int new_contacts = 0;
+      
+      players_iterate_alive(theother) {
+        if (player_diplstate_get(pplayer, theother)->contact_turns_left <= 0) {
+          new_contacts++;
+        }
+      } players_iterate_alive_end;
+
+      v += 30 * new_contacts;
+    }
+    break;
   case EFT_HAVE_EMBASSIES:
     v += 2 * nplayers;
     break;


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

Reply via email to