? rc ? msgfmt1.diff ? tech_info1.diff ? diff ? causescore ? check_headers.sh ? test.c ? prevnext.patch ? future_fix1.diff ? PLURAL_FORMS.readme ? new_natural_city_names-7.diff ? local_warmap131201.diff ? load_map_data-fix.diff ? queue ? unit_move_turns1.diff ? savegame_isnewgame.diff ? unreal_city_savegame_fix1.diff ? po/diff Index: common/tech.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/tech.c,v retrieving revision 1.35 diff -u -r1.35 tech.c --- common/tech.c 2002/01/17 10:26:30 1.35 +++ common/tech.c 2002/01/17 14:15:16 @@ -53,8 +53,6 @@ void set_invention(struct player *pplayer, Tech_Type_id tech, enum tech_state value) { - assert(!is_barbarian(pplayer)); - if (pplayer->research.inventions[tech].state == value) { return; } @@ -336,11 +334,11 @@ style 1. tech_leakage: - 0 - No leak - 1 - Tech costs are multiplied by - (num_players-civs_with_tech)/num_players - 2 - Same as 1, but civs_with_tech is only counted from players you - have embassy with + 0 - No reduction + 1 - Reduced depending on the number of players which already know the + tech and you have an embassy with. + 2 - Reduced depending on the number of players which already know the + tech. **************************************************************************/ int base_total_bulbs_required(struct player *pplayer, Tech_Type_id tech) { @@ -390,17 +388,6 @@ case 1: { - int players = get_num_human_and_ai_players(); - if (players > 0) { - /* Every non barbarian-only game */ - assert(players >= game.global_advances[tech]); - cost = ((players - game.global_advances[tech]) * cost) / players; - } - } - break; - - case 2: - { int players = 0, players_with_tech_and_embassy = 0; players_iterate(other) { @@ -415,6 +402,24 @@ } players_iterate_end; cost = ((players - players_with_tech_and_embassy) * cost) / players; + } + break; + + case 2: + { + int players = 0, players_with_tech = 0; + + players_iterate(other) { + if (is_barbarian(other)) { + continue; + } + players++; + if (get_invention(other, tech) == TECH_KNOWN) { + players_with_tech++; + } + } players_iterate_end; + + cost = ((players - players_with_tech) * cost) / players; } break; Index: data/civ1/game.ruleset =================================================================== RCS file: /home/freeciv/CVS/freeciv/data/civ1/game.ruleset,v retrieving revision 1.5 diff -u -r1.5 game.ruleset --- data/civ1/game.ruleset 2002/01/11 13:50:50 1.5 +++ data/civ1/game.ruleset 2002/01/17 14:15:16 @@ -57,8 +57,9 @@ tech_cost_style = 0 ; Technology leak from other civilizations -; 0 - No leak -; 1 - Tech costs are multiplied by (num_players-civs_with_tech)/num_players -; 2 - Same as 1, but civs_with_tech is only counted from players you have -; embassy with +; 0 - No reduction +; 1 - Reduced depending on the number of players which already know the +; tech and you have an embassy with. +; 2 - Reduced depending on the number of players which already know the +; tech. tech_leakage = 0 Index: data/civ2/game.ruleset =================================================================== RCS file: /home/freeciv/CVS/freeciv/data/civ2/game.ruleset,v retrieving revision 1.5 diff -u -r1.5 game.ruleset --- data/civ2/game.ruleset 2002/01/11 13:50:50 1.5 +++ data/civ2/game.ruleset 2002/01/17 14:15:16 @@ -57,8 +57,9 @@ tech_cost_style = 0 ; Technology leak from other civilizations -; 0 - No leak -; 1 - Tech costs are multiplied by (num_players-civs_with_tech)/num_players -; 2 - Same as 1, but civs_with_tech is only counted from players you have -; embassy with +; 0 - No reduction +; 1 - Reduced depending on the number of players which already know the +; tech and you have an embassy with. +; 2 - Reduced depending on the number of players which already know the +; tech. tech_leakage = 0 Index: data/default/game.ruleset =================================================================== RCS file: /home/freeciv/CVS/freeciv/data/default/game.ruleset,v retrieving revision 1.5 diff -u -r1.5 game.ruleset --- data/default/game.ruleset 2002/01/11 13:50:51 1.5 +++ data/default/game.ruleset 2002/01/17 14:15:17 @@ -57,8 +57,9 @@ tech_cost_style = 0 ; Technology leak from other civilizations -; 0 - No leak -; 1 - Tech costs are multiplied by (num_players-civs_with_tech)/num_players -; 2 - Same as 1, but civs_with_tech is only counted from players you have -; embassy with +; 0 - No reduction +; 1 - Reduced depending on the number of players which already know the +; tech and you have an embassy with. +; 2 - Reduced depending on the number of players which already know the +; tech. tech_leakage = 0