--- ../../freeciv/server/unittools.c Sat May 27 18:06:27 2000 +++ unittools.c Fri Jun 9 15:36:43 2000 @@ -665,6 +665,13 @@ if(!is_military_unit(punit)) return 0; + /* torpedoers can not attack something not a "Horse" + NOTE: in FreeSpace, I considered everything a "Horse" that was big. + Things like destroyers, transports and battleships. */ + if ( (unit_flag(punit->type, F_TORPEDOER) ) && + ( unit_flag(pdefender->type, F_HORSE) == 0) ) + return 0; + /* only fighters can attack planes, except for city or airbase attacks */ if (!unit_flag(punit->type, F_FIGHTER) && is_air_unit(pdefender) && !(map_get_city(dest_x, dest_y) || map_get_special(dest_x, dest_y)&S_AIRBASE)) { --- ../../freeciv/server/unitfunc.c Wed Jun 7 08:23:31 2000 +++ unitfunc.c Fri Jun 9 15:53:58 2000 @@ -2607,7 +2607,8 @@ if( (incity) || (map_get_special(punit->x, punit->y)&S_FORTRESS) || (map_get_special(punit->x, punit->y)&S_AIRBASE) || - unitcount == 1) { + (unitcount == 1) || + (unit_flag(punit->type, F_FIGHTERCOVER)) ) { notify_player_ex(pplayer, punit->x, punit->y, E_UNIT_LOST, _("Game: You lost a%s %s under an attack from %s's %s%s."), n_if_vowel(get_unit_type(punit->type)->name[0]), --- ../../freeciv/common/unit.h Wed May 24 15:13:02 2000 +++ unit.h Fri Jun 9 15:51:23 2000 @@ -167,6 +167,8 @@ F_IGTIRED, /* Ignore tired negative bonus when attacking */ F_MISSILE_CARRIER, /* Like F_CARRIER, but missiles only (Submarine) */ F_NO_LAND_ATTACK, /* Cannot attack vs land squares (Submarine) */ + F_TORPEDOER, /* Can not attack non-F_HORSE units */ + F_FIGHTERCOVER, /* Destroys this target but nothing else under it */ F_LAST }; --- ../../freeciv/common/unit.c Sat May 27 18:06:21 2000 +++ unit.c Fri Jun 9 15:51:31 2000 @@ -52,7 +52,8 @@ "OneAttack", "Pikemen", "Horse", "IgWall", "FieldUnit", "AEGIS", "Fighter", "Marines", "Partial_Invis", "Settlers", "Diplomat", "Trireme", "Nuclear", "Spy", "Transform", "Paratroopers", - "Airbase", "Cities", "IgTired", "Missile_Carrier", "No_Land_Attack" + "Airbase", "Cities", "IgTired", "Missile_Carrier", "No_Land_Attack", + "Torpedoer", "FighterCover" }; static char *role_names[] = { "FirstBuild", "Explorer", "Hut", "HutTech", "Partisan",