zuò​fǎ​zì​bì

to be the victim of one's own scheme