 Complete the following phrase:  Johns grandson Count Bernard VII of Armagnac sold the county to Duke Philip II of Burgundy in 1390. It thus became part of the Duchy of Burgundy and the title Count of Charolais was systematically given to the heir apparent of the incumbent duke. After the death of the last Valois-Burgundy duke Charles the Bold at the 1477 Battle of Nancy, the county was seized by King Louis XI of Franceagainst the fierce resistance by the Habsburg archduke Maximilian I of Austria, husband of Charles daughter Mary. The same year however, loyal to the duchess Mary, daughter of Charles the Bold, the County of Charolais rebelled and expelled the french. After the 