In Night of the Living Trekkies, the group of survivors has organized and formulate a plan to eescape Houston before it is bombed; all they have to do is make it to the USS Stockard (an RV). Jim Pike's Sister Rayna, says, "could be worse." Then the Hotel's power fails. then when they make it to the stairwell, they can't hear anything and think the coast is clear. Rayna Says, "This should be easy", then they hear a whole mob of Zombies burst into the bottom of the stairwell. Finally, Jim snaps: "I order you to quit saying optomistic things."
The Animorphs were particularly Genre Savvy about this, often making reference to the "Irony Gods" who punish phrases such as "It can't get any worse."
Marco in particular made all attempts to avert the trope, usually by giving a realistic odds of their current mission actually succeeding.
This is part of the setting in Terry Pratchett's Discworld novels. One-in-a-million chances are known to come up nine times out of ten. BUT, if you try to stack the odds against you to make it one-in-a-million, you'll usually end up with a one-in-999,874 chance instead, which pointedly does not come up nine times out of ten. Likewise, a not-quite-goddess figure called The Lady has the tendency of rewarding her favorites through unlikely happenstances, BUT will instantly abandon you should you deliberately call upon her. Temples to her tend to get struck by lightning.
Similarly, going into the roughest bar in Ankh-Morpork and identifying yourself as "Vincent The Invulnerable" has on at least one occasion been legally ruled as a suicide.
Quite a lot of things are ruled as suicide in Ankh-Morpork. The trick is getting actually murdered.
Lampshaded most of the time by Rincewind, who is sensibly paranoid, as things around him are usually about to kill him. He epitomises this in Interesting Times, after the battle, all seems peaceful and quiet, and he calmly says "something is about to go wrong" (or something similar). It does.
In The Light Fantastic, when Rincewind arrives at Death's house, he overhears the whispers of the soon-to-be-dead, many of whom are Tempting Fate, e.g. "Watch where you're pointing that bow, you nearly—"
And in Reaper Man, Windle Poons marvels aloud at how easily they'd slain the mall organism, only to have the creature turn on him and his allies in its death throes. While they're inside the creature.
One of the other books suggests one character may have the life span of someone wearing wet copper armor, standing on a mountain top and shouting how all the gods are bastards.
In the third book in the Alternate HistoryWorld War, one of the Alien Invaders, who can't stand cold, has been reassigned to a new area in the winter and asks the pilot how cold it is. Upon being told that there is ice on the ground, he remarks: "That seems to happen a great deal on this planet. I don't suppose this Siberia can be too much worse than the rest."
Also, this happens a lot to Fleetlord Atvar, the commander of the invasion force, starting with a derisive "And how much can a species change in 800 of their years?" in the very beginning of the series. (The very premise is based on that.)
A few more:
"Set off nukes in orbit, that should disrupt their communications and demoralize them to the point of surrender!" They end up proving to humans that nukes are possible and cause everyone to accelerate their atomic programs, and the global EMP failed to do anything significant due to mankind's lack of vulnerable technology.
After Russia sets off the first nuke, "At least the Americans and Germans don't have nukes." Cue Germany nuking Berslau and America nuking Chicago within a week of each other.
Leading to the best line in the series, where a flunky turns to Atvar and says, "Well, Exalted Fleetlord, now what?"
"Those clumsy rockets the Germans use are as annoying as hell, but at least they're the only annoying ones." America begins using short range rocket attacks.
In Second Contact, "Well, damn, I wasn't expecting ginger to exist. At least it can't get any worse now that the colonists are here." It acts as a sex drug on their females, turning their entire mating cycle on its head and generating much lulz amongst humans.
"Let's nuke one city in retaliation for every nuke used against us! Nobody would be crazy enough to ignore such a demand!" Hitler. That is all.
At some point during that exchange, the US sets off a nuke in Chicago, causing the Race to make Seattle go boom. They get a bonus, as it turns out that Vice President Harry Wallace died in the blast, and FDR's strength fails him in January 1944, causing Cordell Hull to become President. The next time we see Atvar, he says something along the lines of "HA! Both of their legitimately elected leaders are dead! Surely they'll refuse to acknowledge Hull as their rightful ruler and collapse into civil war!" The US fails to collapse.
And During the invasion of England, Atvar is puzzled when Winston Churchill tells him that he will use his "most dreadful weapons" and the answer isn't nukes. He decides that Churchill is bluffing on the grounds that nothing is worse than a nuke. Cue mustard gas massacre.
In Romance of the Three Kingdoms, Sun Jian swears an oath that if he's hiding the Imperial Seal (recovered after the sacking of the capital), may he meet a violent end. You can guess what happened. Ditto for Cao Cao's three lines to the effect of "If Zhou Yu and Zhuge Liang had been smart enough to place an ambush here, we'd be doomed." By the second time, his companions have already become Genre Savvy... for all the good it does them, since he's not.
In The Amorous Umbrella (sequel to The Incredible Umbrella), Our Hero, who has a magical umbrella allowing him to enter fictional universes, uses it to attempt to find The Perfect Woman. At one point he uses it to enter the universe of 1950's soap operas. After being ensnared in Plot Twists and Love Dodecahedrons for years, he appears to be trapped in that universe. However, he is Genre Savvy, and recalls the one foolproof way of getting out of a soap opera, which is by dying. And the One True Inescapably Lethal Thing one can do in a soap opera is to say "I have never been better in my life." As soon as he says it, he can leave that universe.
His iceworlder compatriots have a proverb though that is much more sensible: "It can always get worse."
In Doctrine of Labyrinths, in the final book, the heros take a routine train ride through an old forest. They go on at some length about all the legends of evil things that happen in this forest. One of the characters says, "I sure hope nothing happens!" The next chapter opens: "Of course, something did."
In The Dresden Files book Changes, Harry is in a magical garden fighting a giant Centipede. He uses a focused beam of fire to cut it in half, and makes a wisecrack about Atari. Naturally, the two halves regenerate into new centipedes.
Quoth Mort, in Ghost Story, "It's one hour. Just one little hour. What could happen in one hour?" Lampshaded by Dresden: Mort couldn't possibly be a hero, because "heroes know better than to hand the universe lines like that".
In "Hover Car Racer" Jason Chaser is being told how he was the better racer even though his opponent just beat him and was offered a place on a pro team. He says "Yeah?, well I don't see the chiefs of any pro teams walking up to us and offering us a run in a grand slam race." As he says this a billionaire who runs a pro team walks up to offer them a place in the race.
Not so much. The Martians are entirely un-manlike.
In the Gotrek & Felix books, dwarf inventor Malakai Makaisson built the biggest steamship ever, naming it Unsinkable. It sank with all hands (except Malakai) on its first voyage. He built an airship, Indestructible, which crashed, killing everyone aboard, except Makaisson. When he built a second airship, he wanted to name it Unstoppable. For some reason, dwarf elder Borek, who was backing the project, wouldn't permit that.
Lampshaded in the second Artemis Fowl book: villain Briar Cudgeon says that nobody can get to him in order to stop him. The paragraph right after that says, "Of course, you should never say something like that, especially when you're an arch villain. It's just asking for trouble."
In James Alan Gardner's The League of Peoples Verse (starting with Hunted), there is a higher echelon alien known as the Balrog that looks like a glowing red moss. It is insanely powerful and has a bit of a snarky side, as it can't help itself but attack when somebody says something to the effect of, "Well, it can't get much worse."
In the Gaunt's Ghosts novel Blood Pact, Gaunt sees the regiment growing steadily more restless due to the rest on Balhaut and hopes to get back into the war. He gets it, but not quite the way he wanted: A Blood Pact kill-team infiltrates in search of a high-ranking traitor and the Ghosts are dragged in. He later recognises this.
Belisarius Series: In The Tide of Victory, the allied fleet attacks a Malwa harbor with their new cannon-armed warships. When the Malwa siege gun guarding the harbor finally fires, John of Rhodes assures a companion that they couldn't possibly hit anything on their first shot, in a night engagement. A moment later, the companion finds themself knocked on their back by the cannonball striking the ship, killing John as well with a direct hit where he was standing.
In Busman's Honeymoon, the detective Lord Peter has reconstructed the trap that he believed killed the murder victim. His wife is dubious, thinking that it might have been noticed. This is followed by someone walking in and setting off the trap.
Nancy Mitford's 1935 novel Wigs on the Green was a satire, loosely based on Mitford's sisters Unity and Diana (Mosley): it portrayed the British Union of Fascists, fascism in general, and Nazi Germany, as a "harmless bunch of cranks". Understandably it was not reprinted until 2010.
Septimus Heap: In Syren, Septimus disregards Milo Banda's warning of an approaching storm, saying: "Spit Fyre doesn't mind a little strom, does he?" and flies off with Jenna and Beetle on his dragon Spit Fyre. The storm turns out to be much stronger than expected and forces Septimus to crash-land Spit Fyre on Syren Island after the dragon was hit by a lightning bolt.
In Warrior Cats, while training with Lionblaze, Rosepetal actually says, "What could possibly go wrong?" in response to Lionblaze saying that Toadstep shouldn't be so loud when he trains. Immediately after she says this, Bumblestripe appears and says that a dog is attacking his crippled sister, Briarlight.
Thereat King Robert muttered scornfully, "'T is well that such seditious words are sung Only by priests and in the Latin tongue; For unto priests and people be it known, There is no power can push me from my throne!"
Before the night is out, he finds that actually, there is.
In Midworld, after an encounter with a camouflaged predator that mimics a gap in the forest canopy, one of the skypeople makes a snide remark about how, at this rate, they'll run into something that "imitates nothing" next. Three days later, they encounter something called the palinglass...
When Emma is describing the hiking trail she's urging Lori to take at the opening of Aunt Dimity: Snowbound, she is excessively optimistic:
"I'll put in a map of the trail." Emma leaned forward and patted my arm. "But I promise you, you won't get lost this time. Honestly, it's a simple, straightforward route. There's only one turning, and," she sailed on, blithely uttering the curse that had doomed travellers for centuries, "you can't miss it."
In Max Shulman's Rally Round the Flag, Boys!, Guido di Maggio gets his first impression of Walter Hoxie:
"Boy," he said to himself, "there is one guy I am never going to get mixed up with!" Somebody Up There chuckled.
In Harry Potter and the Prisoner of Azkaban, Oliver Wood, Gryffindor's Quidditch team captain mentions that Harry hasn't failed to win them a game as of yet. The next chapter, Harry is overcome by the effects of a dementor and, by no fault to himself, failed to catch the Snitch and lost the game.
Brother Artemis, "God's Angry Man", faced the television pick-up. "And if these things be not true," he thundered, "then may the Lord strike me down dead!" The coroner's verdict of heart failure did not fully account for the charred condition of his remains.note Although this was not actually a case of divine intervention.
In the Federation of the Hub story "The Demon Breed", the alien invaders have captured the Action Girl heroine and the man she was attempting to rescue. With a firing squad ready to execute them, their captor delivers a speech which concludes:
In either case, Tuvela, your defeat and death signal the beginning of the hour of our attack on your world. And now, if it is within the power of a Tuvela to defy our purpose, show what you can do.