[Freeciv-Dev] Patch for more flexible rates at game start
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Rates are :
- as much as possible for science
- the rest for tax
Unfortunately this is hard-wired to level 60%.
This patch (sorry for spliting it to 3 parts) will
- set start rates according to real max_rates
- if you have tax==lux and lower science, surplus will go to tax, not luxuries
- if you have tax==lux and lower science, surplus will go to tax, not luxuries
**** for common/player.h ****
--- player.h.orig Thu Jan 20 12:50:55 2000
+++ player.h Tue Feb 1 19:24:29 2000
@@ -22,8 +22,8 @@
struct tile;
-#define PLAYER_DEFAULT_TAX_RATE 40
-#define PLAYER_DEFAULT_SCIENCE_RATE 60
+#define PLAYER_DEFAULT_TAX_RATE 0
+#define PLAYER_DEFAULT_SCIENCE_RATE 100
#define PLAYER_DEFAULT_LUXURY_RATE 0
**** end ****
This sets science as high as possible. Will be put down later.
**** for common/player.c ****
--- player.c.orig Thu Jan 20 12:50:54 2000
+++ player.c Tue Feb 1 20:45:31 2000
@@ -293,7 +293,7 @@
if (pplayer->economic.tax > maxrate) {
surplus = pplayer->economic.tax - maxrate;
pplayer->economic.tax = maxrate;
- if (pplayer->economic.science > pplayer->economic.luxury)
+ if (pplayer->economic.science >= pplayer->economic.luxury)
pplayer->economic.science += surplus;
else
pplayer->economic.luxury += surplus;
@@ -301,7 +301,7 @@
if (pplayer->economic.science > maxrate) {
surplus = pplayer->economic.science - maxrate;
pplayer->economic.science = maxrate;
- if (pplayer->economic.tax > pplayer->economic.luxury)
+ if (pplayer->economic.tax >= pplayer->economic.luxury)
pplayer->economic.tax += surplus;
else
pplayer->economic.luxury += surplus;
**** end ****
This change priorities if two smaller rates are equal.
w/o this we would end with :
TX=0 SC=max_rate LX=(100%-max_rate)
but we want :
TX=(100%-max_rate) SC=max_rate LX=0
**** for server/civserver.c ****
--- civserver.c.orig Tue Feb 1 20:32:34 2000
+++ civserver.c Tue Feb 1 20:32:43 2000
@@ -415,6 +415,7 @@
int i;
for(i=0; i<game.nplayers; i++) {
init_tech(&game.players[i], game.tech);
+ player_limit_to_government_rates(&game.players[i]);
game.players[i].economic.gold=game.gold;
}
game.max_players=game.nplayers;
**** end ****
This put science rate down.
player_limit_to_government_rates in player_init won't do
it for us because at time of its run rules are not yet loaded
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Patch for more flexible rates at game start,
Tomasz Wegrzanowski <=
|
|