SpelunkyFan wiki

Throwing the Ankh out

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

Throwing the Ankh out is a quirk of Spelunky Classic in which the Black Market's Ankh, thrown out of its shop, angers no one until the player picks it up.

A ware that leaves its shop by itself, thrown or knocked out, is stolen at once: the Shopkeeper is angered and the ware is free. The Ankh skips that check, so thrown out of its shop it lies outside at its price, harmless, until the player touches it.

What happens

#

In the Black Market, the player throws the Ankh up through the hole in its shop's ceiling. It lies outside with its price, and the Shopkeeper stays calm until the player climbs out and picks it up: then it's his, and the Shopkeeper opens fire [1].

The ankh, thrown out of its shop, angers no one. In the Black Market, the player throws the $50,000 ankh up through the hole in its shop's ceiling. It lies outside with its price, and the shopkeeper stays calm until the player climbs out and picks it up: then it's his, and the shopkeeper opens fire.

Why

#

The shops' stock is made by one script, which marks each ware forSale [2]. The Black Market makes the Ankh shop's Ankh itself, with the price its create event gives it, and never marks it [3]:

else if (tile == "A")
{
    obj = instance_create(xpos+8, ypos+8, oAnkh);
}
scripts/scrRoomGenMarket.gml:361-364, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).

The shared item code steals a ware outside its shop only if it's for sale [4]:

    if (cost > 0 and forSale and not isInShop(x, y))
    {
        global.itemsStolen += 1;
        scrShopkeeperAnger(0);
        cost = 0;
    }
objects/oItem/step.gml:20-25, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).

So the Ankh outside keeps its price, and nobody notices. The player's own step has the other check: a held ware with a price, once he's outside the shop, is put on and angers the Shopkeeper. Picking the Ankh up outside runs it at once [5] [6].

Reproducing it

#

In the Black Market, pick up the Ankh and throw it up through the hole in its shop's ceiling, the shop's only way out, then climb out after it. The replay pins it: the Ankh lies outside at $50,000 with the Shopkeeper calm, and picked up outside it's put on and he shouts "COME BACK HERE, THIEF!" [7]. Carried out instead, it's put on as the player leaves the shop [8].

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 [6], and the oracle's fingerprint of the replay pins the Ankh's price and the Shopkeeper. No option turns it off.

FAQ

#
Can you steal the Ankh in Spelunky Classic?

Yes, but not for free. Thrown out of its shop, the Ankh lies outside at its price and the Shopkeeper stays calm; picking it up there puts it on and angers him, as carrying it out does.

Why doesn't throwing the Ankh out of its shop anger the Shopkeeper?

The Black Market makes the Ankh without marking it for sale, and the check that angers a Shopkeeper when a ware leaves its shop only acts on wares marked for sale.

How much is the Ankh in Spelunky Classic?

$50,000, in the Black Market's Ankh shop.

See also

#
Related

References

#
  1. Clip quirks/ankh-thrown-out-of-shop
  2. scripts/scrShopItemsGen.gml:179-181
  3. scripts/scrRoomGenMarket.gml:361-364
  4. objects/oItem/step.gml:18-34
  5. objects/oPlayer1/step.gml:541-557
  6. Quirk 1 (docs/quirks.md)
  7. Replay fidelity/replays/item-seed-9-ankh-thrown-out.txt
  8. Replay fidelity/replays/item-seed-9-ankh.txt

Source code

  • scripts/scrRoomGenMarket.gml
  • scripts/scrShopItemsGen.gml
  • objects/oItem/step.gml
  • objects/oPlayer1/step.gml
#