Complete.Org: Mailing Lists: Archives: freeciv-ai: September 2005:
[freeciv-ai] (PR#14053) naive AI and ceasefire
Home

[freeciv-ai] (PR#14053) naive AI and ceasefire

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [freeciv-ai] (PR#14053) naive AI and ceasefire
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Tue, 20 Sep 2005 06:30:42 -0700
Reply-to: bugs@xxxxxxxxxxx

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

> [mstefek - Tue Sep 20 13:14:55 2005]:
> 
> Often when I have ceasefire with the AI, I break it to take some empty
> cities then I ask for ceasefire in the same turn. AI accepts. I can do
> this many times. Seems that such behaviour doesn't affect AI's attitude.
> AI is still neutral towards me after many tries.

The bug is a simple mistake in ai_incident_war().
--
mateusz
Index: advdiplomacy.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/advdiplomacy.c,v
retrieving revision 1.91
diff -u -r1.91 advdiplomacy.c
--- advdiplomacy.c      8 Sep 2005 19:51:23 -0000       1.91
+++ advdiplomacy.c      20 Sep 2005 13:28:27 -0000
@@ -1593,7 +1593,7 @@
         pplayer->ai.love[violator->player_no] -= MAX_AI_LOVE / 10;
       }
       if (victim == pplayer) {
-        pplayer->ai.love[violator->player_no] -= 
+        pplayer->ai.love[violator->player_no] = 
           MIN(pplayer->ai.love[violator->player_no] - MAX_AI_LOVE / 3, -1);
         /* Scream for help!! */
         players_iterate(ally) {

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