I'm reading a web novel, and it states:
What does "懷孕" mean or represent in this context?
Not judging OP's taste of literature, but stories like this would ruin your grammar.
Now the answer:
Obviously, the conversation is between a group of MMO players.
The part of the story here is 凫水囡囡 (ID of a player) wants to do a "task" 任务 which requires a five player team. So he/she, I assume it's a he but she is also possible as this could easily be that kind of story, added four other players in to the group. Those four are supposedly all females as the story called them MM (a online slang for chicks).
So the part of the lines in question come up after they were added and before 凫水囡囡 tells them why "he" added them. Below are a rough line by line translation:
Adding four chicks into the team without any explanation got everybody as surprised as curious babies.
Lin Xiao Wu: "Oh, chief/boss/master, what are you gonna do to us, I was just helping Yi Miao Ying Xiong with a job!"
Fu Shui Nan Nan: "I got a job, of course."
Lin Wan Er smiled: "Pighead, what kind of job?"
Dong Cheng Yue laughed: "Basically the kind of job that will knock you up if failed"
I was speechless. "Dong Cheng Yue, how many boys hearts you wanna break with your obsession with knocking-up (or maybe "getting knocked up", don't really know the character). After all you are a goddess level girl. You ought act more conservatively!"
Dong Chang Yue become shameless again: "Then, I have to go barren."
As I native speaker, I don't really know what do they mean. But as far as I can tell. The character named Dong Cheng Yue is seen to be horny by "Me", and she seem to always say stuff relating to sex. So the phrase might be literally getting pregnant (suggesting the task is hooking up) or just figuratively (suggesting the task is significant), or maybe a little both.
To me it's just a bunch of MMO players joking around or maybe with some sort of flirtation. Anyway, as far as Chinese the language/culture concerns, 失败就怀孕 isn't really a thing. So you can just try to interpret in anyway you want as if it were written in English.