# Room 46: Tower Stairway

This is the tower stairway of Genesta's ivory palace. The room features a winding staircase connecting the upper tower to the entry hall below. Two small fairies flutter about as Genesta's constant companions. The player can look out windows to see the ocean, examine the tapestry-covered walls, or interact with the fairies. Walking on the stairs triggers an automatic movement script.

## Look Description

"You are on a tower stairway of the island's ivory palace."

## Interactions

| Status | Behavior Type | Command | Response |
|--------|--------------|---------|----------|
| TODO | Look | `look up` | "Where do the stairs lead?" |
| TODO | Look | `look down` | "The stairs lead down to the entry hall." |
| TODO | Look | `look stair` / `look stairs` / `look stair tower` | "From here, the tower stairs both go upward, and downward." |
| TODO | Look | `look out` / `look out window` (if near window) | "You see the ocean out the window." |
| TODO | Look | `look out window` (if not near window) | "You're not close enough to the window." |
| TODO | Look | `look wall` | "There is nothing of importance on the walls." |
| TODO | Look | `look down dirt` / `look down floor` | "There is nothing interesting on the floor." |
| TODO | Look | `look painting` / `look tapestries` | "A beautifully embroidered tapestry hangs on the gleaming wall." |
| TODO | Look | `look flora` / `look blossom` / `look flower` | "Genesta must love beautiful plants and flowers." |
| TODO | Look | `look fairy` / `look fairies` / `look little fairy` | "Genesta's constant companions are small fairies with fluttering wings and brightly-colored gowns. They utter not a word." |
| TODO | Look | `look around` / `look room` / `look tower` | "You are on a tower stairway of the island's ivory palace." |
| TODO | Talk | `talk fairy` / `talk fairies` / `talk little fairy` | "You speak to the little fairies, but they do not respond. Perhaps, they cannot talk." |
| TODO | Talk | `talk` | "You speak to the little fairies, but they do not respond. Perhaps, they cannot talk." |
| TODO | Action | `kill fairy` / `kill fairies` / `kill little fairy` | "You are NOT a murderous girl, Rosella!" |
| TODO | Get | `get fairy` / `get fairies` / `get little fairy` | "It's impossible to obtain a fairy." |
| TODO | Action | `capture fairy` / `capture fairies` / `capture little fairy` | "It's impossible to obtain a fairy." |
| TODO | Action | `kiss fairy` / `kiss fairies` / `kiss` | "The little fairies do not need kissing." |
| TODO | Action | `help fairy` / `help fairies` / `help little fairy` | "The little fairies don't need your help; Genesta does." |

## Scripts

| Status | Behavior Type | Name | Trigger | Behavior |
|--------|--------------|------|---------|----------|
| TODO | Interaction | moveOnTheStairs | Walking on stair control areas (hex $0800 or $0400) when not already on stairs (`global105 != 18`) | Sets `global105 = 18` to mark player on stairs, ignores stair collision blocks, initiates automatic movement along stairs either up or down depending on player position, continues until reaching destination floor |
| TODO | Background | newAct (Fairy 1) | Continuous | First fairy actor (view 111) wanders randomly within the room, playing wandering animation |
| TODO | Background | newAct_2 (Fairy 2) | Continuous | Second fairy actor (view 113) wanders randomly within the room, playing wandering animation |

## Technical Notes

- **Room Number**: 46
- **Picture**: 46
- **Region**: None specified
- **Exits**: North→47 (up the tower), South→45 (down to entry hall)
- **Music**: Sound 33 (looping)

### State Variables

| Variable | Values | Description |
|----------|--------|-------------|
| `global105` | `0`, `18` | Tracks whether player is on the stairs (18 = on stairs, 0 = not on stairs) |
| `global204` | `0`, `1` | Set to 0 when starting stair movement, used for movement state |
| `global205` | `0`, `1` | Set to 1 when player is moving on stairs |

### Additional Technical Details

- Synonyms defined: `room` = `castle`, `room` = `tower`
- Two fairy actors are placed in the room: newAct (position 231, 65) and newAct_2 (position 132, 144)
- Fairies use views 111 and 113 with Wander motion and Fwd cycle
- Stair movement uses control area hex $0800 (upstairs area) and $0400 (downstairs area)
- Four stairBlock collision blocks prevent player from walking through certain stair areas
- Entry from room 45 positions player at the top of stairs (y=23)
- Entry from room 47 or starting position positions player at bottom of stairs (y=164)
- The `moveOnTheStairs` script has two paths: state 1/2 for going down, state 10/11 for going up
- proc0_9 is called when exiting the stairs to reset player state
- proc0_8 is called to set player on stairs state
- Window look command checks if player is in rect (33, 81, 67, 112) to determine if close enough
