Dice angering the next shop
Verified against the spelunky.ai port v0.1.11 on .
Dice angering the next shop is a quirk of Spelunky Classic in which a die carried out of a shop's room angers the nearest Shopkeeper, whoever he is.
A Dice House's die mustn't leave the shop: carried out, it angers a Shopkeeper. But the die's check is only whether it's in a shop's room, any shop's, and the Shopkeeper it angers is the nearest one, any shop's. On an ordinary level the two are the Dice House's. In the Black Market, whose shops stand side by side, a die can pass through the next shop unnoticed and anger that shop's Shopkeeper when it leaves.
What happens
#In the Black Market, the Dice House's die is carried left through the Clothing Shop, a shop's room, so no one minds. Carried on out of it, the die angers the nearest Shopkeeper: the Clothing Shop's runs out after the player, while the Dice House's stays where he is [1].
Why
#On every step a die is near the screen on a level, its step checks whether it's in a shop:
// stealing makes shopkeeper angry
if (isLevel())
{
if (not isInShop(x, y))
{
scrShopkeeperAnger(0);
}
}objects/oDice/step.gml:10-17, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).isInShop is true in any room of the level that's a shop's or a Dice House's, not only the die's own
[2]. And the anger falls on the nearest Shopkeeper to the die, whoever's he
is:
shp = instance_nearest(x, y, oShopkeeper);
if (shp)
{
if (not shp.dead and not shp.angered)
{
shp.status = 2;scripts/scrShopkeeperAnger.gml:7-12, from spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).On an ordinary level there's one shop, so the two are the Dice House's room and Shopkeeper, unless the die is nearer the Shopkeeper who waits by the exit for a thief or a murderer. The Black Market's Dice House opens on its left into an item shop, and that one onto the way down [3]. A die carried into the item shop is still in a shop's room, and carried on out of it, it's nearest that shop's Shopkeeper [4].
Reproducing it
#In any Black Market, pick up the Dice House's die and walk left through the shop beside it and out of it: the market's rooms are always laid out the same way [5]. The replay, with seed 9, does it in the market on level 6: the player picks up a die in Tarn's Dice House and carries it left through Wang's Clothing Shop, where nothing happens. Out in the next room, "COME BACK HERE, THIEF!": the Clothing Shop's Shopkeeper runs out after him and knocks him down, and the Dice House's is never angered [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 which Shopkeeper is angered. No option turns it off.
FAQ
#- Can you carry a Dice House's die into another shop?
Yes. The die angers a Shopkeeper only outside a shop's room, and any shop's room counts, so in the Black Market a die carried into the next shop angers no one.
- Which Shopkeeper does a stolen die anger?
The nearest one to the die, whichever shop is his. On an ordinary level that's the Dice House's own, but in the Black Market it can be another shop's, while the Dice House's stays calm.
- Does carrying a die out make you a thief?
Yes. It angers the Shopkeeper as a theft does, with "COME BACK HERE, THIEF!", and raises the thief level the same way.
See also
#References
#- Clip quirks/market-die-angers-next-shop
scripts/isInShop.gml:7-13scripts/scrRoomGenMarket.gml:117-146- Quirk 1 (docs/quirks.md)
scripts/scrLevelGen.gml:44-69- Replay
fidelity/replays/shop-seed-9-market-dice-carried-out.txt