Detective Dee and the Mystery of the Phantom Flame

Detective Dee and the Mystery of the Phantom Flame is a 2010 Chinese-Hong Kong action-adventure gong'an film directed and produced by Tsui Hark, which stars Andy Lau, Carina Lau, Li Bingbing, Deng Chao and Tony Leung. Hong Kong movie-star Sammo Hung takes the role as the action director for the film.

The film tells the story of Di Renjie (Andy Lau), one of the most celebrated officials of the Tang dynasty, who is tasked by the Empress Wu Zetian (Carina Lau) to solve a series of inexplicable murders in which victims suddenly burst into flames.

Principal photography for Detective Dee began in May 2009; the film was shot at Hengdian World Studios in Zhejiang, China. Detective Dee was released in China on 29 September 2010 and in Hong Kong on 30 September; in North American, it premiered at the 2010 Toronto International Film Festival.

The film grossed US$51.7 million and won six awards at the 30th Hong Kong Film Awards, more than any other film, including Best Director and Best Actress for Lau; it was also nominated for the Golden Lion at the 2010 Venice Film Festival. It was followed by two prequels, Rise of the Sea Dragon (2013) and The Four Heavenly Kings (2018), also directed by Tsui and starring Carina Lau, and with Mark Chao as a young Detective Di.

Plot
In year 689 of the Tang dynasty, Wu Zetian is to be crowned the first Empress in China despite opposition from Tang officials. She has a Guan Yin figure built overlooking her palace in Luoyang, but an official inspecting the progress mysteriously erupts into flames. Penal officer Pei Donglai and his superior investigate and interrogate the supervising builder, Shatuo, who was formerly imprisoned after he took part in a rebellion. They find nothing and Pei's superior also dies soon after by also erupting into flames.

The Empress orders former detective and rebel Di Renjie be released from prison after the Imperial Abbot states that he must solve the mystery of the fire. She sends her attendant Shangguan Jing'er to fetch Di from prison, and Jing'er arrives just as Di is being attacked by assassins. Wu reinstates Di as the royal detective and assigns Jing'er to be both an assistant and spy. Jing'er attempts to seduce Di, but is interrupted by assassins. Di meets Prince Li, who fails to recruit him into leading a rebel army. When Pei takes Di and Jing'er to inspect the charred corpses, Di deduces the assassins use a poison that ignites upon contact with sunlight.

Pei joins Di in his investigation. Di reunites with his friend Shatuo, who suspects the poison to be the venom of "fire beetles". He points Di to Donkey Wang, who is hiding in a network of caverns called the Phantom Bazaar. Pei orders Shatuo arrested for not telling him of this before, but Di stops him. Di, Pei and Jing'er locate Dr. Wang At the Phantom Bazaar, but are attacked by a figure who seems to be the Imperial Abbot. After Jing'er and Pei fight him, Pei pursues him to the Abbot's forbidden residence. Donkey Wang reveals that he was the court physician and tried to use fire beetles as medicine for the late Emperor. Learning their true danger, he disguised his appearance using acupoints and fled.

Prince Li returns Di's mace to him, which was taken after he was imprisoned. Di maintains his political neutrality, and Li is assassinated soon after. Di suspects the Abbot's involvement, but Wu warns him that he will be killed if he attempts to enter the monastery. Pei finds the first inspector had discovered something in his inspection and takes the diagrams, but he is captured. At the monastery, Di learns that the Imperial Abbot is actually Jing'er disguised using acupoints. Di speculates that the Empress used the Imperial Abbot to justify her tyranny and eliminate her political opponents, possibly including the late Emperor. Jing'er attacks Di, but is unable to kill him. She stumbles into a trap set by the assassins and is mortally wounded. Di fulfills her final request by sending her back to court, and she dies in the Empress's arms.

Di finds Pei, but Pei has already been poisoned by the fire beetle venom and Di is unable to save him. Before he dies, Pei directs Di to the diagrams, which implicate Shatuo. When Di confronts Shatuo at the Buddha, Shatuo reveals his plan to kill the Empress by collapsing the Buddha upon the palace as revenge. He killed both the officials after they noticed his changes to the Buddha and Prince Li for insulting him. He also took the late Prince Li's authority to use Li's army to invade the city and kill Wu if she survives. As Di and Shatuo fight, Di is drenched in the fire beetle poison. Di is able to divert the statue, and Shatuo heads to the coronation to poison Wu. Di catches up with Shatuo and spills the poison on him instead, causing him to burn to death in the sun.

Di saves Wu from the collapsing statue and warns her of the rebel army. The Empress promises to be a just ruler and to return power to the Tang dynasty when her reign ends. Refusing Wu's offer of a place in her court, Di resigns as inspector and retreats into the Phantom Bazaar with Dr. Wang, where he will struggle to live on with his incurable condition.

