Files
kq4-decompile/rooms/kq4-076-dark-chasm.md
2026-02-20 10:16:03 -08:00

66 lines
3.1 KiB
Markdown

# Room 76: Dark Chasm
This room is a dangerous dark cave with a deep chasm that the player must cross. The room requires the player to find and place a wooden board to safely traverse the crevice. Without the board, stepping on the chasm area causes the player to fall to their death. The room is part of the troll cave region, which adds additional danger from the troll that roams nearby caves.
## Look Description
"This is the darkest cave you've ever seen!"
"You see an opening in the distance."
## Interactions
| Status | Behavior Type | Command | Response |
|--------|--------------|---------|----------|
| TODO | Look | `look[<around][/room]` | "This is the darkest cave you've ever seen!" (Print 76 0) "You see an opening in the distance." (Print 76 1) |
| TODO | Look | `look/abyss` | "It's too dark to see it." (Print 76 2) when near chasm, "Where is it?!" (Print 76 3) when not near |
| TODO | Look | `look/exit,hole` | "It seems far away." (Print 76 4) |
| TODO | Action | `[place,lay][<down]/board` | "You don't have the board." (Print 76 5) if no board in inventory; message 67/10/25/5 shows coordinates if can't place; otherwise sets layBoard script |
## Scripts
| Status | Behavior Type | Name | Trigger | Behavior |
|--------|--------------|------|---------|----------|
| TODO | Background | fallChasm | Player steps on control area $0004 without board placed | Plays falling animation (view 936), plays fall sound (52), shows "Oh, my goodness!!" message, then "A CHASM!!!" message, shakes screen, and sets global127 to 1 (player dies) |
| TODO | Interaction | layBoard | Player uses place/lay board command with board in inventory and near chasm | Displays board placed message, moves board to room, allows player to safely cross chasm. Awards 2 points on first placement. Tracks board state with local0 and global132 flags. |
## Technical Notes
- **Room Number**: 76
- **Picture**: 76
- **Region**: 605 (Troll Cave)
- **Exits**: North→73, West→75
- **Music**: Sound 52 (fall sound)
### State Variables
| Variable | Values | Description |
|----------|--------|-------------|
| `local0` | `0`, `1` | Board placement state: 0 = not placed, 1 = board placed |
| `global132` | `0`, `1` | Board crossing completion flag - tracks if player has successfully crossed |
| `global192` | integer | Score tracking divided by 10 - used to prevent re-awarding points for board placement |
| `gEgoY` | integer | Player Y position at time of board placement - used to detect if player moves off board |
| `global101` | `1` | Room initialization flag |
| `global127` | `0`, `1` | Player death flag - set to 1 when player falls into chasm |
### Control Areas
- `$0040` - Exit zone to north (room 73)
- `$0004` - Chasm/fall zone - triggers fallChasm script when player steps here
- `$1000` - Safe zone near chasm where board can be placed
### Entry Points
- From room 73 (north): Player enters at position (189, 118)
- From room 75 (west): Player enters at position (20, 161)
### Inventory Item
- Item 22 - Board (wooden plank used to cross chasm)
### Synonyms
The room inherits synonyms from region 605 (regTroll):
- dirt = dirt
- kiss = kiss, embrace
- troll = troll, man