Moroni did a tremendous work of preparation for when the Lamanites came up to attack the people of the Nephites. Even though in their past, there was a terrible slaughter and destruction that took place at the land of Ammonihah, Moroni learned from this experience, and prepared the place to be strong. Weak things became strong.
Moroni also prepared other parts of the land that were known to be weak, to become stronger.
There was one thing that gave Moroni the advantage in this situation against the armies of the Lamanites. It was his creative approach towards defending the lands of the Nephites, for it was done in a way that had never been known before among them. Because it was “new” the enemy was not prepared to.