He improvised, your fave cant improvise half as good as Madara can.
That's AN AVATAR!
OT: What everyone's said, he improvised... Really everything in this war is all wrong, it should've been a lot different. It's like someone changed history in the narutoverse, like it was SUPPOSED to be Nagato bringing Madara back to life, but Naruto convinced Nagato to bring konoha back to life....
Then Kabuto resurrected Madara via edo tensei....that in itself was a situation, which later resulted in Madara breaking the edo contract... Then LATER on having to FINALLY revive himself with the help of Black Zetsu taking over Obito's body.
If it weren't for Naruto and Kabuto, everything would've gone according to plan.