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.

# The City of Gold's message twice

From the spelunky.ai wiki: <https://spelunky.ai/wiki/city-of-gold-message-twice>. Verified against the spelunky.ai port [v0.1.13](https://github.com/851-labs/spelunky/releases/tag/v0.1.13) on 28 October 2026.

The City of Gold's message twice is a quirk of Spelunky Classic in which a City of Gold that's a sacrifice pit shows its own message twice.

| Quirk     |                                                                                                                                                                                                                                  |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status    | GML + Oracle                                                                                                                                                                                                                     |
| Where     | [`objects/oPlayer1/alarm_1.gml:36-42`](https://spelunky.ai/wiki/source/objects/oPlayer1/alarm_1#L36-L42)                                                                                                                         |
| Pinned by | `fidelity/replays/city-of-gold-seed-9-sacrifice-pit.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 City of Gold that's a sacrifice pit shows its message twice.” |

A level that's two special levels at once shows two messages, one after the other: a dark
[graveyard](https://spelunky.ai/wiki/restless-dead) says "I CAN'T SEE A THING!", then "THE DEAD ARE RESTLESS!". The
[City of Gold](https://spelunky.ai/wiki/city-of-gold) can be a [sacrifice pit](https://spelunky.ai/wiki/sacrifice-pit) too, but its second message is its first
again, "IT'S THE LEGENDARY CITY OF GOLD!", and the pit's comes third.

## What happens

The City of Gold loads, and it's a sacrifice pit. "IT'S THE LEGENDARY CITY OF GOLD!" shows, then the same message
again about seven seconds later, and only seven seconds after that, "I CAN HEAR PRAYERS TO KALI!"[^1].

**Clip: The City of Gold's message, twice.** The City of Gold loads as a sacrifice pit. "IT'S THE LEGENDARY CITY OF GOLD!" shows, then, seven seconds later, the same message again, and only seven seconds after that the pit's "I CAN HEAR PRAYERS TO KALI!". ([video](https://spelunky.ai/wiki/media/clips/quirks/city-message-twice/clip.mp4))

## Why

The player's alarm 0 shows a special level's message when it loads. For the City of Gold, it shows the City's,
and if the level is also a sacrifice pit, sets alarm 1 for the pit's message, 209 steps later[^2]. But alarm 1 goes through the same list of levels in the same
order, and finds the City before the pit:

```gml objects/oPlayer1/alarm_1.gml:36-42
else if (global.cityOfGold)
{
    global.message = "IT'S THE LEGENDARY CITY OF GOLD!";
    global.message2 = "";
    global.messageTimer = 200;
    if (global.sacrificePit) alarm[4] = 210;
}
```

[`objects/oPlayer1/alarm_1.gml:36-42`](https://spelunky.ai/wiki/source/objects/oPlayer1/alarm_1#L36-L42), 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)).

So it shows the City's message again, and sets alarm 4, which does check for the pit, and shows its message
another 209 steps later[^3][^4]. On a dark City,
alarm 0 shows the dark level's message instead, and alarm 1 the City's, so it shows once.

## Reproducing it

Reach a City of Gold that's a sacrifice pit and isn't dark. Level generation rolls the pit, 1 in 8, on every
[Temple](https://spelunky.ai/wiki/temple) level, the City's included[^5], so about one City in 8
that isn't dark has it. The replay of the clip reaches one: the City's message shows on frame 7280 and again on
7489, and Kali's on 7698[^6].

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

## FAQ

### Why does Spelunky Classic say "IT'S THE LEGENDARY CITY OF GOLD!" twice?

The City of Gold is also a sacrifice pit. Its second message should be the pit's, "I CAN HEAR PRAYERS TO KALI!", but the code that shows it checks for the City of Gold first and shows the City's message again. The pit's comes only after that, about seven seconds later.

### Can the City of Gold have a sacrifice pit?

Yes. Every Temple level rolls for a pit, 1 in 8, and the City of Gold is a Temple level, so about one City in eight has Kali's altar and its pit.

### Does a dark City of Gold show its message twice?

No. On a dark City, the first message is the dark level's, so the City's shows once, then the pit's.

## See also

- **Related:** [City of Gold](https://spelunky.ai/wiki/city-of-gold), [Sacrifice pit](https://spelunky.ai/wiki/sacrifice-pit)

## References

[^1]: Clip quirks/city-message-twice

[^2]: [`objects/oPlayer1/alarm_0.gml:52-58`](https://spelunky.ai/wiki/source/objects/oPlayer1/alarm_0#L52-L58)

[^3]: [`objects/oPlayer1/alarm_4.gml:7-12`](https://spelunky.ai/wiki/source/objects/oPlayer1/alarm_4#L7-L12)

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

[^5]: [`scripts/scrLevelGen.gml:71-86`](https://spelunky.ai/wiki/source/scripts/scrLevelGen#L71-L86)

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

### Source code

- [`objects/oPlayer1/alarm_0.gml`](https://spelunky.ai/wiki/source/objects/oPlayer1/alarm_0)
- [`objects/oPlayer1/alarm_1.gml`](https://spelunky.ai/wiki/source/objects/oPlayer1/alarm_1)
- [`objects/oPlayer1/alarm_4.gml`](https://spelunky.ai/wiki/source/objects/oPlayer1/alarm_4)
- [`scripts/scrLevelGen.gml`](https://spelunky.ai/wiki/source/scripts/scrLevelGen)
- [`scripts/scrInitLevel.gml`](https://spelunky.ai/wiki/source/scripts/scrInitLevel)
