Buddhist legends about Emperor Wu of Liang
During the reign of Emperor Wu (r. 502–549) of the Liang dynasty, he embraced and promoted Buddhism. Several times he became a Buddhist monk and forced his court to purchase him back with substantial offerings to the sangha. In 517 he ordered the destruction of Taoist temples and forced Taoist priests to return to lay life. Some of his other reforms, such as the disallowing of capital punishment and of the animal sacrifices during ancestral ceremonies, conformed with his Buddhist convictions. Because of his constant support for Buddhism, Emperor Wu came to be seen as the Chinese counterpart of Ashoka, the great Indian chakravartin and patron of the religion. Later writers who saw Emperor Wu's reign as a golden age of Chinese Buddhism compiled stories on the emperor's role in creating or sponsoring important Buddhist institutions or rituals. A cycle of stories developed around Bao Zhi, the emperor's favorite monk, and around Bodhidharma, the first patriarch of Zen, who was alleged to have met the emperor in the 520s. The emperor's encounter with Bodhidharma According to Buddhist tradition, Bodhidharma, the first Zen patriarch of China, came to visit Emperor Wu around 520. The emperor told Bodhidharma that he had built