--- ../../freeciv/common/game.h Wed Jun 7 12:17:39 2000 +++ game.h Thu Jun 8 00:45:16 2000 @@ -65,6 +65,7 @@ int nbarbarians; int occupychance; int unhappysize; + int buy_cost; char *startmessage; int player_idx; struct player *player_ptr; @@ -195,6 +196,10 @@ #define GAME_DEFAULT_UNHAPPYSIZE 4 #define GAME_MIN_UNHAPPYSIZE 1 #define GAME_MAX_UNHAPPYSIZE 6 + +#define GAME_DEFAULT_BUY_COST 100 +#define GAME_MIN_BUY_COST 10 +#define GAME_MAX_BUY_COST 1000 #define GAME_DEFAULT_END_YEAR 2000 #define GAME_MIN_END_YEAR GAME_START_YEAR --- ../../freeciv/common/game.c Wed May 31 08:21:54 2000 +++ game.c Thu Jun 8 00:53:58 2000 @@ -742,6 +742,7 @@ game.civilwarsize= GAME_DEFAULT_CIVILWARSIZE; game.explorer = GAME_DEFAULT_EXPLORER; game.unhappysize = GAME_DEFAULT_UNHAPPYSIZE; + game.buy_cost = GAME_DEFAULT_BUY_COST; game.foodbox = GAME_DEFAULT_FOODBOX; game.aqueductloss= GAME_DEFAULT_AQUEDUCTLOSS; game.killcitizen = GAME_DEFAULT_KILLCITIZEN; --- ../../freeciv/common/packets.h Wed Jun 7 12:17:40 2000 +++ packets.h Thu Jun 8 00:47:48 2000 @@ -717,6 +717,7 @@ int heating; int cityfactor; int unhappysize; + int buy_cost; int diplcost,freecost,conquercost; int global_advances[A_LAST]; int global_wonders[B_LAST]; --- ../../freeciv/common/packets.c Wed Jun 7 12:17:39 2000 +++ packets.c Thu Jun 8 01:22:11 2000 @@ -1679,6 +1679,7 @@ cptr=put_uint8(cptr, pinfo->freecost); cptr=put_uint8(cptr, pinfo->conquercost); cptr=put_uint8(cptr, pinfo->unhappysize); + cptr=put_uint16(cptr, pinfo->buy_cost); for(i=0; iglobal_advances[i]); @@ -1728,6 +1729,7 @@ iget_uint8(&iter, &pinfo->freecost); iget_uint8(&iter, &pinfo->conquercost); iget_uint8(&iter, &pinfo->unhappysize); + iget_uint16(&iter, &pinfo->buy_cost); for(i=0; iglobal_advances[i]); --- ../../freeciv/common/city.c Wed May 24 15:13:00 2000 +++ ./city.c Thu Jun 8 01:23:14 2000 @@ -439,11 +439,13 @@ if (build>=total) return 0; cost=(total-build)*2+(total-build)*(total-build)/20; + cost= (int)(((double)cost)*(((double)game.buy_cost)/100.0)); } else { total=improvement_value(pcity->currently_building); if (build>=total) return 0; cost=(total-build)*2; + cost= (int)(((double)cost)*(((double)game.buy_cost)/100.0)); if(is_wonder(pcity->currently_building)) cost*=2; } --- ../../freeciv/client/packhand.c Wed Jun 7 12:17:36 2000 +++ ./packhand.c Thu Jun 8 01:21:37 2000 @@ -666,6 +666,7 @@ game.techlevel=pinfo->techlevel; game.skill_level=pinfo->skill_level; game.timeout=pinfo->timeout; + game.buy_cost=pinfo->buy_cost; game.end_year=pinfo->end_year; game.year=pinfo->year; --- ../../freeciv/server/stdinhand.c Wed Jun 7 12:17:41 2000 +++ ./stdinhand.c Thu Jun 8 00:51:49 2000 @@ -157,6 +157,7 @@ "4 = equally sized large islands with two players on every island (or one\n" " with three players for an odd number of players), and additional\n" " smaller islands.\n" + "5 = creates planets speckled around the map (for FreeSpace Mod).\n" "Note: values 2,3 and 4 generate \"fairer\" (but more boring) maps.\n" "(Zero indicates a scenario map.)") }, @@ -425,6 +426,11 @@ N_("Before other adjustments, the first unhappysize citizens in a " "city are happy, and subsequent citizens are unhappy. " "See also cityfactor.") }, + + { "buycost", &game.buy_cost, + SSET_RULES, SSET_TO_CLIENT, + GAME_MIN_BUY_COST, GAME_MAX_BUY_COST, GAME_DEFAULT_BUY_COST, + N_("percent of normal cost for a city to buy"), ""}, { "cityfactor", &game.cityfactor, SSET_RULES, SSET_TO_CLIENT,