Plot immunity is a phenomenon in fiction (particularly serialized fiction, such as television series and comic books) that allows for major characters – usually the protagonist and/or antagonist – to avoid the consequences of events that would remove them from the plot. The most common variation of this is the protagonist's seeming invulnerability to fatal consequences. Killing the hero would end the story without resolution. Audience awareness of this "immunity" drains the dramatic tension, as they know that the main character won't die in the middle of the first act. The result is the hero being locked in a deathtrap while the audience yawns or laughs.
One way in which a story might work around this is by causing a form of near-fatal injury or consequential setback to the "immune" character. Another is to kill a supporting character, particularly one which the audience has likely grown fond of (for example, the sidekick or love interest, or the hero's pet dog); the sacrifice of redshirts do not convince the readers that the main characters are in actual danger of even emotional harm.
Role-playing games have an additional problem regarding immunity. Fatal consequences for a player character are a way of keeping the player's goals down to earth. If the character is never perceived as being in any danger, then the player will never surrender or back down from any adversary or obstacle, regardless of how ridiculous it might seem to do so. On the other hand, character death leaves the character's player with nothing to do in the game for the remainder of the session; a good gamemaster is able to find balance between these two extremes.