? vetfix1.diff Index: advmilitary.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/ai/advmilitary.c,v retrieving revision 1.155 diff -u -r1.155 advmilitary.c --- advmilitary.c 15 Nov 2003 12:47:21 -0000 1.155 +++ advmilitary.c 16 Nov 2003 21:03:53 -0000 @@ -770,9 +770,6 @@ !can_build_unit_direct(pcity, unit_types[unit_type].obsoleted_by)) && unit_types[unit_type].attack_strength > 0 /* or we'll get SIGFPE */ && move_type == orig_move_type) { - /* TODO: Case for B_AIRPORT. -- Raahul */ - bool will_be_veteran = (move_type == LAND_MOVING || - player_knows_improvement_tech(pplayer, B_PORT)); /* Cost (shield equivalent) of gaining these techs. */ /* FIXME? Katvrr advises that this should be weighted more heavily in big * danger. */ @@ -785,7 +782,8 @@ /* See description of kill_desire() for info about this variables. */ int bcost = unit_types[unit_type].build_cost; int vuln; - int attack = unittype_att_rating(unit_type, will_be_veteran, + int attack = unittype_att_rating(unit_type, + do_make_unit_veteran(pcity, unit_type), SINGLE_MOVE, unit_types[unit_type].hp); /* Values to be computed */ @@ -1310,7 +1308,7 @@ unit_type = ai_choose_attacker(pcity, SEA_MOVING); if (unit_type >= 0) { virtualunit = create_unit_virtual(pplayer, pcity, unit_type, - player_knows_improvement_tech(pplayer, B_PORT)); + do_make_unit_veteran(pcity, unit_type)); kill_something_with(pplayer, pcity, virtualunit, choice); destroy_unit_virtual(virtualunit); } @@ -1318,7 +1316,8 @@ /* Consider a land attacker */ unit_type = ai_choose_attacker(pcity, LAND_MOVING); if (unit_type >= 0) { - virtualunit = create_unit_virtual(pplayer, pcity, unit_type, TRUE); + virtualunit = create_unit_virtual(pplayer, pcity, unit_type, + do_make_unit_veteran(pcity, unit_type)); kill_something_with(pplayer, pcity, virtualunit, choice); destroy_unit_virtual(virtualunit); } Index: aiair.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/ai/aiair.c,v retrieving revision 1.22 diff -u -r1.22 aiair.c --- aiair.c 15 Nov 2003 12:47:21 -0000 1.22 +++ aiair.c 16 Nov 2003 21:03:53 -0000 @@ -390,7 +390,8 @@ if (get_unit_type(u_type)->move_type != AIR_MOVING) continue; if (can_build_unit(pcity, u_type)) { struct unit *virtual_unit = - create_unit_virtual(pplayer, pcity, u_type, TRUE); + create_unit_virtual(pplayer, pcity, u_type, + do_make_unit_veteran(pcity, u_type)); int profit = find_something_to_bomb(virtual_unit, pcity->x, pcity->y); if (profit > choice->want){ /* Update choice */ Index: aidiplomat.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/ai/aidiplomat.c,v retrieving revision 1.27 diff -u -r1.27 aidiplomat.c --- aidiplomat.c 15 Nov 2003 12:47:21 -0000 1.27 +++ aidiplomat.c 16 Nov 2003 21:03:54 -0000 @@ -160,7 +160,8 @@ int want, loss, p_success, p_failure, time_to_dest; int gain_incite = 0, gain_theft = 0, gain = 1; int incite_cost; - struct unit *punit = create_unit_virtual(pplayer, pcity, u, FALSE); + struct unit *punit = create_unit_virtual(pplayer, pcity, u, + do_make_unit_veteran(pcity, u)); pft_fill_default_parameter(¶meter); pft_fill_unit_parameter(¶meter, punit);