# Room 57: Witch Cave (filename: `57-witch-cave.md`) This room is a dismal cave inhabited by three one-eyed old witches. The room features a central cauldron bubbling over a fire, various jars and bottles on shelves, and a human skull. The witches are a significant puzzle in the game - they possess a glass eye (item 6) that enables them to see, and players can interact with them in multiple ways including stealing or returning the eye, collecting a scarab beetle (item 7), and avoiding being transformed. ## Look Description "This is a dismal and dreary cave. In the center of the cave, over a hot fire, boils a foul-smelling brew inside a large black cauldron." When `global109 >= 3`: "Within it, reside three one-eyed old witches." If scarab is on floor: "You see a black scarab on the cave floor." ## Interactions | Status | Behavior Type | Command | Response | |--------|--------------|---------|----------| | TODO | Look | `/bottle` | "You don't want them." (Print 57 16) | | TODO | Look | `/caldron` | "A greenish, foul brew boils ominously within the cauldron." (Print 57 18) | | TODO | Look | `/brew` | "The green brew looks disgusting...and smells that way, too!" (Print 57 19) | | TODO | Look | `/fire` | "A hot fire burns under a large cauldron filled with bubbling brew." (Print 57 20) | | TODO | Look | `= 3` and has eye but not scarab) | Throws scarab to player, then pleads for eye return | | TODO | Interaction | pickUp | Player uses `get charm` with scarab present | Animates picking up scarab (+2 score, sets global207) | | TODO | Interaction | answer1 | Player talks to witches with eye owned by room | Prints dialogue sequence about witches (Print 57 34-36) | | TODO | Interaction | answer2 | Player talks to witches with eye in inventory | Random dialogue about witches begging for eye (Print 57 37-40) | | TODO | Interaction | answer3 | Player talks to witches without eye | Dialogue enticing player closer (Print 57 41-43) | | TODO | Background | witchEye | Continuous when witches active | Animates witch eyes looking around, switches between witches | | TODO | Background | witchChase | Player gets close to witches without eye (distance < 30) | Witches chase and transform player into newt/creature | | TODO | Background | witchMoan | Triggered when eye delivered or after transformation | Witches react to receiving eye, eventually release player | | TODO | Background | scarabToss | Scarab present in room | Animates scarab moving/jumping | | TODO | Background | ouchness | Player touches control area $0004 (hot zone) | Prints "Ouch!" (Print 57 0) | ## Technical Notes - **Room Number**: 57 - **Picture**: 57 - **Style**: $0010 (DISPATCH style) - **Exits**: South → Room 6 - **Music**: Sound 12 (witchMusic) - plays during witch encounter ### State Variables | Variable | Values | Description | |----------|--------|-------------| | `global109` | 0-3+ | Game progress - witches appear when >= 3 | | `global182` | 0, 1 | Glass eye collected flag (score awarded) | | `global207` | 0, 1 | Scarab present in room (collected or not) | | `global189` | 0, 1 | Room initialization flag | | `global101` | 1 | Set to 1 in init | | `global228` | string | Format buffer for room description | | `local10` | 0, 1 | Eye delivered state (0 = not delivered, 1 = delivered) | | `local12` | 0, 1 | Transformation/cutscene active flag | | `local13` | 0, 1 | Ouch sound cooldown flag | | `newAct` | instance | Scarab actor instance | | `newAct_2` | instance | Witch actor instance | | `newProp_4` | instance | Witch eye prop (visible when witch looking) | | `newProp_5` | instance | Left witch prop | | `newProp_6` | instance | Right witch prop | | `newProp_7` | instance | Left witch full prop | | `newProp_8` | instance | Right witch full prop | ### Inventory Items Referenced | Item Index | Item Name | |------------|-----------| | 6 | Glass Eye (charm) | | 7 | Black Scarab | ### Synonyms - `dirt` = `dirt` - `hag` = `fishwife` ### Key Mechanics 1. **Witch Transformation**: When approaching the witches without the glass eye, they chase and transform the player into a creature (view 184 or 186 depending on position). This is triggered when `distanceTo(newAct_2) < 30` and player doesn't have item 6. 2. **Glass Eye Puzzle**: The eye can be stolen from the witches (requires standing in specific rect), returned to them, or flung. Returning the eye unlocks the scarab throw and allows further interaction. 3. **Scarab Collection**: After returning the eye, witches throw a scarab to the player. The scarab can then be picked up for +2 score. 4. **Hot Zone**: The area over the fire (control area $0004) causes "Ouch!" message when touched.