Author: sveinung
Date: Mon Jun 22 17:44:35 2015
New Revision: 29180

URL: http://svn.gna.org/viewcvs/freeciv?rev=29180&view=rev
Log:
Increase the granularity of the steal gold effects

Increase the granularity from percent to permille for the effect regulating
how large share of the victim player's gold can be stolen and the effect
regulating how much of the stolen gold disappears before reaching the player
behind the theft.

See patch #6112

Modified:
    branches/S2_6/ai/default/daieffects.c
    branches/S2_6/common/effects.h
    branches/S2_6/doc/README.effects
    branches/S2_6/fc_version
    branches/S2_6/server/diplomats.c

Modified: branches/S2_6/ai/default/daieffects.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/ai/default/daieffects.c?rev=29180&r1=29179&r2=29180&view=diff
==============================================================================
--- branches/S2_6/ai/default/daieffects.c       (original)
+++ branches/S2_6/ai/default/daieffects.c       Mon Jun 22 17:44:35 2015
@@ -578,11 +578,11 @@
       }
     }
     break;
-  case EFT_MAX_STOLEN_GOLD_PCT:
-    v -= amount / 4;
-    break;
-  case EFT_THIEFS_SHARE_PCT:
-    v -= amount / 8;
+  case EFT_MAX_STOLEN_GOLD_PM:
+    v -= amount / 40;
+    break;
+  case EFT_THIEFS_SHARE_PM:
+    v -= amount / 80;
     break;
   case EFT_RETIRE_PCT:
     num = num_affected_units(peffect, ai);

Modified: branches/S2_6/common/effects.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/effects.h?rev=29180&r1=29179&r2=29180&view=diff
==============================================================================
--- branches/S2_6/common/effects.h      (original)
+++ branches/S2_6/common/effects.h      Mon Jun 22 17:44:35 2015
@@ -265,10 +265,10 @@
 #define SPECENUM_VALUE101NAME "National_History"
 #define SPECENUM_VALUE102 EFT_TURN_FRAGMENTS
 #define SPECENUM_VALUE102NAME "Turn_Fragments"
-#define SPECENUM_VALUE103 EFT_MAX_STOLEN_GOLD_PCT
-#define SPECENUM_VALUE103NAME "Max_Stolen_Gold_Pct"
-#define SPECENUM_VALUE104 EFT_THIEFS_SHARE_PCT
-#define SPECENUM_VALUE104NAME "Thiefs_Share_Pct"
+#define SPECENUM_VALUE103 EFT_MAX_STOLEN_GOLD_PM
+#define SPECENUM_VALUE103NAME "Max_Stolen_Gold_Pm"
+#define SPECENUM_VALUE104 EFT_THIEFS_SHARE_PM
+#define SPECENUM_VALUE104NAME "Thiefs_Share_Pm"
 #define SPECENUM_VALUE105 EFT_RETIRE_PCT
 #define SPECENUM_VALUE105NAME "Retire_Pct"
 #define SPECENUM_VALUE106 EFT_ILLEGAL_ACTION_MOVE_COST

Modified: branches/S2_6/doc/README.effects
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/doc/README.effects?rev=29180&r1=29179&r2=29180&view=diff
==============================================================================
--- branches/S2_6/doc/README.effects    (original)
+++ branches/S2_6/doc/README.effects    Mon Jun 22 17:44:35 2015
@@ -218,13 +218,13 @@
     Increases unit bribe cost by amount percent. Requirements are from the
 point of view of the target unit, not the briber.
 
-Max_Stolen_Gold_Pct
-    The upper limit on the percentage of the players gold that may be
+Max_Stolen_Gold_Pm
+    The upper limit on the permille of the players gold that may be
 stolen by a unit doing the "Steal Gold" action. Evaluated against the city
 stolen from.
 
-Thiefs_Share_Pct
-    The percentage of the gold stolen by a unit doing the "Steal Gold"
+Thiefs_Share_Pm
+    The permille of the gold stolen by a unit doing the "Steal Gold"
 action that is lost before it reaches the player ordering it. Evaluated
 against the actor unit.
 

Modified: branches/S2_6/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/fc_version?rev=29180&r1=29179&r2=29180&view=diff
==============================================================================
--- branches/S2_6/fc_version    (original)
+++ branches/S2_6/fc_version    Mon Jun 22 17:44:35 2015
@@ -54,7 +54,7 @@
 #   - Avoid adding a new mandatory capability to the development branch for
 #     as long as possible.  We want to maintain network compatibility with
 #     the stable branch for as long as possible.
-NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-2.6-2015.May.27"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-2.6-2015.Jun.22"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""

Modified: branches/S2_6/server/diplomats.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/diplomats.c?rev=29180&r1=29179&r2=29180&view=diff
==============================================================================
--- branches/S2_6/server/diplomats.c    (original)
+++ branches/S2_6/server/diplomats.c    Mon Jun 22 17:44:35 2015
@@ -1153,8 +1153,8 @@
 
   /* Decide the upper limit on how much can be taken. */
   gold_take = (tgt_player->economic.gold
-               * get_city_bonus(tgt_city, EFT_MAX_STOLEN_GOLD_PCT))
-              / 100;
+               * get_city_bonus(tgt_city, EFT_MAX_STOLEN_GOLD_PM))
+              / 1000;
 
   /* Decide how much to actually take. */
   gold_take = fc_rand(gold_take) + 1;
@@ -1166,8 +1166,8 @@
 
   /* Some gold are lost during transfer. */
   gold_give = gold_take
-            - (gold_take * get_unit_bonus(act_unit, EFT_THIEFS_SHARE_PCT))
-              / 100;
+            - (gold_take * get_unit_bonus(act_unit, EFT_THIEFS_SHARE_PM))
+              / 1000;
 
   log_debug("steal gold: will give %d gold", gold_give);
 


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

Reply via email to