It is said that Song Jiang led his troops to conquer the Liao by imperial order, sweeping all before them all the way to Tanzhou in Liao territory. The Liao marshal Wuyan Guang personally deployed the 'Taiyi Mixed Heavens Formation', which was based on the Nine Palaces and Eight Trigrams, containing the positions of the Twenty-Eight Mansions, and also arranged according to the principles of the Five Elements' generation and restraint, making it unpredictable and infinitely profound. Song Jiang sent the vanguard Lu Junyi to lead Lin Chong, Wu Song, Qin Ming, Huyan Zhuo, and other generals to attack. The commanders entered the formation as planned, but unexpectedly the formation changed abruptly, as if entering a maze. Lu Junyi was trapped for a long time, and it was only thanks to Yan Qing and Dai Zong venturing deep into the formation at the risk of their lives that he was rescued. Many other officers also suffered losses. Seeing the initial defeat, Song Jiang could not help but become deeply worried. After returning to camp, he urgently summoned Wu Yong, Gongsun Sheng, and others to discuss countermeasures. Wu Yong and Gongsun Sheng studied the formation diagram together. Gongsun Sheng explained the mysteries of this formation in detail, saying that it could not be broken by direct attack but must be defeated with unconventional tactics, requiring the principle of the Five Elements overcoming each other, supplemented by the power of talismans and spells. The two worked on it for several days and finally devised a plan to break the formation, assigning the 108 heroes to enter according to their corresponding star positions.
The next morning, at Song Jiang's command, the generals, following the strategy set by Wu Yong and Gongsun Sheng, split into nine routes and charged directly at the Taiyi Mixed Heavens Formation. Gongsun Sheng donned a ritual headpiece and a crane-feather cloak, ascended a high platform, pinched his fingers in a spell gesture on his left hand, held a sword in his right, and muttered incantations, performing sorcery to aid the effort. In an instant, dark clouds gathered on the horizon, wind and thunder clashed, and the Liao army's formation fell into confusion. Li Kui, the Black Whirlwind, and Lu Zhishen, the Flowery Monk, like two fierce gales, brandished their axes and staff, charged into the formation, cutting down any enemy they met, and were invincible wherever they went. Lin Chong, Wu Song, Hua Rong, Qin Ming, and other generals each led elite troops, following the gates of life indicated by Wu Yong, and valiantly fought their way in. The roaring battle cries shook the sky within the formation. Although the Liao army resisted with all their might, under the fierce assault of the Liangshan forces and the reinforcement of Gongsun Sheng's magic, their formation gradually collapsed. Seeing the situation turning unfavorable, the Liao general Wuyan Guang urgently adjusted his troops to remedy the situation, but it was already beyond remedy. The generals of Liangshan Marsh advanced as if into an empty land, scattering the Liao army's formation into pieces.