Throughout the Thirty Years' War, the infantry's shock ability was continuously improved. The static nature of the infantry that served well against the cavalry-dominated Polish-Lithuanian army was enhanced during the war to produce infantry capable of both providing devastating firepower and executing offensive maneuvers. Initially, at the Battle of Breitenfeld (1631), the infantry was almost entirely reliant on their firepower and saw very limited offensive use; but under the leadership of Johan Banér, who took command after the defeat at Nördlingen, the Gustavian brigade system was finally changed into the battalion system recognisable from the War of the Spanish Succession and the Great Nordic War (the depth was lowered from six ranks to three or four when the bayonet was introduced at the end of the 17th century).