Near the start of Xenoblade, Fiora tells Shulk that she's super-happy and wishes every day could be like this forever. So naturally the colony gets invaded shortly thereafter, and she dies before being reconstructed.
Final Fantasy IX has a fairly spectacular example in Cleyra, a Hidden Elf Village protected by a magical sandstorm: "No enemy would dare attack us when we strengthen the storm!" "I think strengthening the storm would be good for me." "Strengthening the storm is the best thing you can do right now!" The attempt causes the enchantment to break.
In Star Control II, you can meet the Melnorme and their space ship, the Inevitably Successful in All Circumstances.
Although, unless the player does something really silly, this will turn out to be an aversion.
In Resident Evil 5, right after you run into a pair of Lickers, one of the characters remarks that it's a good thing there was only a couple of them, because there was no way they'd survive against a whole horde of them. Guess what happens when you have to wait for the elevator...
Uther: I hope there is a special place in hell waiting for you, Arthas! Arthas: I guess we'll never know, Uther, I intend to live forever.
We all know how that ends up.
Yogg-Saron: NO KING RULES FOREVER!
This trope is given a lampshade by Urdnot Fortack in Mass Effect 2, lamenting he is researching medicine and crop genetics when he thinks that the Krogan could just buy that from the Salarians. Shepard notes their surprise at him willing to trust the Salarians with that, to which Fortack asks rhetorically what they could do, render the Krogan even more sterile? He quickly adds "Wait, forget I said anything".
In Halo: Combat Evolved, a group of space marines board a ship owned by hostile Covenant. They look around the empty room they arrive in, note that there are no blips on their RADAR, and one of them says: "No Covenant. I guess nobodies home." Cue doors all around them opening to reveal hordes of Laser Sword - wielding Covenant (who were wearing devices that shielded them from RADAR.)
Quickly lampshaded: "No Covenant. You had to open your mouth."
(Mario/Luigi arrives at Bowser Jr's Boom Bunker, where he finds the Toad Brigade finding the remains of a destroyed robot on the first planet, it is Megahammer, the robot Bowser Jr. used during his battle against Mario/Luigi at the end of Bowser Jr's Fearsome Fleet)
Blue Toad: Hey, Mario/Luigi! Come take a look at this!
Banktoad: Um, isn't this a bad idea? I'm scared...
Toad: Don't worry, guys. It's broken! (Mario/Luigi approaches the now-destroyed Megahammer when all of a sudden it immediately turns itself back on and start firing Bullet Bills again)
Mailtoad: Spoke too soon!
Yellow Toad: (sleeping) Wait, what?
Metroid Prime 3: Corruption gets in on the act at the beginning of the game at the same time it references Warhammer 40K with the Horus Rebellion. That feeling it could get worse? He has no idea...
Prior to Metroid Prime, the Chozo actually did this too. Remember their wall-hanging made of Cordite? Cordite is a kind of gunpowder for modern-day heavy-duty artillery weapons. It's not something you should make wall-hangings off.
Also invoked at the end of Assassin's Creed: Brotherhood, when while the modern-day Assassins (mainly Lucy, which makes it all the more ironic considering the fact she at the very least is badly wounded afterwards, if not killed) are exploring the Colosseum to retrieve the Apple of Eden, they repeatedly remark how "It's nearly over", "We've finally found it", "We're so close", "What will we do next" etc etc, which, to the perceptive player who picks up on this constant need to mention such things, creates a sense of foreboding. Talk about counting your chickens before they've hatched.
Throughout the game (while playing as Ezio), you can make areas safe for travel and unlock merchants by assassinating the guard captain in charge and burning the guard tower. One such captain is busy lecturing his men about how to watch for and survive Assassins and that he has great experience with them.
Also done at the beginning of Assassin's Creed II. It is a generally heartwarming moment, but also a bit unsettling because of this very trope.
Frederico: It is a good life we lead, brother. Ezio: The best. May it never change.
In Dead Space 2, you're on a tram on your way to the bridge of the old Ishimura to activate the gravity tethers. Ellie tells you that the necromorphs are swarming in through a hole in the Medical Deck, but at least you won't have to go through there.
Tram computer: Unexpected obstruction ahead. Shutting down. Welcome to the Medical Deck.
This audio diary from one of Cohen's disciples, that you find after you have to kill him, ends thusly:
RODRIGUEZ: I'm through with the whole piņata. Let's see that old fruit [Cohen] try an' keep me here...
In Dragon Age II, Sarcastic!Hawke LOVES doing this. And Varric, being the narrator and Genre Savvy, hates it when s/he does.
In Saints Row 3, pedestrians may shout "You can't kill me!" at the protagonist as he/she drives by packing various shotguns, machine guns, electric grenades and a remote control for UAV-delivered smartbombs. In the prequel, drivers could occasionally be heard saying "This car ain't got a scratch".
Not to mention this little quote from Pierce right before STAG declares martial law in Steelport.
Pierce: We just blew up their fucking aircraft carrier!, What more could they possibly send at us?
In Saints Row IV, The Boss will make a comment in a later mission to the effect of: 'Oh, well, that's easy enough,' at which point Fun Shaundi and CID will berate him/her for jinxing them. Long story short? They were right.
Hazama from BlazBlue may be seen as a "Magnificent Bastard" who manipulates the majority of the cast into serving his whims, but in central and alternate canon routes many of the things he does with Makoto equate to asking for his karmic due.
"I'll leave her for Relius. I'm sure he'd like that." - Relius never found her.* In the true ending, Bang gets up in Relius' face. In the bad ending, Makoto found Relius instead.
"Impressive. Surprisingly so! Suddenly, Colonel Clover's interest in you seems much less... 'random and untoward', shall we say?" - You told her you were working with Relius?! This is why he never found her!
"Aww, what's with that face, Makoto? I'm gonna have a bit of fun with you before you mercifully expire, that's all!" - (not a minute later) "Damn vampire! You LIVE to cockblock me, don't you?!"
And Chronophantasma happened. The verdict? Called it (sorta). While Hazama was struck down by a combined effort between Hakumen and Trinity, it is known from a Continuum Shift bad ending that Hazama could have used Tsubaki Yayoi (who Hakumen, a past incarnation of Jin Kisaragi, once loved) to thwart Hakumen, had Makoto (alongside the present Jin and Noel) not gotten to her first (and released her from her brainwashing soon after). As for Relius, Makoto and the now-free Tsubaki ran decoy duty with Relius' pawns (Litchi and Carl), who along with Valkenhayn gave Bang the opportunity to use Rettenjou on his own terms, permanently denying Relius his prize. Playing patsy to Imperator Librarius is the only reason Hazama made Captain of Inteligence, and it clearly shows.
To elaborate on this last point and how badly Terumi tempts fate from it, Tsubaki Yayoi possesses the Sealed Weapon Izayoi, which he used to obscure Takamagahara's observation in Continuum Shift, and also happens to be the love interest of Jin Kisaragi (and, by extension, Hakumen). You think he'd try to keep her proverbially tied around his wrist or at least somewhere where she wouldn't get in trouble, he lets her roam around Ikaruga unsupervised. This is despite clearly knowing that Jin Kisaragi (who wields the power of order that could shatter the magical part of Tsubaki's brainwashing), Noel Vermillion (a close friend of Tsubaki's who wants to bury the hatchet) and the aforementioned Makoto (who possesses knowledge that could sabotage the mental part of Tsubaki's brainwashing which Terumi himself inflicted) would be out trying to save her. You can guess how well that turned out.
In a more comedic sense and unrelated to Hazama, when Ragna and Kokonoe are set to square off, the former asks "Can you even fight?!" as if he finds the idea of Kokonoe fighting ridiculous. You're about to find out, cupcake!
Rachel just has to be asking for it even more than Ragna under the same circumstances. "The little shut-in girl has come to play outside? Should I expect a meteor to fall?" Guess what Kokonoe's Astral Heat does.
Also unrelated, during Chronophantasma Ch2, Tager gives a rather negative review of Kokonoe to Noel and Makoto (at the latter's request due to her believing Tager knows Kokonoe better). In Ch4, Noel panics when Kokonoe wants her to come along, begging to not be "upgraded" (in reality, Kokonoe wants to give Noel a new outfit). Just as Tager breathes a sigh of relief...
Kokonoe: As for you, Tager...We're going to discuss my "frank opinions" later. Tager: I'm doomed.
Bentley gets a case of this for "Operation Choo Choo" in Sly 2: Band Of Thieves. For that, his RC copter had to fight Neyla's aircraft not once, but twice.
Qwark: "The key to surviving situations like this is to refrain from phrases like 'it's too quiet in here' and 'everything's gonna be alright'."
Exaggerated In Hitman Absolution's tutorial level; climbing on a ledge outside a window, the game teaches you how to pull mooks through windows to their death, at which point said mook receives a phone call:
Mook: You're kidding me! Wait, are you sure? ...It's not prostate cancer! [laughs] Oh, I could kiss you! I mean, that's great news! Oh man, you have made my day. Yeah, thanks Doc, yeah. Woah, I thought I was a goner! Yeah... Doc, I gotta run, duty calls. [...] Whoo! Man! No-one can piss on this day!
In Space Colony, Venus says about the team's new assignment - a planet where a resort hotel is to be built:
Piece of cake, no bugs, no toxic chemicals, no experimental robots. We just put up with the nice people in the white suits for a few months, then we all go home.
Of course, if this were the case, there would have been no game - wouldn't it? (Eventually, the base/hotel gets taken over by an alien life form.)
Metal Gear Rising: Revengeance: In Pakistan, one codec conversation with Kevin has Raiden state that he should be fine since none of Desperado's standard cyborgs or UGs are a threat and the Winds of Destruction are dead. Turns out, the enemy does have an ace up their sleeves after all.
The Riddle of Master Lu: In the beginning cinematic, when Mei Chen and Robert Ripley are travelling comfortably in a blimp over the ocean, she tells him that the men who tried to kill him in Egypt are "far behind you now." Cue the view shifting to another table, where those men are spying on the two. In the ending cinematic, when Ripley and Mei Chen are sitting very similarly in a blimp again, she says all the danger is behind them now. Immediately after that, a submarine starts firing upon the from below.
Borderlands 2: one of the missions you pick up is an ECHO recording: "What a nice day. Just walkin' out in the sun, talking into my ECHO recorder, hoping skags don't ambush me and break my gun into four separate pieces before eating them..."
Blatantly done in Ratchet & Clank: All-4-One. A Tharpod who helps you fight a boss rides off, saying that he's off to "live the rest of my life free of irony or tragedy!" Naturally, the game is pretty much telling you that the battle isn't over yet.
Something Else: The message box in the secret area inside Dino Horse Cloud claims that there is no food in the secret area and that Luigi can't carry out the Yellow Yoshi baby through the door. Luigi proves the message box wrong by having the Yoshi baby eat the message box. Also, the Yoshi baby eats the other message boxes within the area.