It is said that Song Jiang, by imperial decree, led the campaign against the Liao, advancing with irresistible force straight to Tan Prefecture in Liao territory. The Liao marshal Wuyan Guang personally set up the 'Taiyi Hundun Array', which was based on the Nine Palaces and Eight Trigrams, contained the positions of the Twenty-Eight Mansions, and also applied the principles of the Five Elements' generation and control, making it unfathomable and infinitely mysterious. Song Jiang sent the vanguard Lu Junyi, leading Lin Chong, Wu Song, Qin Ming, Huyan Zhuo and other generals to attack. The generals entered the array as planned, but unexpectedly the formation suddenly changed, trapping them as if in a maze. Lu Junyi was trapped for a long time, and it was only thanks to Yan Qing and Dai Zong, who risked their lives to penetrate deep into the array, that he was rescued. Many other officers and men also suffered losses. Seeing the initial defeat, Song Jiang could not help but feel 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 array diagram together. Gongsun Sheng discussed in detail the mysteries of this formation, saying that it could not be broken by a frontal attack but must be defeated by an unconventional approach. They would need to apply the principle of the Five Elements overcoming each other, supplemented by the power of talismans and spells, to break it. The two studied it for several days and finally devised a plan to break the formation, assigning each of the 108 heroes positions according to the constellations and sending them into the array.
At dawn the next day, at Song Jiang's command, the generals, following the strategy devised by Wu Yong and Gongsun Sheng, split into nine routes and charged straight at the Taiyi Hundun Array. Gongsun Sheng, wearing a ceremonial headdress and a crane-feather cloak, ascended a high platform. In his left hand he formed a spell gesture, in his right he held a sword, and he chanted incantations under his breath to perform magic in support. In an instant, dark clouds gathered on the horizon, wind and thunder raged together, and the Liao army's formation fell into chaos. The Black Whirlwind Li Kui and the Flowery Monk Lu Zhishen, like two raging whirlwinds, brandished their battle-axes and monk's staff, charged into the formation, cutting down any enemy they encountered, sweeping all before them. Lin Chong, Wu Song, Hua Rong, Qin Ming and other generals also led their elite troops, bravely charging in through the 'Gate of Life' pointed out by Wu Yong. The battle cries shook the heavens; although the Liao army resisted desperately, under the fierce assault of the Liangshan forces and the support of Gongsun Sheng's spells, the formation gradually collapsed. Seeing the situation was turning unfavorable, the Liao general Wuyan Guang urgently tried to redeploy his troops to salvage the situation, but it was too late. The heroes of Liangshan, as if entering an unguarded territory, shattered the Liao army's formation completely.