SOONER OR LATER somebody had to do it - take the exhausted remnants of that born-weary genre of thriller created by Dashiell Hammett and Raymond Chandler and make something attractive and plausible of it.

Ross Thomas has done it. The settings of Chinaman's Chance are the familiar armpit towns of southern California - Venice, Pelican Bay and enviroons; there are the usual mobster goons, millionaires married to nymphomaniacal actresses and - in this later day of the American ashcan school of detective story - CIA agents; the little adornments of the Hammett-Chanler sort are present - a man having his thumb slowly broken by two Mafia debt collectors, an alcoholic newspaperman throwing up in the sink the morning after, etc.

But, somehow, Chinaman's Chance is a literary child that transcends its parents. It is a beautifully paced, sensitive and complex novel - a mine field of cliches parodied, interlaced with serious, brilliant writing.

Its principle charm - and its greatest human depth - come from the two heroes of this superb thriller - Arhur Case Wu, who claims to be the legitimate heir to the throne of China, and his partner, Quincy Durant.

Wu - the Chinaman of the title - and Durant have a marvelous history. They met in a San Francisco orphanage whence they lammed when they were 14. They have been freebooters, smugglers, spies and con men all over the world ever since - after a pause for educational polish at Princeton. In the phase of their lives just before the novel opens, they were running a chili parlor in Scotland.

The plot of Chinaman's Chance is impossible to summarize briefly. It begins with Wu and Durant setting up a millionaire for either a con or to collect a huge reward for finding the millionaire's vanished sister-in-law. The story moves fast - through small-city Police corruption, the saga of an ex-marine who claims to have a map showing where $2 million were buried in Saigon in the last moments of the ignominious American departure from Vietnam, a few murders, a comically grisly scene in a jail cell where Wu and Durant beat up three predatory homosexuals, the machinations of a Bowdoin-educated Mafia boss who is borrowed from Mario Puzo's Godfather and a suave, elegant power broker from Washington on loan from one of the conspiratorial novels of Richard Condon. In all of this, the locus of threat and manipulation keeps changing - with Wu and Dutant one jump ahead of people stalking them and other people gulling still other people. It gets a bit bewildering at times, but never completely blurred. Wu and Durant win out in the end - double, triple and quadruple-crossing everyone. Chicanery exists in layers in this novel with the two heroes always on the next layer down.

They are attractive rogues and the most honorable thieves since the legend-makers persuaded us that Robin Hood was really the good guy and the Sheriff of Nottingham the rat.

What takes Chinaman's Chance far beyond the perimeters of the usual novel of this genre is the subtelty and craft of Ross Thomas's portraiture - when he chooses to explore characters at some depth. There is a wonderfully blowsy woman in a rundown Los Angeles neighborhood, the poignant memory of a pop singer who died of a heroin overdose in Florida, a con man named Otherguy Overby who joins the central conspiracy as the mercenary.

When, toward the end of the novel, Durant discovers that a man he has just killed was his brother, Artie Wu says to him, "You don't need a brother. You got me." The friendship between Wu and Durant is that old fashioned kind of love between men that we used to accept at face value before our obsessions with sexuality made such love suspect. Wu and Durant and the relationship between them give Chinaman's Chance its drive, power and attraction. The overweight, witty Wu is a marvelous counterpoint to the impotent tormented Durant who yearns to know his real identity. They are funny and, at the same time, touching characters.