Altmiller Cave Cookie Chest
Altmiller Cave, north of Tolbi, where the party finds Babi while all of Tolbi
searches for him during Colosso (babi_palace.c). Its six scenes share this
overlay and the area name Altmiller Cave. In the order the party goes through
them:
- The winding passage in from the cave mouth (
AltmillerCaveEntrance). It grows darker in steps as the party walks in, until only a circle of light around them is bright. At its end a hole leads into a small chamber, where a torch burns beside the doorway down. - The big dark room below (
AltmillerCaveBabi). Near its middle an old man lies on the floor, seen only as a white outline: the invisible Babi (scAltmillerCaveMeetInvisibleBabi). He asks the party to fetch his draught from the bottom of the cave and tells them the order of the five rocks' colors. The chest on the room's east side is a Mimic. - Two dark rooms with a chest each: the Vial (
AltmillerCaveVialChest) and, further down, the Cookie (AltmillerCaveCookieChest). - Between them, a lit hall with a brick floor (
AltmillerCaveSquall): three fallen columns to push, a puddle Frost turns into an ice pillar to stop them, Squall, a Jupiter Djinni, in the north-west corner, and a stone pillar on a ledge to push into the pit before the way on. - The lit rooms at the bottom (
AltmillerCaveDraught): a hall of three more fallen columns, the room of the five rocks (scAltmillerCaveTurnRock), and behind the wall the rocks open, the Mystic Draught's chest on a stone table.
Back in Babi's room with the draught, the party watches him drink it and
appear, and two men from Tolbi come to take him home
(scAltmillerCaveRestoreBabiAndInviteParty). Saving him (FLAG_BABI_SAVED) is
the story flag the rest of Tolbi waits on. Everything else the cave remembers
is kept in scene temp flags and SceneLocalState, so the puzzles start over on
every ordinary arrival.
The rooms share one entrance table and one exit table, and the other getters
choose by MainRoutineStateWork.next. scInit sends an entry from outside the
cave (entrance 0) to the room's first entrance, darkens the dark rooms and
puts back what the party has done.
The darkness is BG1 laid over the rest (ALTMILLER_CAVE_DARKNESS_BLEND), and
the light around the party is a display window, an ellipse around the leader
inside which the layers are drawn differently (scAltmillerCaveInitDarkness).
In the dark rooms BG1 covers everything outside the light, so the room is
black there but for the glow of the torches on its walls, and inside it BG1
only dims the ground.
The passage in darkens by steps instead
(FLAG_ALTMILLER_CAVE_DARKENS_BY_STEPS). Six kinds of metatile along it each
set a darkness level, kept in the cave's state: at the mouth the passage is
fully lit, and five lines further in each make everything outside the light a
little dimmer (scAltmillerCaveApplyFadeBlend). Where one level meets the next
a metatile of each lies side by side, so the level is always that of the last
metatile stepped on, whichever way the party walks.
Reveal lights the passage in while it lasts and shows the rocks' colors
(scAltmillerCaveStartReveal, scAltmillerCaveEndReveal).
The rock puzzle keeps the rounds matched, its state and the light at the top
in the cave's state. Turning the leftmost rock and then the rightmost brings
out a ring of five lights above the rocks. The ring spins
(scAltmillerCaveSpinLights, an event) and stops with one light at the top.
Turning that light's rock spins it on to a different light. A wrong rock puts
the lights away. The third match bursts the wall behind the rocks open
(scAltmillerCaveReleaseWallBurst). Coming up to the rocks from the hall of
fallen columns (ALTMILLER_CAVE_DRAUGHT_ROCKS_PILLAR_CAVE) starts the
puzzle over.










Events
scAltmillerCaveEndReveal
When Reveal wears off, a dark room goes dark again around the light, and the five rocks in the rock room turn back to plain grey.

scAltmillerCaveStartRetreat
Casting Retreat in the dark rooms of the cave first turns Isaac to face the screen, then lets the spell carry the party out.
Retreat plays on a copy of him made after the turn, and the leader himself stops updating.
Its code is in altmiller_cave.c.