# Room 68: The Foyer

The entry foyer of the old haunted house. This is the main entrance room of the cottage, featuring a broken mirror on the wall, a grandfather clock, stairs leading up to the second floor, and several doorways leading to other rooms in the house. The room is dusty and cobwebbed, reflecting the dilapidated state of the haunted cottage.

## Look Description

"This is the entry room of the old house. Downstairs, you see two open doorways, and upstairs, you see an additional two doorways. The room is cobwebbed and dusty, with wallpaper peeling from the walls."

## Interactions

| Status | Behavior Type | Command | Response |
|--------|--------------|---------|----------|
| TODO | Look | `look[<around>][/!*]` / `look[<around>]/room` | "This is the entry room of the old house. Downstairs, you see two open doorways, and upstairs, you see an additional two doorways. The room is cobwebbed and dusty, with wallpaper peeling from the walls." (Print 68 0) |
| TODO | Look | `look/time` / `look[<is/how]<time` / `read/clock,time` | Displays current time using Tamir time format (Print 68 1 with format string) |
| TODO | Look | `look<behind/painting` | "There is nothing behind the portraits." (Print 68 2) |
| TODO | Look | `look/painting` | "You notice two interesting portraits above the downstairs doorways. One, of a middle-aged woman, and the other, of a young man. You wonder who they are." (Print 68 3) |
| TODO | Look | `look/mirror` (if in rect 161-195,154-189) | Sets ego to loop 3, then: "You look in the broken mirror and see the reflection of a poor, but beautiful, peasant girl." (Print 68 4) |
| TODO | Look | `look/mirror` (if not in rect) | "You can't do that here." (Print 800 1) |
| TODO | Look | `look/chandelier` / `look/lam` | "The lamp is old and dusty." (Print 68 5) |
| TODO | Look | `look/stair` | "The stairs lead up to the second story." (Print 68 6) |
| TODO | Look | `look<in/clock` / `open/clock` | "There is nothing of interest inside the grandfather clock." (Print 68 7) |
| TODO | Look | `look/clock` | "An old grandfather clock sits in the corner. With each swing of its pendulum, time relentlessly marches on..." (Print 68 8) |
| TODO | Look | `look/door` | "Doors lead in all directions." (Print 68 9) |
| TODO | Look | `look/wall` | "There is nothing of importance on the walls." (Print 68 10) |
| TODO | Look | `look/dirt` / `look<down` | "There is nothing of interest on the floor." (Print 68 11) |
| TODO | Look | `look/carpet` | "A tattered rug lies on the floor." (Print 68 12) |
| TODO | Look | `look/table` | "A once-beautiful, marble-topped table rests below the broken mirror." (Print 68 13) |
| TODO | Action | `wind/clock` | "You can't. You don't know how." (Print 68 14) |
| TODO | Get | `get/clock` | "It's too heavy to move." (Print 68 15) |
| TODO | Get | `get/carpet` | "You don't need it." (Print 68 16) |
| TODO | Get | `get/painting` | "The portraits are too high, you could never reach them. Besides, they're not important." (Print 68 17) |

## Scripts

| Status | Behavior Type | Name | Trigger | Behavior |
|--------|--------------|------|---------|----------|
| TODO | Background | Room initialization | Entering room | Sets global105=0, global101=1, loads views 533 and 536, applies region 603, creates mirror reflection prop, positions ego based on entry direction |
| TODO | Background | Mirror reflection | When ego enters mirror zone (161,154 to 195,191) | Shows mirror trick actor that mirrors ego's movement with cel/loop synchronized, positioned to create reflection effect |
| TODO | Background | Edge detection | Walking to room edges | Detects control areas: $0040→south (room 17), $0020→east (room 67), $0010→north (room 60), $0008→northwest (room 62), $0004→west (room 64), $0400→stairs trigger |
| TODO | Interaction | Stair climbing | Walking onto stair control area ($0400) | If global105 != 18: sets global105=18 and triggers moveOnTheStairs script to auto-walk ego up/down stairs |

## Technical Notes

- **Room Number**: 68
- **Picture**: 68
- **Region**: 603 (Haunted House)
- **Exits**: South→17 (cottage exterior), East→67 (parlor), North→60 (upstairs hallway), Northwest→62 (attic), West→64 (dining room), Up/Down via stairs
- **Music**: None specified

### State Variables

| Variable | Values | Description |
|----------|--------|-------------|
| `global100` | `0`, `1` | Night mode - if true (1), displays ghost prop in room |
| `global101` | `1` | Room initialized flag |
| `global105` | `0`, `18` | Stair state - 18 indicates on stairs |
| `global133` | Room number | Current room (used with region 603 for ghost tracking) |
| `global134` | Various values | Ghost state for region 603 - if 4 (lord), loads additional views 206/204 |
| `global159` | Hour value | Hour component of Tamir time |
| `global160` | Hour value (0-23) | Hour in 24-hour format |
| `global189` | `0`, `1` | Stair climbing state - set to 1 when climbing stairs |
| `gPrevRoomNum` | `17`, `60`, `62`, `64`, `67` | Previous room - determines ego entry position and animation |

### Objects in Room

- **Portrait view** (view 536, loop 7, cel 0): Portrait on wall at position (77, 109), priority 8
- **Ghost prop** (view 536, loop 4): Displayed at (79, 98), priority 11 when night mode (global100)
- **Reflection prop** (view 533, loop 0): Animated mirror reflection at (223, 131), priority 11
- **Mirror tricks actor** (mirrorTricks script): Invisible actor that mirrors ego when in mirror zone

### Control Areas

- `$0040` - South edge → room 17
- `$0020` - East edge → room 67
- `$0010` - North edge → room 60
- `$0008` - Northwest edge → room 62
- `$0004` - West edge → room 64
- `$0400` - Stair area → triggers stair climbing script
