Several Ash graves
Verified against the spelunky.ai port v0.1.10 on .
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.
A graveyard level in the Jungle puts graves on its blocks, and a few of them are Ash graves, with their own sprite and a free 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].
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]:
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).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 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.
See also
#- Related
- Shotgun
- The Jungle
- Graveyard level
References
#- Clip quirks/ash-graves
scripts/scrEntityGen.gml:175-195- Quirk 1 (docs/quirks.md)
- Replay
fidelity/replays/item-seed-420-ash-graves.txt - Replay
fidelity/replays/item-seed-244-ash-graves.txt
Source code
scripts/scrEntityGen.gml