← All posts
June 6, 2026

The Day the Shopkeeper Assassinated the Goblin King

Every game has bugs. The good ones tell a story. This is the story of how a humble merchant in Crypt quietly murdered a boss before the player could draw a sword, and how chasing down the "how" turned out to be more fun than the bug itself.

The crime scene

Crypt is the ASCII roguelike on Cogg: five floors deep, a different boss waiting on the last floor of every dungeon level, climb out alive or become a corpse for the next player to loot. After a hundred-plus runs, the final floor always meant one thing: a fight. The goblin chieftain on the first dungeon level isn't much of a wall, but he's a wall. You kill him, you loot the crypt, you ascend a hero.

Except this one time, the log read like a crime with no suspect:

You descend. Floor 5. The goblin chieftain is dead. You loot the crypt and ascend a hero.

That's it. No swing. No spell. No "the goblin chieftain hits you." The boss was simply dead the instant the floor loaded, and the run was won. A hundred games in, never once seen it. So we did what you do: we opened the body.

Ruling out the obvious

First question: did something kill him? In Crypt, everything that deals damage leaves a fingerprint in the log. Your weapon, your spells, a summoned skeleton, even a friendly Frankenstein's damaging aura, all of it prints a line. The log had none. So the chieftain wasn't killed. He was removed.

Second question: did he ever spawn? We ran the floor generator 3,000 times. The boss showed up every single time, full health, right where he belongs. So he spawned, he was alive, and then between the floor loading and the game checking whether you'd won, he vanished without a trace.

Things that vanish without a trace are usually deleted by something that wasn't paying attention.

The merchant did it

Here's the setup. On the final floor of a dungeon, two things are quietly true. The boss lives in the last room. And there are no stairs down, because the only way off that floor is to kill him.

Separately, Crypt sometimes drops a shop onto a floor. When it does, the shop generator picks a room for the merchant and clears every monster out of it first, because a shopkeeper shouldn't have to share the register with a pack of ghouls.

That clear had two safeguards meant to keep it away from the boss. The first said "don't pick the boss's room," but it only ever checked for a dragon, which is the boss on just one of the five dungeon levels. The second said "don't pick the stairs room," but the final floor has no stairs, so that guard was pointing at nothing.

So for the goblin chieftain, the troll, the wraith-king, and the lich, neither guard applied. If the shop happened to roll onto the final floor and the merchant happened to set up in the boss's room, the monster-clear swept the king out with the rats. Then the game's victory check, which only asks "is there a living boss left on this floor?", found none and declared you the winner.

The merchant moved into the throne room, and the king was filed under "clutter."

Why it took a hundred games

It needed two coin flips to land at once: the final floor had to roll a shop, and the shop's room-picker had to land specifically in the boss's room. The boss's room is an eligible pick more often than you'd think (a little under 60 percent of the time), but it still has to be the room the merchant actually chooses, on a floor that actually got a shop. Rare enough to hide for a hundred runs. Not rare enough to hide forever.

The fix

One line, really: teach the "don't pick the boss's room" guard to recognize any boss, not just the dragon. Now no merchant can ever set up shop on top of a boss, and if excluding the boss's room leaves nowhere good for a shop on a cramped floor, the floor simply goes without one. Better no shop than a free win. We re-ran the generator 15,000 times across every dungeon level with a shop forced onto the boss floor: zero bosses harmed.

Why we love these

A bug like this isn't a crash or a corrupted save. It's the game's own systems colliding in a way nobody designed but everybody can immediately picture: a shopkeeper, a tape measure, and a dragon-sized vacancy. That's the charm of building systems instead of scripting outcomes. Sometimes they conspire, and for one player on one run, commerce defeated the crown.

The chieftain has his room back. The merchant has been asked, politely, to find his own.


Crypt is free to play in your browser at cogg.com. No download needed, just a free account.