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.

# Jungle earth in the City of Gold

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

This page describes a secret.

Jungle earth in the City of Gold is a quirk of Spelunky Classic in which the odd block of the City of Gold is the Jungle's earth rather than gold.

| Quirk     |                                                                                                                                                                                                                                     |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status    | GML + Oracle                                                                                                                                                                                                                        |
| Where     | [`scripts/scrRoomGen4.gml:317-322`](https://spelunky.ai/wiki/source/scripts/scrRoomGen4#L317-L322)                                                                                                                                  |
| Pinned by | `fidelity/replays/city-of-gold-seed-9.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): “One block in a hundred of the City of Gold is the Jungle's earth.” |

The [City of Gold](https://spelunky.ai/wiki/city-of-gold) is a [Temple](https://spelunky.ai/wiki/temple) level made of gold: its temple stone, its stone blocks and
its push blocks all turn gold there. But the Temple's room script also makes the odd block of the
[Jungle](https://spelunky.ai/wiki/jungle)'s earth, and the earth has no check for the City, so the City of Gold has a few blocks of plain
green and brown earth among its gold.

## What happens

The City of Gold loads with the player near its entrance. He walks right along its gold floor and over a block of
the Jungle's mossy earth set in it[^1].

**Clip: Jungle earth in the City of Gold.** The City of Gold loads with the player near its entrance. He walks right along its gold floor and over a block of the Jungle's mossy earth set in it. ([video](https://spelunky.ai/wiki/media/clips/quirks/city-jungle-earth/clip.mp4))

## Why

The Temple's room script, which builds the City too, makes the Jungle's earth (`oLush`) for one of its
always-solid tiles in a hundred, before it rolls a stone block or temple stone:

```gml scripts/scrRoomGen4.gml:317-322
        if (tile == "1" and not collision_point(xpos, ypos, oSolid, 0, 0))
        {
            if (rand(1,100) == 1) instance_create(xpos, ypos, oLush);
            else if (rand(1,10) == 1) instance_create(xpos, ypos, oBlock);
            else instance_create(xpos, ypos, oTemple);
        }
```

[`scripts/scrRoomGen4.gml:317-322`](https://spelunky.ai/wiki/source/scripts/scrRoomGen4#L317-L322), 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)).

Its side room with two trees, which the City rolls among its side rooms, stands on a row of eight more[^2][^3][^4]. Temple stone turns gold in the City
(`if (global.cityOfGold) sprite_index = sGTemple;`)[^5], and so do the
stone and push blocks, but the earth's create event has no such line: it rolls a gold vein, a gem or an item as
the Jungle's earth does[^6]. Broken, it gives rubble, and gold only from a
vein[^7][^8]. It's harmless.

## Reproducing it

Reach the City of Gold and look for green blocks among the gold; most Cities have some. The replay of the City
with seed 9 loads it on frame 6745 with six earth blocks, one at (560, 96), near the entrance[^9]. The clip, cut from the run on to Olmec, walks over
that one[^10]. [Reaching the City of Gold](https://spelunky.ai/wiki/city-of-gold-route) has the way there.

## 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[^8], and the oracle's fingerprint of the replay pins the earth blocks. No option turns it off.

## FAQ

### Why is there a green block in the City of Gold?

It's a block of the [Jungle](https://spelunky.ai/wiki/jungle)'s earth. The [Temple](https://spelunky.ai/wiki/temple)'s levels make one now and then, and the [City of Gold](https://spelunky.ai/wiki/city-of-gold) is built as a Temple level. Its other blocks turn gold in the City, but the earth block has no such check, so it stays green and brown.

### Does the earth block in the City of Gold give gold?

Only if it holds a gold vein, as the Jungle's earth sometimes does. Otherwise it breaks into rubble, where the City's gold blocks give gold chunks and a nugget.

### How common is the earth in the City of Gold?

One in a hundred of the layouts' always-solid tiles, plus a row of eight under the side room with two trees, which the City rolls too. Most Cities have some: the one in the clip has six.

## See also

- **Related:** [City of Gold](https://spelunky.ai/wiki/city-of-gold), [The Jungle](https://spelunky.ai/wiki/jungle), [The Temple](https://spelunky.ai/wiki/temple)

## References

[^1]: Clip quirks/city-jungle-earth

[^2]: [`scripts/scrRoomGen4.gml:70-74`](https://spelunky.ai/wiki/source/scripts/scrRoomGen4#L70-L74)

[^3]: [`scripts/scrRoomGen4.gml:104-107`](https://spelunky.ai/wiki/source/scripts/scrRoomGen4#L104-L107)

[^4]: [`scripts/scrRoomGen4.gml:505-508`](https://spelunky.ai/wiki/source/scripts/scrRoomGen4#L505-L508)

[^5]: [`objects/oTemple/create.gml:7`](https://spelunky.ai/wiki/source/objects/oTemple/create#L7)

[^6]: [`objects/oLush/create.gml:5-15`](https://spelunky.ai/wiki/source/objects/oLush/create#L5-L15)

[^7]: [`objects/oLush/destroy.gml:3-33`](https://spelunky.ai/wiki/source/objects/oLush/destroy#L3-L33)

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

[^9]: Replay `fidelity/replays/city-of-gold-seed-9.txt`

[^10]: Replay `fidelity/replays/city-of-gold-seed-9-to-olmec.txt`

### Source code

- [`scripts/scrRoomGen4.gml`](https://spelunky.ai/wiki/source/scripts/scrRoomGen4)
- [`objects/oLush/create.gml`](https://spelunky.ai/wiki/source/objects/oLush/create)
- [`objects/oLush/destroy.gml`](https://spelunky.ai/wiki/source/objects/oLush/destroy)
- [`objects/oTemple/create.gml`](https://spelunky.ai/wiki/source/objects/oTemple/create)
