The Infernal Affairs Trilogy

The three Infernal Affairs films are incredibly twisty cops vs. Triads films set in Hong Kong between 1991 and 2003. The first film, set in 2002, is based around the stories of two mirrored infiltrators. Chen Wing Yan is an undercover cop in the gang of the chubby, Affably Evil gangster Hon Sam. Yan's handler is Chessmaster senior cop Wong, who doesn't realise that his most trusted underling, Lau Kin Ming, is actually a mole planted in the police force by Sam years before. As Wong's attempts to bring Sam down reach their endgame, Yan and Ming both find their covers in danger of being blown and are both ordered by their pretended bosses to catch the "moles" who are actually themselves.

The second film is a Prequel that tells the story of how Sam rose to his position in the first film, and the unexpected roles that Yan, Ming, and Wong played in that. The third film is a sequel that follows the stories of the surviving characters from the first film, and also tells a flashback story set just before it. It introduces two new significant characters to replace the dead people: Yeung, a smooth and sinister, possibly corrupt, cop from the Security branch; and Shen, a mysterious gangster from the Chinese mainland.

The first film was remade as The Departed, which transferred the action to Boston and made the Triad equivalents Irish-American gangsters, and won the 2006 Best Picture Oscar.

Oh, and the title and the epigrams at the beginnings and ends of the films suggest that Hong Kong is Buddhist Hell and all the characters' lives suck because they're being punished for the sins of their past lives. Or they metaphorically evoke the hells that Yan and Lau are living in as a result of their undercover rules.

The film series provides examples of:

 * Affably Evil: Sam, mostly.
 * Becoming the Mask
 * Being Evil Sucks: if you're a gangster, you will probably end up an utterly corrupt, friendless wreck of a human tormented by guilt over your crimes, and you'll probably die young and unpleasantly.
 * Being Good Sucks: if you're a cop, you know that society is essentially corrupt, that any gangster you manage to put away will get rapidly replaced, and that you'll probably die young and unpleasantly.
 * Bilingual Bonus: Dr. Lee's name is a pun on psychologist in Cantonese.
 * Black and Grey Morality: especially in the second and third films.
 * Character Tics: both Yan's tic of tapping his fingers on things, and Ming's of tapping objects he's carrying against his leg as he walks, are plot points.
 * The Chessmaster: loads, but especially Wong, Sam, Sam's wife Mary, Ming and the younger Ngai.
 * Cloudcuckoolander: Keung has shades of this.
 * Cool Shades
 * Cowboy Cop
 * Destination Defenestration:
 * Detective Mole
 * Dirty Cop
 * Everything's Louder With Bagpipes: played at cop funerals
 * Gambit Pileup: all the films, but especially the plotting in the second film involving Wong, Sam, Sam's wife Mary, and Ngai Wing-Hau.
 * Genre Shift: the first two films are gangster movies, the third is a Mind Screw psychological horror.
 * Going Native
 * Here We Go Again: the third film ends with a flashback to the period of the first film that finishes with Yan and Ming unknowingly meeting each other in a hi-fi store - the scene that began the main action of the first film after an establishing pre-credit sequence.
 * Hidden Wire
 * Hired to Hunt Yourself: both Yan and Ming in the first film.
 * I Know You Know I Know
 * If I Can't Have You:
 * Internal Affairs
 * Kansas City Shuffle
 * Lady Macbeth: Sam's wife Mary.
 * Likes Older Women:
 * Look Both Ways:
 * Man On Fire
 * Mexican Standoff
 * Mind Screw
 * Mob War
 * The Mole: The two leads are the most obvious example.
 * Napoleon Delusion:
 * No, Mr. Bond, I Expect You to Dine: in a morally-inverted example, Wong likes doing this to Sam whenever he's arrested.
 * One Steve Limit: exception with the two Marys
 * Out Gambitted
 * Out With a Bang: the capo "Gandhi" in the second film.
 * The Cuckoolander Was Right: All through the three films, Keung has always been the one to point out undercover cops. A few times, he has also made throwaway comments pointing to Yan as a cop.
 * The Purge: the massacre of the Ngai capos in the second film.
 * Those Two Guys: Del Piero and Keung in the first movie.
 * Reverse Mole
 * Revised Ending: the mainland China version of the first film ended with a different ending in which, because of government Moral Guardians.
 * Room Full of Crazy:
 * The Shrink: Yan's therapist Dr. Lee.
 * Sinister Shades
 * Sunglasses At Night: Shen (and all the other sunglasses tropes on this page)
 * Through the Eyes of Madness:
 * Xanatos Speed Chess