Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2005:
[Freeciv-Dev] (PR#13361) AI Reactions
Home

[Freeciv-Dev] (PR#13361) AI Reactions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#13361) AI Reactions
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Tue, 28 Jun 2005 04:01:07 -0700
Reply-to: bugs@xxxxxxxxxxx

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

> [per - Tue Jun 28 10:26:41 2005]:
> 
> This patch adds AI reactions to certain player actions:
>  * Diplomat incidents
>  * Declarations of war
>  * Nuclear explosions
> 

>   - Per
> 
 case CLAUSE_PEACE:
pgiver->diplstates[pdest->player_no].type=DS_PEACE;
pdest->diplstates[pgiver->player_no].type=DS_PEACE;
+ pgiver->diplstates[pdest->player_no].max_state =
+ MAX(DS_PEACE, pgiver->diplstates[pdest->player_no].max_state);
+ pdest->diplstates[pgiver->player_no].max_state =
+ MAX(DS_PEACE, pdest->diplstates[pgiver->player_no].max_state);
notify_player_ex(pgiver, NULL, E_TREATY_PEACE,
_("You agree on a peace treaty with %s."),
pdest->name);
@@ -444,6 +448,10 @@
case CLAUSE_ALLIANCE:
pgiver->diplstates[pdest->player_no].type=DS_ALLIANCE;
pdest->diplstates[pgiver->player_no].type=DS_ALLIANCE;
+ pgiver->diplstates[pdest->player_no].max_state =
+ MAX(DS_PEACE, pgiver->diplstates[pdest->player_no].max_state);
+ pdest->diplstates[pgiver->player_no].max_state =
+ MAX(DS_PEACE, pdest->diplstates[pgiver->player_no].max_state);
notify_player_ex(pgiver, NULL, E_TREATY_ALLIANCE,
_("You agree on an alliance with %s."), 

This looks like copy and paste mistake.
Also max_state isn't saved or loaded.

--
mateusz 




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