Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2006:
[Freeciv-Dev] (PR#17602) Make diplcost apply to money transfers
Home

[Freeciv-Dev] (PR#17602) Make diplcost apply to money transfers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#17602) Make diplcost apply to money transfers
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sat, 3 Jun 2006 11:53:17 -0700
Reply-to: bugs@xxxxxxxxxxx

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

This patch makes the diplcost setting apply also to money transfers 
between players. It is apparently a frequent frustration in multiplayer 
games that allies transfer all their gold to whoever needs it and that 
alliances between players (that know each other) therefore become too 
powerful.

   - Per
Index: server/settings.c
===================================================================
--- server/settings.c   (revision 12006)
+++ server/settings.c   (working copy)
@@ -492,11 +492,12 @@
 
   GEN_INT("diplcost", game.info.diplcost,
          SSET_RULES, SSET_SCIENCE, SSET_RARE, SSET_TO_CLIENT,
-         N_("Penalty when getting tech from treaty"),
+         N_("Penalty when getting tech or gold from treaty"),
          N_("For each technology you gain from a diplomatic treaty, you "
             "lost research points equal to this percentage of the cost to "
             "research a new technology. You can end up with negative "
-            "research points if this is non-zero."), NULL, 
+            "research points if this is non-zero. Also applies to gold "
+             "transfers in diplomatic treaties."), NULL,
          GAME_MIN_DIPLCOST, GAME_MAX_DIPLCOST, GAME_DEFAULT_DIPLCOST)
 
   GEN_INT("conquercost", game.info.conquercost,
Index: server/diplhand.c
===================================================================
--- server/diplhand.c   (revision 12006)
+++ server/diplhand.c   (working copy)
@@ -384,7 +384,7 @@
        notify_player(pdest, NULL, E_DIPLOMACY,
                      _("You get %d gold."), pclause->value);
        pgiver->economic.gold -= pclause->value;
-       pdest->economic.gold += pclause->value;
+       pdest->economic.gold += pclause->value * (100 - game.info.diplcost) / 
100;
        break;
       case CLAUSE_MAP:
        give_map_from_player_to_player(pgiver, pdest);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#17602) Make diplcost apply to money transfers, Per I. Mathisen <=