diff -ur freeciv-1.12.0/ai/aicity.c freeciv-1.12.0m/ai/aicity.c --- freeciv-1.12.0/ai/aicity.c Thu May 31 09:02:54 2001 +++ freeciv-1.12.0m/ai/aicity.c Fri Aug 31 19:30:21 2001 @@ -141,13 +141,16 @@ j = improvement_types[i].tech_req; if (get_invention(pplayer, j) != TECH_KNOWN) pplayer->ai.tech_want[j] += values[i]; + /* if it is a bonus tech double it's value since it give a free tech */ + if(!game.global_advances[j] && tech_flag(j,TF_BONUS_TECH)) + pplayer->ai.tech_want[j] *= 2; + /* this probably isn't right -- Syela */ + /* since it assumes that the next tech is as valuable as the + current -- JJCogliati */ + } } /* tired of researching pottery when we need to learn Republic!! -- Syela */ - /* was A_PHILOSOPHY: */ - if (!game.global_advances[game.rtech.get_bonus_tech]) - pplayer->ai.tech_want[game.rtech.get_bonus_tech] *= 2; - /* this probably isn't right -- Syela */ city_list_iterate(pplayer->cities, pcity) pcity->ai.building_want[B_MAGELLAN] = values[B_MAGELLAN]; diff -ur freeciv-1.12.0/client/packhand.c freeciv-1.12.0m/client/packhand.c --- freeciv-1.12.0/client/packhand.c Tue Jul 31 13:04:06 2001 +++ freeciv-1.12.0m/client/packhand.c Fri Aug 31 19:05:17 2001 @@ -1506,7 +1506,6 @@ game.sewer_size = packet->sewer_size; game.add_to_size_limit = packet->add_to_size_limit; - game.rtech.get_bonus_tech = packet->rtech.get_bonus_tech; game.rtech.cathedral_plus = packet->rtech.cathedral_plus; game.rtech.cathedral_minus = packet->rtech.cathedral_minus; game.rtech.colosseum_plus = packet->rtech.colosseum_plus; diff -ur freeciv-1.12.0/common/capstr.c freeciv-1.12.0m/common/capstr.c --- freeciv-1.12.0/common/capstr.c Fri Jun 29 13:39:04 2001 +++ freeciv-1.12.0m/common/capstr.c Sat Sep 1 18:49:09 2001 @@ -70,7 +70,7 @@ * are not directly related to the capability strings discussed here.) */ -#define CAPABILITY "+1.11.6 conn_info" +#define CAPABILITY "+1.11.6 conn_info new_bonus_tech" /* "+1.11.6" is protocol for 1.11.6 beta release. diff -ur freeciv-1.12.0/common/game.h freeciv-1.12.0m/common/game.h --- freeciv-1.12.0/common/game.h Mon Jul 2 08:28:03 2001 +++ freeciv-1.12.0m/common/game.h Fri Aug 31 18:58:02 2001 @@ -147,7 +147,6 @@ } ruleset; int firepower_factor; /* See README.rulesets */ struct { - int get_bonus_tech; /* eg Philosophy */ int cathedral_plus; /* eg Theology */ int cathedral_minus; /* eg Communism */ int colosseum_plus; /* eg Electricity */ diff -ur freeciv-1.12.0/common/packets.c freeciv-1.12.0m/common/packets.c --- freeciv-1.12.0/common/packets.c Fri Jun 29 13:39:04 2001 +++ freeciv-1.12.0m/common/packets.c Sat Sep 1 19:15:38 2001 @@ -2689,7 +2689,10 @@ cptr=put_uint8(cptr, packet->sewer_size); cptr=put_uint8(cptr, packet->add_to_size_limit); - cptr=put_uint8(cptr, packet->rtech.get_bonus_tech); + /* when removing the new_bonus_tech capability remove the following 3 lines*/ + if(pc && !has_capability("new_bonus_tech",pc->capability)){ + cptr=put_uint8(cptr, packet->rtech.get_bonus_tech); + } cptr=put_uint8(cptr, packet->rtech.cathedral_plus); cptr=put_uint8(cptr, packet->rtech.cathedral_minus); cptr=put_uint8(cptr, packet->rtech.colosseum_plus); @@ -2730,7 +2733,10 @@ iget_uint8(&iter, &packet->sewer_size); iget_uint8(&iter, &packet->add_to_size_limit); - iget_uint8(&iter, &packet->rtech.get_bonus_tech); + /* when removing the new_bonus_tech capability remove the following 3 lines*/ + if (pc && !has_capability("new_bonus_tech",pc->capability)){ + iget_uint8(&iter, &packet->rtech.get_bonus_tech); + } iget_uint8(&iter, &packet->rtech.cathedral_plus); iget_uint8(&iter, &packet->rtech.cathedral_minus); iget_uint8(&iter, &packet->rtech.colosseum_plus); diff -ur freeciv-1.12.0/common/packets.h freeciv-1.12.0m/common/packets.h --- freeciv-1.12.0/common/packets.h Fri Jun 29 13:39:05 2001 +++ freeciv-1.12.0m/common/packets.h Sat Sep 1 19:11:09 2001 @@ -549,6 +549,7 @@ int num_impr_types; int num_tech_types; struct { + /* when removing the new_bonus_tech capability remove the following line*/ int get_bonus_tech; int cathedral_plus; int cathedral_minus; diff -ur freeciv-1.12.0/common/tech.h freeciv-1.12.0m/common/tech.h --- freeciv-1.12.0/common/tech.h Thu Mar 29 17:08:38 2001 +++ freeciv-1.12.0m/common/tech.h Fri Aug 31 18:55:37 2001 @@ -40,8 +40,7 @@ */ enum tech_flag_id { - TF_BONUS_TECH, /* player gets extra tech if rearched first - Note: currently only one tech with this flag is supported */ + TF_BONUS_TECH, /* player gets extra tech if rearched first */ TF_BOAT_FAST, /* all sea units get one extra move point */ TF_BRIDGE, /* "Settler" unit types can build bridges over rivers */ TF_RAILROAD, /* "Settler" unit types can build rail roads */ diff -ur freeciv-1.12.0/data/default/techs.ruleset freeciv-1.12.0m/data/default/techs.ruleset --- freeciv-1.12.0/data/default/techs.ruleset Thu Mar 29 17:08:39 2001 +++ freeciv-1.12.0m/data/default/techs.ruleset Fri Aug 31 20:02:33 2001 @@ -32,7 +32,6 @@ ; Following flag strings are possible ; ; "Bonus_Tech" = player gets extra tech if rearched first -; Note: currently only one tech with this flag is supported ; "Boat_Fast" = all sea units get one extra move point ; "Bridge" = "Settler" unit types can build bridges over rivers ; "Railroad" = "Settler" unit types can build rail roads @@ -145,7 +144,7 @@ name = _("Computers") req1 = "Mass Production" req2 = "Miniaturization" -flags = "" +flags = "Bonus_Tech" [advance_conscription] name = _("Conscription") diff -ur freeciv-1.12.0/server/plrhand.c freeciv-1.12.0m/server/plrhand.c --- freeciv-1.12.0/server/plrhand.c Sat Jul 21 10:31:17 2001 +++ freeciv-1.12.0m/server/plrhand.c Sat Sep 1 18:10:31 2001 @@ -211,7 +211,7 @@ char saving_bulbs) { int i; - int philohack=0; + int bonus_tech_hack=0; int was_first=0; int saved_bulbs; int wonder; @@ -249,8 +249,8 @@ } } - if (tech_found==game.rtech.get_bonus_tech && was_first) - philohack=1; + if (tech_flag(tech_found,TF_BONUS_TECH) && was_first) + bonus_tech_hack=1; set_invention(plr, tech_found, TECH_KNOWN); update_research(plr); @@ -298,8 +298,8 @@ plr->research.researched=saved_bulbs; } - if (philohack) { - notify_player(plr, _("Game: Great philosophers from all the world join " + if (bonus_tech_hack) { + notify_player(plr, _("Game: Great scientists from all the world join " "your civilization; you get an immediate advance.")); tech_researched(plr); } diff -ur freeciv-1.12.0/server/ruleset.c freeciv-1.12.0m/server/ruleset.c --- freeciv-1.12.0/server/ruleset.c Sat Jul 21 12:31:57 2001 +++ freeciv-1.12.0m/server/ruleset.c Sat Sep 1 19:14:08 2001 @@ -526,10 +526,6 @@ } } - /* Should be removed and use the flag directly in the future - to allow more bonus techs -- sb */ - game.rtech.get_bonus_tech = find_tech_by_flag(0,TF_BONUS_TECH); - free(sec); section_file_check_unused(file, filename); section_file_free(file); @@ -1665,7 +1661,8 @@ packet.sewer_size = game.sewer_size; packet.add_to_size_limit = game.add_to_size_limit; - packet.rtech.get_bonus_tech = game.rtech.get_bonus_tech; + /* when removing the new_bonus_tech capability remove the following line*/ + packet.rtech.get_bonus_tech = find_tech_by_flag(0,TF_BONUS_TECH); packet.rtech.cathedral_plus = game.rtech.cathedral_plus; packet.rtech.cathedral_minus = game.rtech.cathedral_minus; packet.rtech.colosseum_plus = game.rtech.colosseum_plus; diff -ur freeciv-1.12.0/server/rulesout.c freeciv-1.12.0m/server/rulesout.c --- freeciv-1.12.0/server/rulesout.c Thu Aug 31 07:32:49 2000 +++ freeciv-1.12.0m/server/rulesout.c Fri Aug 31 19:02:00 2001 @@ -160,7 +160,6 @@ } /* building special techs (not yet generalised) */ - /* note game.rtech.get_bonus_tech is just cached value from tech flag */ if (itech == game.rtech.cathedral_plus) { my_snprintf(buf, sizeof(buf), "special: %s +1", improvement_types[B_CATHEDRAL].name);