SpelunkyFan wiki

The City of Gold's message twice

Verified against the spelunky.ai port v0.1.13 on .

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.

A level that's two special levels at once shows two messages, one after the other: a dark graveyard says "I CAN'T SEE A THING!", then "THE DEAD ARE RESTLESS!". The City of Gold can be a 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].

Replays it in the game, where you can take over.Replays it in the game, to pause and scrub.
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!".

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:

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, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).

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 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

#

References

#
  1. Clip quirks/city-message-twice
  2. objects/oPlayer1/alarm_0.gml:52-58
  3. objects/oPlayer1/alarm_4.gml:7-12
  4. Quirk 1 (docs/quirks.md)
  5. scripts/scrLevelGen.gml:71-86
  6. Replay fidelity/replays/city-of-gold-seed-9-sacrifice-pit.txt

Source code

#