# Room 04: Ogre's Cottage

This is the exterior of a large, thatched-roof cottage in the forest. The cottage belongs to the ogre and ogress, dangerous antagonists that may appear and chase the player. The room features a door that leads inside (Room 49), windows, and various interactive objects. Players must be cautious as either the ogress or ogre can appear and capture them if caught.

## Look Description

"You see a large, thatched-roof house surrounded by forest; and it looks very formidable. It might be wise to use caution here."

## Interactions

| Status | Behavior Type | Command | Response |
|--------|--------------|---------|----------|
| TODO | Look | `look cottage` / `look house` | "This is a large, crudely-built, thatched-roof house. It makes you feel uneasy." (Print 4 1) |
| TODO | Look | `look door` | "This is a heavy, wooden door." (Print 4 2) |
| TODO | Look | `look bucket` / `look pail` | "There is nothing in the pail." (Print 4 3) |
| TODO | Look | `look buck` | "Poor thing!" (Print 4 4) - only if ogress is present |
| TODO | Look | `look window` (when near) | "You peek through the window, but can make out no details." (Print 4 5) |
| TODO | Look | `look window` (when far) | "You're not close enough." (Print 800 1) |
| TODO | Look | `look giantess` / `look ogress` (when present) | View 246: "This is a mean-looking lady! The ogress is returning home after having caught a poor deer in the surrounding forest." (Print 4 6) / View 245: "The ogress sees you! Maybe she'd rather have YOU for dinner instead of the deer!" (Print 4 7) |
| TODO | Look | `look giantess` / `look ogress` (not present) | "You can't see one here." (Print 4 8) |
| TODO | Look | `look around` / `look room` | "You see a large, thatched-roof house surrounded by forest; and it looks very formidable. It might be wise to use caution here." (Print 4 9) |
| TODO | Look | `look giant` / `look ogre` | "The ogre looks MEAN!! Better get out of there...FAST!!" (Print 517 0) - only when ogre is present |
| TODO | Talk | `talk giantess` / `talk ogress` / `talk giant` / `talk ogre` | "This is no time for conversation!" (Print 517 1) |
| TODO | Action | `get/capture buck` | Various responses based on presence of ogress or deer |
| TODO | Action | `get/capture giantess` / `get/capture ogress` | "That's ridiculous!" (Print 4 16) |
| TODO | Action | `kill giant` / `kill ogre` | "You have no way of killing a giant ogre!" (Print 517 2) |
| TODO | Action | `get/capture giant` / `get/capture ogre` | "That's ridiculous!" (Print 517 3) |
| TODO | Action | `kiss` | "He wouldn't like it, and neither would you!" (Print 517 4) |
| TODO | Action | `deliver [item]` (when ogre present) | "You don't want to get that close to the ogre!" (Print 517 5) or "You don't have it." (Print 517 6) |
| TODO | Action | `open door` (when near door) | Multiple conditions: if ogre/ogress present "You don't have the time for that now!" (Print 4 17), if key not obtained "You can't. It's locked and you don't have the key." (Print 4 18), if key obtained: opens door |
| TODO | Action | `bang` (on door) | Multiple conditions based on who's present and door state |
| TODO | Action | `unlatch` / `unlock` | "You can't. It's locked and you don't have the key." (Print 4 18) if no key, or "The door is already unlocked." (Print 4 23) if key already used |
| TODO | Action | `break window` | "That's vandalism!" (Print 4 24) |
| TODO | Action | `break door` | "You could never do that." (Print 4 25) |
| TODO | Action | `open window` | "The windows do not open." (Print 4 26) |

## Scripts

| Status | Behavior Type | Name | Trigger | Behavior |
|--------|--------------|------|---------|----------|
| TODO | Interaction | ogressActions | Ogress appears (global109 = 2 and global163 = 0) | Ogress walks from left side to door, opens it, enters cottage, and closes door behind her |
| TODO | Interaction | ogressActions | Player talks to ogress or gets too close | Ogress becomes hostile, displays "deer" prop, chases and catches player (game over) |
| TODO | Interaction | ogressActions | Player uses `bang` on door when ogress not present | Ogress appears and enters cottage |
| TODO | Interaction | ogreActions | Ogre appears (random 35% chance on entry if no other actor present) | Ogre walks in from edge, chases player, catches player (game over) |
| TODO | Interaction | ogreActions | Entering from Room 10 with actor | Ogre is already present and chases player |
| TODO | Interaction | killOgre | Timer expires after ogre leaves | Sets global127 = 1 (player death flag) |
| TODO | Background | PriorityCheck | Continuous | Adjusts player and NPC priority based on position in room |

## Technical Notes

- **Room Number**: 4
- **Picture**: 4
- **Region**: 508 (Woods Region), 517 (Ogre's Region)
- **Exits**: North→28, South→10, East→5, West→3, Door→49 (inside cottage)
- **Music**: Ogre theme (sound #5), Ogress theme (sound #10)

### State Variables

| Variable | Values | Description |
|----------|--------|-------------|
| `global109` | Quest stage value | When equals 2, ogress appears |
| `global163` | `0`, `1` | Ogress has appeared flag |
| `global165` | Value | Ogre attack state (4 = ogre attack triggered) |
| `global179` | `1` | Special flag preventing actor spawn |
| `global189` | `0`, `1` | Room active flag |
| `global127` | `1` | Player death flag |
| `local3` | `0`, `1`, `2`, `3` | Ogress state: 0=not active, 1=watching, 2=hostile, 3=entered cottage |
| `local2` | `0`, `1` | Ogre state flag |
| `newAct` | Actor or `0` | Ogress actor instance |
| `gNewAct` | Actor or `0` | Ogre actor instance |

### Additional Technical Details

- Synonyms defined: `giantess` = `giantess` = `fishwife` (all map to giantess)
- Region synonyms: `giant` = `giant` / `man`, `kiss` = `kiss` = `embrace`
- Door has special states: cel 0 = closed, cel > 0 = open
- Player needs key (item 33) to open door
- Control area $4000 triggers entry to Room 49 when door is open
- Ogress uses view 246 (returning with deer) or 245 (hostile)
- Ogre uses view 250 (walking), 78 (eating), 79 (walking after eating)
- Door controls player movement: when closed, players observe control area 16384
- If global100 is set, overlay picture 104 is displayed
