Author: cazfi
Date: Fri Jul 31 14:03:32 2015
New Revision: 29278

URL: http://svn.gna.org/viewcvs/freeciv?rev=29278&view=rev
Log:
Made AI to value Have_Embassies effect based on how many new contacts it 
provides, to meet and trade techs etc. with.

See patch #5844

Modified:
    branches/S2_6/ai/default/daieffects.c

Modified: branches/S2_6/ai/default/daieffects.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/ai/default/daieffects.c?rev=29278&r1=29277&r2=29278&view=diff
==============================================================================
--- branches/S2_6/ai/default/daieffects.c       (original)
+++ branches/S2_6/ai/default/daieffects.c       Fri Jul 31 14:03:32 2015
@@ -318,7 +318,17 @@
     }
     break;
   case EFT_HAVE_EMBASSIES:
-    v += 5 * nplayers;
+    {
+      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 += 32 * new_contacts;
+    }
     break;
   case EFT_REVEAL_CITIES:
   case EFT_NO_ANARCHY:


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

Reply via email to