<URL: http://bugs.freeciv.org/Ticket/Display.html?id=38372 >
Patch. Untested. - Per
Index: ai/advdiplomacy.c =================================================================== --- ai/advdiplomacy.c (revision 12880) +++ ai/advdiplomacy.c (working copy) @@ -125,7 +125,8 @@ { int bulbs, tech_want, worth; - if (get_invention(pplayer, tech) == TECH_KNOWN) { + if (get_invention(pplayer, tech) == TECH_KNOWN + || !tech_is_available(pplayer, tech)) { return 0; } bulbs = total_bulbs_required_for_goal(pplayer, tech) * 3; @@ -965,7 +966,9 @@ bool is_dangerous; tech_type_iterate(tech) { - if (tech == A_NONE) { + if (tech == A_NONE + || !tech_is_available(player2, tech) + || !tech_is_available(player1, tech)) { worth[tech] = 0; continue; } @@ -1034,10 +1037,12 @@ if (players_on_same_team(pplayer, aplayer)) { for (index = A_FIRST; index < game.control.num_tech_types; index++) { if ((get_invention(pplayer, index) != TECH_KNOWN) - && (get_invention(aplayer, index) == TECH_KNOWN)) { + && (get_invention(aplayer, index) == TECH_KNOWN) + && tech_is_available(pplayer, index)) { ai_diplomacy_suggest(aplayer, pplayer, CLAUSE_ADVANCE, index); } else if ((get_invention(pplayer, index) == TECH_KNOWN) - && (get_invention(aplayer, index) != TECH_KNOWN)) { + && (get_invention(aplayer, index) != TECH_KNOWN) + && tech_is_available(aplayer, index)) { ai_diplomacy_suggest(pplayer, aplayer, CLAUSE_ADVANCE, index); } }
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev