Write an article that answers the following question: The truce that began with the Habsburgs in 13138 last how many years before the battle of Sempach?
Within a month of the battle, in December 1315, the Confederates renewed the oath of alliance made in 1291, initiating a period of growth within the Confederacy. In March 1316 Emperor Louis IV confirmed the rights and privileges of the Forest Cantons. However, Leopold prepared another attack against the Confederacy. In response, Schwyz attacked some of the Habsburg lands and Unterwalden marched into the Bernese Oberland. Neither side was able to prevail against the other, and in 1318 the isolated Forest Cantons negotiated a ten-month truce with the Habsburgs, which was extended several times. By 1323 the Forest Cantons had made alliances with Bern and Schwyz signed an alliance with Glarus for protection from the Habsburgs. Within 40 years cities including Lucerne, Zug and Zurich had also joined the Confederacy. The Confederate victory gave them virtual autonomy and, for a time, a peace with the Habsburgs that lasted until the Battle of Sempach in 1386.