In "Harry Potter and the Goblet of Fire", Moody is appointed as the new Defence Against the Dark Arts teacher at Hogwarts, coming out of retirement as a favour to Dumbledore. Shortly before the school year begins, however, Moody is attacked by Barty Crouch, Jr., who subdues him with the Imperius Curse and takes Polyjuice Potion to assume his appearance. He keeps the real Moody alive as a source both of Polyjuice potion ingredients and of personal information helpful in putting the impersonation over and takes Moody's place at Hogwarts. Moody's well-known habit of carrying around his own drinks in a private hip flask allows Crouch to take the Polyjuice Potion as needed to sustain the masquerade without raising suspicion.