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.

# Several Ash graves

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

Several Ash graves is a quirk of Spelunky Classic in which a graveyard level can have more than one Ash grave, each with a free Shotgun buried under it.

| Quirk     |                                                                                                                                                                                                                                            |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Status    | GML + Oracle                                                                                                                                                                                                                               |
| Where     | `scripts/scrEntityGen.gml:175-195`                                                                                                                                                                                                         |
| Pinned by | `fidelity/replays/item-seed-420-ash-graves.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): “A graveyard level can have several Ash graves, each with a free Shotgun.” |

A graveyard level in the [Jungle](https://spelunky.ai/wiki/jungle) puts graves on its blocks, and a few of them are
Ash graves, with their own sprite and a free [Shotgun](https://spelunky.ai/wiki/shotgun) in the block underneath. The code keeps a flag
to make one at most, but sets a different variable from the one it checks, so a level can have two or more.

## What happens

A graveyard level opens with two Ash graves in view, each with a free Shotgun buried in the block under it[^1].

**Clip: Two Ash graves on one level.** A graveyard level opens with two Ash graves in view, each with a free Shotgun buried in the block under it. The game means to make at most one, but the flag it sets is never the one it checks. ([video](https://spelunky.ai/wiki/media/39b784c6a7dfc9d3/clips/quirks/ash-graves/clip.mp4))

## Why

The level's entity script clears `global.ashGrave`, then goes over the Jungle's blocks. Each block with nothing
above it, away from the entrance, the exit and six columns, gets a grave 1 time in 20, and a grave is an Ash grave, with a Shotgun at no cost in the
block under it, 1 time in 40 if `global.ashGrave` isn't set[^2]:

```gml scripts/scrEntityGen.gml:187-195
            obj = instance_create(x, y-16, oGrave);
            if (not global.ashGrave and rand(1,40) == 1)
            {
                obj.sprite_index = sGraveAsh;
                obj = instance_create(x+8, y+8, oShotgun);
                obj.cost = 0;
                obj.forSale = false;
                ashGrave = true;
            }
```

`scripts/scrEntityGen.gml:187-195`, 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 last line sets `ashGrave` without `global.`. The code runs inside a `with` over the blocks, so it makes a
variable on the block, and `global.ashGrave` stays false: every grave rolls its 1 in 40 afresh[^3].

## Reproducing it

It depends on the level's seed, and it's rare: of 800 Jungle seeds, 73 start on a graveyard level, 20 of those
have an Ash grave, and 3 have two[^3]. The replays pin two of them: seed 420's graveyard level,
with an Ash grave and a Shotgun at two places and the flag set on the two blocks while the global stays
false[^4], and seed 244's, whose two Ash graves are
in view from the entrance, as in the clip[^5].

## 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[^3], and the oracle's fingerprints of the replays pin the graves' places. No option turns it off.

## FAQ

### What is the Ash grave in Spelunky Classic?

A grave with its own sprite that a Jungle graveyard level can make, with a free [Shotgun](https://spelunky.ai/wiki/shotgun) in the block under it.

### Can a level have two Ash graves in Spelunky Classic?

Yes. The flag that should stop a second one is set on the wrong thing, so every grave on a graveyard level has the same 1 in 40 chance to be an Ash grave, each with a Shotgun.

### How do you get the Shotgun out of the Ash grave?

Break the block under the grave, with a [Bomb](https://spelunky.ai/wiki/bomb) or a [Mattock](https://spelunky.ai/wiki/mattock): the Shotgun is inside it, free.

## See also

- **Related:** [Shotgun](https://spelunky.ai/wiki/shotgun), [The Jungle](https://spelunky.ai/wiki/jungle), Graveyard level

## References

[^1]: Clip quirks/ash-graves

[^2]: `scripts/scrEntityGen.gml:175-195`

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

[^4]: Replay `fidelity/replays/item-seed-420-ash-graves.txt`

[^5]: Replay `fidelity/replays/item-seed-244-ash-graves.txt`

### Source code

- `scripts/scrEntityGen.gml`