Cast

 * Andy Lau plays Di Renjie, an exiled detective of the Tang dynasty. Lau felt that the character's psychic abilities was one of his greatest traits: "He is a forensic psychologist who knows what you're thinking, from your eyes, your breathing, the pauses in your speech, he could tell what you're withholding, a melancholic detective". To prepare for his role in the film, Lau studied criminal psychology. Lau had to practice horse riding for the film, accepting help from a professional trainer: "I have always been rather afraid of horseriding, afraid of such a large animal, but now I have overcome the mental obstacle and the lessons have been rather smooth". Director Tsui Hark said that "he was someone very special, one possessing nerdiness, good deportment and great foresight. His mentality and philosophies were very different from Sherlock Holmes or James Bond. He can dwell forever in my heart, so I have a very romantic view on him, and must also be immaculate".
 * Carina Lau plays Wu Zetian, the Tang dynasty empress of China. The film marks Lau's first feature film role in four years. On her role in the film, she commented on the strength of the empress: "I feel that Wu Zetian is a 'superman', her fate is very tragic, but she would find opportunities to defy her fate, to bring her, step by step, closer to her dreams. She has very strong willpower and is very wise, unlike myself".
 * Li Bingbing plays Shangguan Jing'er, a highly skilled martial artist, who serves as Wu Zetian's maid and right-hand woman. The character is loosely based on Shangguan Wan'er, who was a poet, writer and politician of the Tang dynasty. Director Tsui Hark decided to change the character, feeling that a more fictitious character would provide more room for creativity: "There're some things that Wan-er couldn't do, like being a top-notch martial arts expert".
 * Deng Chao as Pei Donglai, an albino officer serving the empress. Fierce and determined to the point of cruelty, Pei is nevertheless devoted to his duty. He often clashes with Di over their differing investigative styles, but grows to respect Di.
 * Tony Leung Ka-fai as Shatuo, a former friend of Di's who is now working on the construction of a massive Buddha statue.

Production
Detective Dee and the Mystery of the Phantom Flame was directed by Tsui Hark, who is also a co-producer with his wife, and made by the Chinese production company Huayi Brothers (also the film's distributor) and production company Film Workshop (the 50th feature film produced by the company).

The screenplay was written by Chang Chia-lu, the Taiwanese screenwriter of the films Forever Enthralled and A World Without Thieves. When asked to direct the film, Tsui said that he would only direct the project if he could make adjustments to the script, which he did. Tsui never divulged most of the changes that he made to the original script, but did mention that the character Shangguan Jing'er was previously a man. Fight choreography and art direction for the film was handled by Sammo Hung.

Pre-production
Prior to filming Detective Dee, Tsui had spent years doing research on stories concerning real life Tang dynasty official Di Renjie. Chen Kuofu first approached Tsui with a screenplay based on the life of Di Renjie.

Tsui first announced production plans in 2008, while promoting his previous film, All About Women, at the 13th Pusan International Film Festival. At the time, Tsui had pondered on whether to make Detective Dee or remake the 1966 film Dragon Gate Inn.

Casting
For the lead role as Di Renjie, Tsui originally had Tony Leung Ka-fai, along with Tony Leung Chiu-wai, and Jet Li in mind. Li mentioned while promoting Tsui's other film, Flying Swords of Dragon Gate, that he had a chance to read the script though he wasn't able to be part of the project due to some unknown reason. Tsui commented on choosing an actor to play Di Renjie: "Who said that Di Renjie must be plump and old? He could also be very handsome. Wits and looks can balance one another". Andy Lau was cast in the lead role, while Carina Lau, Li Bingbing, Deng Chao and Tony Leung Ka-fai appeared in supporting roles.

Filming
Principal photography for Detective Dee began on 6 May 2009, with a budget of $20 million; the film was shot using Red One digital cameras in Zhejiang, China at Hengdian World Studios, which is one of the largest film studios in the world. Detective Dee has been described as one of Tsui's most personal films to date. During production, Tsui would reportedly work consistently on the set, barely getting enough sleep. Filming wrapped up in February 2010, after nine months to complete.

Action direction
Sammo Hung served as an action director for the film and his stunt team built eight platforms (12 meters tall) in the cave for three days of wire work. The record was over 70 wires for one scene. One of the sculptures was an 80-metre bust of Empress Wu Zetian, a key element of the film that cost $12 million HKD to design and decorate. During production, reporters were invited to enter the bust's interior, which included a 12 meter tall circular platform. Outside of the platform hung red and white drapes that were full of scriptures.

Fight choreography
Detective Dee's martial arts sequences were choreographed by Sammo Hung, who worked extensively alongside actors Andy Lau and Li Bingbing. Tsui chose Hung as a choreographer, feeling that his work had shades of Bruce Lee. Of the fight sequences for the film, Tsui commented that they are similar to that of Ip Man, as they aimed for realism with actual punches and kicks. This proved difficult for actors who had no martial arts experience. Of the two actors, Li had no experience in martial arts, and her role required to use various weapons in the film such as a whip and a sword.

Tie-in novel
A tie-in novel written by Lin Qianyu was published in tandem with the film's release in 2010.

Reception
China Daily placed the film on their list of the best ten Chinese films of 2010. Time magazine considered it the third best film of 2011, after The Artist and Hugo. Review aggregator Rotten Tomatoes reports that 80% of critics gave the film a positive review, based on 50 reviews, with an average rating of 6.9/10.