# Room 90: West Tower Bottom

## High-Level Summary

Room 90 is the bottom of the west tower in the game. It serves as a transitional area connecting to rooms 85 (above/north) and 91 (east). The room features a spiral staircase, stone walls, and a dangerous trapdoor area. Players entering from room 85 (the stairs above) must navigate carefully as there are falling hazards that can either result in injury or death depending on positioning.

## Look Description

"You are at the bottom of the west tower. A spiral of stone steps winds to the top."

## Interactions

| Status | Behavior Type | Command | Response |
|--------|--------------|---------|----------|
| TODO | Look | `/dirt` or `[<down]` | "You see nothing of interest on the cold stone floor of the tower." (Print 90 1) |
| TODO | Look | `/wall` | "You see nothing of interest on the walls." (Print 90 2) |
| TODO | Look | `/sky` or `[<up]` | "You look up, but see nothing special." (Print 90 3) |
| TODO | Look | `/stair` | "The stairs spiral steeply up the stone tower." (Print 90 4) |
| TODO | Look | `/stair` | "The stone steps spiral dangerously upward." (Print 90 5) |
| TODO | Look | `/door` | "There is an open doorway before you." (Print 90 6) |
| TODO | Look | `/door` | "You glance quickly through the open doorway, but do not see anything of interest in the adjoining room." (Print 90 7) |
| TODO | Look | `[<around][/room]` or `/castle,tower` | "You are at the bottom of the west tower. A spiral of stone steps winds to the top." (Print 90 8) |

## Scripts

| Status | Behavior Type | Name | Trigger | Behavior |
|--------|--------------|------|---------|----------|
| TODO | Interaction | `fallingDown` | Player enters from room 85 (local0=1) and steps on control area $0004 (trapdoor) or $0100 | Player falls but survives. Changes ego to view 44 falling animation, plays fall music (sound 51), then returns to view 41 briefly, then restores normal view 4. Player regains control after fall. |
| TODO | Interaction | `fallingToDeath` | Player enters from room 85 (local0=1) and steps on control area $0004 (death trap) | Player falls to death. Sets global105 to 16, plays fall music, changes to view 42 (death), shakes screen, stops all sounds, sets global127 to 1 (death state), and ends game. |

## Technical Notes

- **Room Number**: 90
- **Picture**: 90
- **Region**: 604 (West Tower region)
- **Exits**: Control area $0040 → Room 91 (east), Control area $0020 → Room 85 (north/stairs above)
- **Music**: Sound 51 (falling music)

### State Variables

| Variable | Values | Description |
|----------|--------|-------------|
| `local0` | 0, 1 | Safety flag: 0 = safe (entered from room 91), 1 = danger zone (entered from room 85, triggers falling hazards) |
| `global175` | 0, 1 | Flag indicating if player escaped Lolotte's henchman - triggers warning message on entry if set |
| `global105` | 16 (set during death) | Death sequence control variable |
| `global127` | 0, 1 | Death state flag - set to 1 when player dies in fallingToDeath script |

### Entry Conditions

- **From Room 91 (east)**: Player spawns at position 255, 134, safe mode (local0=0). If global175 is set, prints warning message about escaping henchman.
- **From Room 85 (north)**: Player spawns at position 104, 38, danger mode (local0=1). Player is on elevated stairs with falling hazard.

### Objects

- **View 634, loop 1, cel 1**: Background element at position (209, 77), priority 4
- **Prop 512, loop 0**: Animated prop at position (209, 65), priority 3, cycles forward (possibly torch or candle flame)

### Control Areas

- `$0040`: East exit zone (leads to room 91)
- `$0020`: North exit zone (leads to room 85)
- `$0004`: Death trap zone (triggers fallingToDeath when local0=1)
- `$0100`: Injury zone (triggers fallingDown when local0=1)
- `$0002`: Ladder/stairs detection zone (affects player positioning and baseSetter)
