In the Mojave Desert in 1982, a man named Nix has gathered a cult in an isolated house, where he plans to sacrifice a young girl that he has kidnapped. Nix calls himself "The Puritan" and has the ability to use real magic. A group of former cult members, including Swann and Quaid, arrive to stop him. After the initial confrontation with the cultists, Nix's assistant, Butterfield, escapes, and Swann is attacked magically by Nix. The kidnapped girl shoots Nix through the heart with Swann's gun. Swann fastens an ironwork mask over Nix's head, who appears to die, and declares that they will bury Nix so deep that no one will ever find him.
Thirteen years later, New York City private detective Harry D'Amour is investigating a case in Los Angeles. D'Amour has a long-standing interest in the occult, and has some renown from his involvement with a recent exorcism. During the investigation, D'Amour discovers a fortune teller shop owned by Quaid, where he is relentlessly attacked by a man with unusual strength. D'Amour finds Quaid suffering from multiple stab wounds. As he dies, Quaid warns D'Amour that âThe Puritanâ is coming.
Swann, now a famous stage illusionist, lives in a Beverly Hills mansion with his wife, Dorothea. When informed that Nix's followers have murdered Quaid, Dorothea suggests they hire D'Amour to investigate the murder. D'Amour agrees, and she invites him to Swann's magic show. Swann performs a new death-defying illusion which goes wrong, and he is killed on stage.
D'Amour goes to The Magic Castle, where he hears Nix being described as a legend, and that Nix was believed to have taught Swann. After getting into the Repository, a special room in the Magic Castle that supposedly contains every magic secret known to man, he discovers that Swann's "illusions" involved real magic.
Later, at Swann's house, Dorothea reveals that she was the girl that Nix kidnapped, and that she married Swann because of a sense of obligation. Dorothea and D'Amour make love; afterwards, D'Amour is attacked by a man engulfed in fire. Suspecting a ruse, D'Amour opens Swann's coffin and finds that the body inside is fake. Valentin, Swann's assistant, explains that he helped Swann fake his death. D'Amour agrees to allow Valentin and Swann's ruse to continue. At the funeral, D'Amour follows a suspicious looking man who turns out to be Swann, who, in jealousy, attacks D'Amour with magic. D'Amour convinces the emotionally hurt Swann to help him put an end to Nix's cult.
Butterfield kidnaps Dorothea, using her as a hostage to force Valentin to recover Nix's body. After finding Nix's corpse, Butterfield stabs Valentin and takes the corpse back to the old house in the desert. There, his cultists have returned to witness Nix's resurrection and follow him once again. Butterfield removes the iron mask and Nix regains consciousness. Swann and D'Amour, acting on information given by the dying Valentin, arrive. Swann attacks Butterfield and tells D'Amour to rescue Dorothea. Nix, instructing his followers to prepare to receive his wisdom, opens a hole in the ground beneath him and Dorothea and turns the earth into quick sand that swallows the cultists, declaring that only Swann is worthy of receiving his knowledge.
D'Amour finds Nix and Dorothea just as Nix is dropping her into the hole and rescues her. As they flee, D'Amour and Dorothea are attacked by Butterfield, whom D'Amour kills. Swann agrees to act as Nix's disciple in an effort to stall for time, but Nix sees through the ruse and attacks with magic. Dorothea finds D'Amour's gun and shoots Nix in the head. Nix then begins to transform into a hideous creature. Swann uses magic to help D'Amour deliver a final blow to Nix, who falls into the hole, which is now filled with lava. Dorothea holds Swann in her arms as he succumbs to his injuries. D'Amour sees that Nix, hideously injured but alive, is summoning a whirlwind, which ends up sealing the hole. Dorothea and D'Amour escape the house and walk into the desert.

Question: What happens when Dorothea shoots Nix with D'Amour's gun?
Answer: Nix turns into a hideous creature
Alternative answer: NIx transforms into a hideous creature