Agatha Heterodyne, the last of the Heterodyne family, has returned to her family's hereditary town with the might of the Wulfenbach Empire hot on her heels. The only thing holding off an outright attack is Gilgamesh Wulfenbach, the heir to the Empire, who has joined Agatha and her friends inside the great artificially intelligent fortress of Castle Heterodyne. Now they must race to repair the mechanisms that once allowed the Castle to defend Mechanicsburg, before the rest of Europa shows up to take all the revenge the mad Heterodynes of the past so richly earned.