Spelunky is © 2008, 2009 Derek Yu and Mossmouth, LLC, and is used under the [Spelunky User License v1.1b](https://spelunky.ai/LICENSE.txt). spelunky.ai is an unofficial fan project, not affiliated with or endorsed by Mossmouth. The game and its assets may not be sold.

Music by George Buzinkai and Jonathan Perry; sound effects made in SFXR. From Spelunky Classic 1.1, © 2008, 2009 Derek Yu and Mossmouth, LLC.

# Accidental murder

From the spelunky.ai wiki: <https://spelunky.ai/wiki/accidental-murder>. Verified against the spelunky.ai port [v0.1.10](https://github.com/851-labs/spelunky/releases/tag/v0.1.10) on 28 October 2026.

Accidental murder is a quirk of Spelunky Classic in which any Shopkeeper's death, even one by Spikes, counts as the player's kill and marks him a murderer.

| Quirk     |                                                                                                                                                                                                                                            |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Status    | GML + Oracle (the player's bomb, Spikes); GML (a Spear Trap)                                                                                                                                                                               |
| Where     | `objects/oShopkeeper/step.gml:479-503`                                                                                                                                                                                                     |
| Pinned by | `fidelity/replays/shop-seed-35-spikes-murderer.txt`                                                                                                                                                                                        |
| Row       | [docs/quirks.md §1, Bugs and leftovers in the 1.1 source](https://github.com/851-labs/spelunky/blob/main/docs/quirks.md#1-bugs-and-leftovers-in-the-11-source): “Any Shopkeeper's death marks the player a murderer, whatever killed him.” |

Monsters killed by traps don't count as the player's kills: [Spikes](https://spelunky.ai/wiki/spikes) and the
[Spear Trap](https://spelunky.ai/wiki/spear-trap) mark them so. The [Shopkeeper](https://spelunky.ai/wiki/shopkeeper)'s death never reads that mark. However
he dies, it adds to the player's kills and makes him a murderer, which lasts the rest of the game.

## What happens

A thief who stole a cape waits on a floor past a hole with Spikes in it. The angry Shopkeeper chasing him
jumps onto a block and walks off it into the hole. The Spikes kill him, yet the game counts him as the
player's kill and marks the player a murderer[^1].

**Clip: A Shopkeeper the Spikes kill counts as the player's kill.** A thief who stole a cape waits on a floor past a hole with spikes in it. The angry shopkeeper chasing him jumps onto a block and walks off it into the hole. The spikes kill him, yet the game counts him as the player's kill and marks the player a murderer. ([video](https://spelunky.ai/wiki/media/015c74cb8645abba/clips/quirks/shopkeeper-spikes-murderer/clip.mp4))

## Why

The Shopkeeper runs the code most monsters share first, where landing on Spikes takes all his hit points and
sets `countsAsKill` false, as for any monster[^2]. A monster's own
death reads it before it counts a kill, as the Caveman's does[^3].
The Shopkeeper's doesn't[^4]:

```gml objects/oShopkeeper/step.gml:487-492
        else
        {
            if (isRealLevel()) global.enemyKills[19] += 1;
            global.shopkeepers += 1;
            global.kills += 1;
            global.murderer = true;
```

`objects/oShopkeeper/step.gml:487-492`, from `spelunky.gmk`, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC ([Spelunky User License v1.1b](https://spelunky.ai/LICENSE.txt)).

The player is made a murderer when a Shopkeeper is crushed or found inside a solid too, and those don't ask
what did it either[^5]. Only the Stars bonus room's Shopkeepers are spared, where a
death counts toward the room's score instead. A murderer stays one until a new game: every Shopkeeper patrols
and shouts "YOU'LL PAY FOR YOUR CRIMES!", every ware is free, and each level's exit has a Shopkeeper waiting
by it[^6][^7].

## Reproducing it

Anger a Shopkeeper and lead him over Spikes, or die with a lit bomb beside him. The replays pin both: a thief
luring an angry Shopkeeper into a hole with Spikes in it, where his hit points go and the kill, the
Shopkeeper tally and the murderer mark all come on that step[^8], and a bomb the dead player left killing
the Shopkeeper[^9]. A Tomb Lord the lava kills, by
contrast, isn't counted[^10].

## In the port

The spelunky.ai port reproduces it exactly: it's in docs/quirks.md's list of the 1.1 source's bugs[^7], and the oracle's fingerprints of the replays pin the tallies. The Spear Trap's version is
read in the code and not yet in a replay. No option turns it off.

## FAQ

### Does a Shopkeeper killed by a trap count as the player's kill in Spelunky Classic?

Yes. Every [Shopkeeper](https://spelunky.ai/wiki/shopkeeper)'s death counts as the player's kill and marks him a murderer, whatever killed the Shopkeeper: [Spikes](https://spelunky.ai/wiki/spikes), a [Spear Trap](https://spelunky.ai/wiki/spear-trap), or the player's own bomb after he's dead.

### What happens when you're a murderer in Spelunky Classic?

For the rest of the game, every Shopkeeper patrols and shouts "YOU'LL PAY FOR YOUR CRIMES!", every ware is free, and a Shopkeeper waits by each level's exit.

### Do other monsters killed by Spikes count as kills?

No. A monster the Spikes or a Spear Trap kill isn't counted as the player's kill. Only the Shopkeeper's death skips that check.

## See also

- **Related:** [Shopkeeper](https://spelunky.ai/wiki/shopkeeper), [Spikes](https://spelunky.ai/wiki/spikes), [Spear Trap](https://spelunky.ai/wiki/spear-trap), [Bomb](https://spelunky.ai/wiki/bomb), [General Store](https://spelunky.ai/wiki/general-store)

## References

[^1]: Clip quirks/shopkeeper-spikes-murderer

[^2]: `objects/oEnemy/step.gml:108-124`

[^3]: `objects/oCaveman/step.gml:176`

[^4]: `objects/oShopkeeper/step.gml:479-503`

[^5]: `objects/oShopkeeper/step.gml:24-68`

[^6]: `scripts/scrInitLevel.gml:245-257`

[^7]: Quirk 1 (docs/quirks.md)

[^8]: Replay `fidelity/replays/shop-seed-35-spikes-murderer.txt`

[^9]: Replay `fidelity/replays/shop-seed-11-bomb.txt`

[^10]: Replay `fidelity/replays/temple-seed-113.txt`

### Source code

- `objects/oShopkeeper/step.gml`
- `objects/oEnemy/step.gml`
