anchor.diff:      // Target everything else with close combat units
       for GT := Low(TKMGroupType) to High(TKMGroupType) do
       begin
  -      if (GT = gt_Ranged) then
  -        continue;
  +      if (GT = gt_Ranged) then // Ignore ranged units if we have enought close combat support (avoid friendly fire)
  +        with CompanyInfo do
  +          if (GTCnt[gt_Melee] + GTCnt[gt_AntiHorse] + GTCnt[gt_Mounted] > LIMIT_RANGED_DESTROY_ALL_HOUSES) then
  +            continue;
         for I := AvailableSquads[GT].Count - 1 downto 0 do
         begin
           BestDist := INIT_THREAT;
  
positive.code:       Group.OrderWalk(FinPos, True, wtokAISquad, FinalPosition.Dir)
      else if fTargetChanged OR (fAttackTimeLimit < aTick) then
      begin
        fAttackTimeLimit := aTick + HOUSE_AIM_DELAY;
        fTargetChanged := False;
        Group.OrderAttackHouse(fTargetHouse, True);
      end;
  
negative.code: end;
  procedure TAISquad.SetTargetHouse(aHouse: TKMHouse);
  begin
    if (aHouse <> nil) then
      SetTargetUnit(nil); // House have lower priority so if there is request for attacking house unit must be nil
    if (fTargetHouse = aHouse) then
      Exit;
    fTargetChanged := True;
  