Chu had recovered significantly enough to mount serious resistance after their disastrous defeats to Qin in 278 BC and losing their centuries-old capital of Ying (Jingzhou). Despite its territorial size, resources and manpower, Chu's fatal flaw was its largely corrupt government that mostly overturned the legalistic-style reforms of Wu Qi from a century and a half earlier, when Wu Qi transformed Chu into the most powerful state with an area of almost half of all the other states combined. Wu Qi was from the same state (Wei) as Shang Yang, whose legalistic reforms turned Qin into an invincible war machine.