In X2, Magneto prevents Stryker's attempted genocide of all mutants by using his powers to turn off and open the door to Dark Cerebro before Jason can make Prof. X successfully kill any mutants. Then Magneto rearranges the panels inside of Dark Cerebro so that it would target humans, and Mystique takes on the form of Stryker and orders Jason to make Prof. X kill all humans instead. Magneto, Mystique, and Pyro then use Stryker's helicopter to escape Alkali Lake, leaving the X-men behind.
Was this plan actually supposed to work? That is, did Magneto intend for all humans to die, and did he intend for the X-men to drown when the dam bursts? I know that Magneto is no stranger to killing people, but this goes above and beyond anything he does in any other movie. I'm wondering if he instead expected the X-men to be able to stop Jason, rescue Prof. X, and escape before the dam bursts? That still seems like quite a risk he was putting humanity in, in case the X-men weren't able to stop Jason... so maybe Magneto just didn't care whether he killed all humans or not?