# Room 49: Ogre's Cottage

The Ogre's Cottage living room where the player must navigate past a sleeping ogre and an aggressive bulldog. This room contains multiple hazards including the ogre (who can be in various states of alertness), a fierce bulldog that chases or guards a bone, and a chicken that can be stolen for points. The room features multiple exits, interactive furniture, and a closet with a secret passage.

## Look Description

"This isn't the most cozy-looking living room you've ever seen. In fact, the ogres' house looks almost...frightening!"

## Interactions

| Status | Behavior Type | Command | Response |
|--------|--------------|---------|----------|
| TODO | Look | `look <under/table` | "There is nothing of interest under the table." (Print 49 0) |
| TODO | Look | `look /table` | "The terrible ogre is asleep at the table, snoring loudly." (Print 49 1) if ogre present, else "It's a large wooden table." (Print 49 2) |
| TODO | Look | `look /chair` | "There are two chairs at the table." (Print 49 3) |
| TODO | Look | `look /carpet,carpet` | "A worn rug lies on the floor." (Print 49 4) |
| TODO | Look | `look /stair` | "The stairway goes upwards." (Print 49 5) |
| TODO | Look | `look /window` | "You see the forest out the window." (Print 49 6) |
| TODO | Look | `look /door` | "The front door leads outside. There is an open doorway to the right, and a closet door under the stairs." (Print 49 7) |
| TODO | Look | `look /wall` | "There is nothing of importance on the walls." (Print 49 8) |
| TODO | Look | `look /dirt`, `look <down` | "There is nothing interesting on the floor." (Print 49 9) |
| TODO | Look | `look /giant` | Varies by ogre state: asleep (Print 49 1), awake hostile (Print 49 10), not present (Print 49 11) |
| TODO | Look | `look /bulldog` | If chewing bone: "The big dog is totally engrossed in its bone." (Print 49 12), else: "This is definitely not your basic cute pooch. This dog means business." (Print 49 13) |
| TODO | Look | `look [<around][/room,cottage]` | "This isn't the most cozy-looking living room you've ever seen. In fact, the ogres' house looks almost...frightening!" (Print 49 14) |
| TODO | Action | `blow/whistle` | If has whistle (27) and ogre present: varies by state (Print 49 15 or 16), else ignored |
| TODO | Talk | `converse/bulldog` | If chewing bone: "The dog is too interested in its bone to listen to you." (Print 49 17), else: "Soothing words will not placate this dog." (Print 49 18) |
| TODO | Action | `kill/bulldog` | "You couldn't kill that big dog." (Print 49 19) |
| TODO | Action | `pat/bulldog` | "Not this dog!" (Print 49 20) |
| TODO | Action | `calm/bulldog` | "This dog will not be gentled." (Print 49 21) |
| TODO | Get | `get,capture/bulldog` | "You woudln't want this dog, even if you COULD get it." (Print 49 22) |
| TODO | Action | `sit>` | "You don't have time for that!" (Print 49 23) |
| TODO | Talk | `converse,awaken[/giant]` | If ogre present and sleeping (state 3): close enough triggers (Print 49 24), far away (Print 49 25), else awake (Print 49 26), else no ogre (Print 49 27) |
| TODO | Action | `open/closet`, `open/door<closet` | Checks position, if open (Print 49 28), if ogre/ogress present (Print 49 29), if has chicken (Print 49 10), else opens closet |
| TODO | Action | `open/door` | Context-sensitive: front door (lines 428-440), side door under stairs (lines 441-468), else (Print 49 31) |
| TODO | Action | `close/door` | Context-sensitive close for front door or side door |
| TODO | Get | `get/egg[<gold]` | If ogre present and close enough: get golden egg (33), else too far |
| TODO | Get | `get,rob/chicken` | If chicken present and in correct position: steals chicken for +4 points |
| TODO | Action | `kill/giant` | "You have no way of killing a giant ogre!" (Print 49 36) |
| TODO | Action | `kiss/giant`, `kiss/bulldog`, `kiss[/!*]` | "That's REALLY not a good idea!" (Print 49 37) |
| TODO | Action | `fling,deliver,feed/bone` | If has bone (23) and dog is far enough: throws bone to dog, +4 points |
| TODO | Get | `get,rob/bone` | If bone already in room: "That's ridiculous." (Print 49 40), else "What bone?" (Print 49 41) |
| TODO | Get | `get,capture/giant` | "You don't want to get that close to the ogre." (Print 49 42) |
| TODO | Inventory | `deliver> [item]` | If ogre present: "The dog would not be interested in it." (Print 49 43), else: "You don't have that." (Print 49 45) |

## Scripts

| Status | Behavior Type | Name | Trigger | Behavior |
|--------|--------------|------|---------|----------|
| TODO | Interaction | `ogreStuff` | Player in room with ogre (global165 = 1,2,3) and enters certain areas | Handles ogre encounter sequences based on ogre state - can lead to death or escape |
| TODO | Background | `ogreAwake` | Ogre present and player approaches or disturbs | Controls ogre waking animation and chase sequence - leads to death if caught |
| TODO | Interaction | `ogressChase` | Entering from room 0 or 4 when ogress (global167) present | Ogress chases and catches player - leads to death |
| TODO | Interaction | `henPecked` | Chicken (33) owned by room 49 | Chicken wanders around room near the rug |
| TODO | Interaction | `chaseEgo` | Player enters without bone (23) and dog is present | Bulldog chases and catches player - leads to death |
| TODO | Interaction | `chewBone` | Player has bone (23) and bone is in room with dog | Dog settles down to chew bone, allowing safe passage |
| TODO | Interaction | `catchBone` | Player throws bone to dog using `fling` command | Bone animation sequence where dog catches bone |
| TODO | Interaction | `doorOpen` | Player opens closet door | Opens closet door and transitions to room 51 |
| TODO | Interaction | `moveOnTheStairs` | Player touches stairs control area ($0400) | Moves player up or down stairs |

## Technical Notes

- **Room Number**: 49
- **Picture**: 49
- **Style**: $0010
- **Region**: 602 (applied via setRegions)
- **Exits**: North→0/4 (forest), East→48 (cottage exterior), South→50 (kitchen), West→51 (closet), Stairs (varies by position)

### State Variables

| Variable | Values | Description |
|----------|--------|-------------|
| `global165` | 0=none, 1=ogre present, 2=ogre sleeping, 3=ogre awake, 4=ogre chasing, 5=ogress present | Ogre state in room |
| `global167` | 0/1 | Ogress present flag (from room 0/4) |
| `global210` | 0/1 | Side door (closet) open state |
| `global100` | 0/1 | Front door view state (view 616 loop 1) |
| `global105` | 0=normal, 18=on stairs | Current player location state |
| `global182` | 0/1 | Chicken stolen flag |
| `local1` | 0/1 | Entry condition from certain rooms |
| `local9` | 0/1 | Script blocking flag (prevents room changes during events) |
| `local11` | 0/1 | Ogre conversation attempt flag |

### Inventory Items

- Item 23: Bone (can be given to bulldog)
- Item 27: Whistle (can blow to affect ogre)
- Item 33: Golden egg/chicken (can be stolen from room)

### Key Mechanics

- The bulldog will chase and kill the player unless given the bone
- The ogre can be in multiple states: absent, sleeping, or awake/chasing
- Opening the side door (under stairs) leads to room 51 (closet)
- Stairs allow passage between floors (controlled by global105)
- Player can steal the chicken for +4 points if positioned correctly
- The ogre responds to the whistle based on its current state
