Complete.Org: Mailing Lists: Archives: freeciv-dev: May 1999:
[Freeciv-Dev] [Fwd: Diplomacy in general]
Home

[Freeciv-Dev] [Fwd: Diplomacy in general]

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] [Fwd: Diplomacy in general]
From: a_beraud@xxxxxxxx (Alexandre BERAUD)
Date: Mon, 10 May 1999 09:36:26 +0200 (MET DST)
Reply-to: a_beraud@xxxxxxxx (Alexandre BERAUD)

Here is a message brom the boss, that was certainly dedicated to the
list.

Alex

--- Begin Message ---
To: Alexandre BERAUD <a_beraud@xxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Diplomacy in general
From: Nicolas Brunel <brunel@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 8 May 1999 02:04:16 +0000 (GMT)
Hello,

   I have started a patch. The aim of this patch is what all
comparaisons of ownership between cities,units and players will
be handle by 3 functions :

   is_enemy_player
       -> return player1->player_no != player2->player_no
   is_friendly_player
       -> return player1->player_no == player2->player_no
   is_same_player
       -> return player1->player_no == player2->player_no

After, I finished my patch. All the part where an 'ownership' test is done 
will be resolved by one of this 3 functions.
For example, you can add an array relation_ship_between(,).
with 3 kinds of relationship :

    - TRUSTED ALLY
    - PEACE
    - WAR 

For is_same_player
   return relation_ship_between(player1,player2) == TRUSTED_ally

For is_friendly_player
   return relation_ship_between(player1,player2) == PEACE

for is_enemy_player
   return relation_ship_between(player1,player2) == WAR

Add a clause in the diplomatic treaty and its done.

I created is_same_player so that player can use other people units,
benefit from trusted allies wonders and so one.

I hope no one lese is working on a similar patch.
If so, mail me.

Best regards,





--- End Message ---

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] [Fwd: Diplomacy in general], Alexandre BERAUD <=