Author: sveinung
Date: Mon Jun 22 17:14:44 2015
New Revision: 29179

URL: http://svn.gna.org/viewcvs/freeciv?rev=29179&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:
    trunk/ai/default/daieffects.c
    trunk/common/effects.h
    trunk/doc/README.effects
    trunk/fc_version
    trunk/server/diplomats.c

Modified: trunk/ai/default/daieffects.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/daieffects.c?rev=29179&r1=29178&r2=29179&view=diff
==============================================================================
--- trunk/ai/default/daieffects.c       (original)
+++ trunk/ai/default/daieffects.c       Mon Jun 22 17:14:44 2015
@@ -583,11 +583,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: trunk/common/effects.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/effects.h?rev=29179&r1=29178&r2=29179&view=diff
==============================================================================
--- trunk/common/effects.h      (original)
+++ trunk/common/effects.h      Mon Jun 22 17:14:44 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: trunk/doc/README.effects
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.effects?rev=29179&r1=29178&r2=29179&view=diff
==============================================================================
--- trunk/doc/README.effects    (original)
+++ trunk/doc/README.effects    Mon Jun 22 17:14:44 2015
@@ -223,13 +223,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: trunk/fc_version
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=29179&r1=29178&r2=29179&view=diff
==============================================================================
--- trunk/fc_version    (original)
+++ trunk/fc_version    Mon Jun 22 17:14:44 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-3.0-2015.Jun.05"
+NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2015.Jun.22"
 NETWORK_CAPSTRING_OPTIONAL=""
 
 FREECIV_DISTRIBUTOR=""

Modified: trunk/server/diplomats.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/diplomats.c?rev=29179&r1=29178&r2=29179&view=diff
==============================================================================
--- trunk/server/diplomats.c    (original)
+++ trunk/server/diplomats.c    Mon Jun 22 17:14:44 2015
@@ -1183,8 +1183,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;
@@ -1196,8 +1196,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