[Freeciv-Dev] Re: (PR#9147) researchcost proposal
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] Re: (PR#9147) researchcost proposal |
From: |
"Per Inge Mathisen" <per@xxxxxxxxxxx> |
Date: |
Sat, 3 Jul 2004 07:22:37 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9147 >
This is the patch to stop research cost from doubling at year 1AD.
Simply set the ruleset option to zero to disable this behaviour, otherwise
give a year in which the doubling should take place. (And no, there is no
such thing as a "year zero", mind you.)
- Per
Index: common/tech.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/tech.c,v
retrieving revision 1.71
diff -u -r1.71 tech.c
--- common/tech.c 25 Jun 2004 23:43:01 -0000 1.71
+++ common/tech.c 3 Jul 2004 14:17:18 -0000
@@ -398,8 +398,9 @@
cost = 0;
}
- /* Research becomes more expensive. */
- if (game.year > 0) {
+ /* Research becomes more expensive this year and after. */
+ if (game.rgame.tech_cost_double_year != 0
+ && game.year >= game.rgame.tech_cost_double_year) {
cost *= 2;
}
Index: common/game.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/game.h,v
retrieving revision 1.142
diff -u -r1.142 game.h
--- common/game.h 9 Jun 2004 04:39:12 -0000 1.142
+++ common/game.h 3 Jul 2004 14:17:18 -0000
@@ -207,6 +207,7 @@
int granary_food_inc;
int tech_cost_style;
int tech_leakage;
+ int tech_cost_double_year;
/*
* Advances given to all players at game start.
Index: server/ruleset.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/ruleset.c,v
retrieving revision 1.175
diff -u -r1.175 ruleset.c
--- server/ruleset.c 9 Jun 2004 04:39:13 -0000 1.175
+++ server/ruleset.c 3 Jul 2004 14:17:18 -0000
@@ -2683,6 +2683,8 @@
game.rgame.tech_cost_style);
game.rgame.tech_cost_style = 0;
}
+ game.rgame.tech_cost_double_year =
+ secfile_lookup_int_default(&file, 1, "civstyle.tech_cost_double_year");
game.rgame.tech_leakage =
secfile_lookup_int(&file, "civstyle.tech_leakage");
@@ -3123,6 +3125,7 @@
misc_p.granary_food_inc = game.rgame.granary_food_inc;
misc_p.tech_cost_style = game.rgame.tech_cost_style;
misc_p.tech_leakage = game.rgame.tech_leakage;
+ misc_p.tech_cost_double_year = game.rgame.tech_cost_double_year;
memcpy(misc_p.trireme_loss_chance, game.trireme_loss_chance,
sizeof(game.trireme_loss_chance));
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.382
diff -u -r1.382 packhand.c
--- client/packhand.c 25 Jun 2004 23:35:55 -0000 1.382
+++ client/packhand.c 3 Jul 2004 14:17:19 -0000
@@ -2722,6 +2722,7 @@
game.rgame.granary_food_inc = packet->granary_food_inc;
game.rgame.tech_cost_style = packet->tech_cost_style;
game.rgame.tech_leakage = packet->tech_leakage;
+ game.rgame.tech_cost_double_year = packet->tech_cost_double_year;
game.rgame.killstack = packet->killstack;
for (i = 0; i < MAX_VET_LEVELS; i++) {
Index: data/default/game.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/default/game.ruleset,v
retrieving revision 1.16
diff -u -r1.16 game.ruleset
--- data/default/game.ruleset 19 Apr 2004 12:17:15 -0000 1.16
+++ data/default/game.ruleset 3 Jul 2004 14:17:43 -0000
@@ -74,6 +74,9 @@
; players (human and AI) which already know the tech.
tech_leakage = 0
+; Research cost doubles after this year. Set to zero to disable.
+tech_cost_double_year = 0
+
; city_incite_cost =
; total_factor * (city_size) *
; (base + (units_cost) * unit_factor +
Index: data/civ1/game.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/civ1/game.ruleset,v
retrieving revision 1.13
diff -u -r1.13 game.ruleset
--- data/civ1/game.ruleset 19 Apr 2004 12:17:15 -0000 1.13
+++ data/civ1/game.ruleset 3 Jul 2004 14:17:43 -0000
@@ -69,6 +69,9 @@
; players (human and AI) which already know the tech.
tech_leakage = 0
+; Research cost doubles after this year. Set to zero to disable.
+tech_cost_double_year = 1
+
; city_incite_cost =
; total_factor * (city_size) *
; (base + (units_cost) * unit_factor +
Index: data/civ2/game.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/civ2/game.ruleset,v
retrieving revision 1.13
diff -u -r1.13 game.ruleset
--- data/civ2/game.ruleset 19 Apr 2004 12:17:15 -0000 1.13
+++ data/civ2/game.ruleset 3 Jul 2004 14:17:43 -0000
@@ -69,6 +69,9 @@
; players (human and AI) which already know the tech.
tech_leakage = 0
+; Research cost doubles after this year. Set to zero to disable.
+tech_cost_double_year = 1
+
; city_incite_cost =
; total_factor * (city_size) *
; (base + (units_cost) * unit_factor +
- [Freeciv-Dev] Re: (PR#9147) researchcost proposal, Per Inge Mathisen, 2004/07/03
- [Freeciv-Dev] Re: (PR#9147) researchcost proposal,
Per Inge Mathisen <=
- [Freeciv-Dev] Re: (PR#9147) researchcost proposal, Per Inge Mathisen, 2004/07/03
- [Freeciv-Dev] Re: (PR#9147) researchcost proposal, Mike Jing, 2004/07/04
- [Freeciv-Dev] Re: (PR#9147) researchcost proposal, Per Inge Mathisen, 2004/07/12
- [Freeciv-Dev] Re: (PR#9147) researchcost proposal, Jason Dorje Short, 2004/07/12
- [Freeciv-Dev] Re: (PR#9147) researchcost proposal, Per Inge Mathisen, 2004/07/13
- [Freeciv-Dev] Re: (PR#9147) researchcost proposal, Jason Dorje Short, 2004/07/13
|
|