# Room 39: Island Beach

This is the beach of an exotic island where a magnificent ivory palace rises in the center, surrounded by a beautiful garden. The room features animated ocean waves and serves as the main entrance to the island. Players can look at the beach, ocean, and palace from here. The room provides access to the island interior (rooms 33/36), the beach to the west (room 31), the beach to the east (room 32), and a dock area to the east (room 40).

## Look Description

"You see a sparkling, sand beach of an exotic island. Before you, in the center of the island, a wonderful ivory palace rises. A lovely garden surrounds the palace."

## Interactions

| Status | Behavior Type | Command | Response |
|--------|--------------|---------|----------|
| TODO | Look | `look room` / `look` / `look island` | "You see a sparkling, sand beach of an exotic island. Before you, in the center of the island, a wonderful ivory palace rises. A lovely garden surrounds the palace." (Print 39 0) |
| TODO | Look | `look beach` | From Region 505: "The ocean water laps gently upon the sandy beach of the island." (Print 505 1) or "Something catches your eye! Why, it's a beautiful peacock feather!" (Print 505 0) if feather present |
| TODO | Look | `look ocean` / `look water` | From Region 503: "The wide, blue ocean disappears into the horizon to the west." (Print 503 2) |
| TODO | Look | `look under/ocean` / `look under/water` | From Region 503: "You look under the water, and see nothing but...more water!" (Print 503 0) |
| TODO | Look | `look sky` / `look up` | From Region 503: "The bright, blue sky seems to merge as one with the vast ocean before you." (Print 503 5) or "It's easy to see by the light of a full moon." (Print 503 6) at night |
| TODO | Look | `look dirt` / `look down` | From Region 503: "You see nothing but sandy soil." (Print 503 7) |
| TODO | Look | `look palace` / `look castle` | From Region 505: "An enchanting ivory palace, encircled by a luxuriant garden, rises from the center of this secluded island." (Print 505 18) |
| TODO | Look | `look garden` | From Region 505: "A splendid garden surrounds the magnificent ivory palace." (Print 505 17) |
| TODO | Look | `look grass` | From Region 505: "Lush green grass carpets this magical island." (Print 505 14) |
| TODO | Look | `look blossom` / `look flower` | From Region 505: "Beautiful flowers seem to flourish here." (Print 505 16) |
| TODO | Look | `look bush` / `look hedge` | From Region 505: "A low hedge borders the lovely garden." (Print 505 15) |
| TODO | Look | `look tree` / `look forest` | From Region 505: "There are many beautiful trees in this garden setting." (Print 505 13) |
| TODO | Look | `look boulder` | From Region 505: "You don't see many rocks." (Print 505 12) |
| TODO | Look | `look peacock` | From Region 505: "A majestic peacock, with a beautiful tail, struts by." (Print 505 19) if peacock present |
| TODO | Look | `look feather` | From Region 505: "You see a beautiful peacock feather lying upon the beach." (Print 505 2) if feather present, or "You don't see one here." (Print 505 3) |
| TODO | Look | `look gull` / `look bird` | From Region 504: "You see many seagulls gliding through the air in their never-ending quest for food." (Print 504 0) |
| TODO | Look | `look fish` | From Region 503: "You don't see any fish right now." (Print 503 3) or fish item description if player has fish |
| TODO | Get | `get feather` | From Region 505: Player can pick up peacock feather if near it (Print 505 0) |
| TODO | Get | `get blossom` / `get flower` | From Region 505: "It would waste your precious time to stop and pick flowers." (Print 505 24) |
| TODO | Get | `get water` | From Region 503: "You have no reason to carry water." (Print 503 14) |
| TODO | Get | `get gull` / `get bird` | From Region 504: "You can't catch a seagull." (Print 504 2) |
| TODO | Action | `converse/peacock` | From Region 505: "Peacocks don't talk!" (Print 505 22) |
| TODO | Action | `talk/gull` / `talk/bird` | From Region 504: "Seagulls don't talk." (Print 504 1) |
| TODO | Action | `kiss/gull` / `kiss/bird` | From Region 504: "You can't kiss a seagull." (Print 504 3) |
| TODO | Action | `feed/gull` / `feed/bird` | From Region 504: "The seagulls are not interested." (Print 504 4) |
| TODO | Action | `climb/tree` | From Region 505: "It is difficult to climb trees while wearing that dress!" (Print 505 21) |
| TODO | Action | `capture/peacock` | From Region 505: "You don't need the peacock." (Print 505 25) |
| TODO | Action | `capture/gull` / `capture/bird` | From Region 504: "You can't catch a seagull." (Print 504 2) |
| TODO | Action | `drink` | From Region 503: Player can drink water if in water (swimming) - "YUCK!! This water's too salty!" (Print 503 15) or drinking animation |
| TODO | Action | `bathe` / `dive` / `wade` | From Region 503: Player enters swimming mode if in water |
| TODO | Action | `fish` | From Region 503: Requires fishing pole (item 17) to fish |

## Scripts

| Status | Behavior Type | Name | Trigger | Behavior |
|--------|--------------|------|---------|----------|
| TODO | Background | waveActions | Continuous | Animates three wave props (wave1, wave2, wave3) cycling through their cels to create wave motion effect |
| TODO | Interaction | getFeather | Player uses `get feather` command near peacock feather | Player performs picking up animation, feather is added to inventory, score increases by 2, feather view is removed from beach |
| TODO | Background | peacockActions | Continuous when peacock is present | Controls peacock wandering behavior - displays view, cycles through animations, uses wandering motion |

## Technical Notes

- **Room Number**: 39
- **Picture**: 39
- **Region**: Island/Garden (505), Beach (503), Water (501), Gull (504)
- **Exits**: North→33 (if x ≤ 292) or 36 (if x > 292), South→32, East→40, West→31
- **Music**: None specified
- **Horizon**: 94

### State Variables

| Variable | Values | Description |
|----------|--------|-------------|
| `global101` | `0` | Room-specific state (initialized to 0) |
| `global105` | `0-4` | Player terrain state: 0=land, 1=shallow, 2=medium, 3=deep, 4=swimming |
| `global182` | `0`, `1` | Feather collected flag - set to 1 after player collects peacock feather |
| `global100` | `0`, `1` | Night time flag - affects sky description and gull visibility |
| `global120` | various | Timer/dialog reference for drinking animation |

### Additional Technical Details

- Room applies regions: 505 (gfReg), 501 (WaterReg), 503 (BeachReg), 504 (Gull Region)
- Three wave props (wave1, wave2, wave3) with view 663 create animated ocean waves
- Peacock may spawn in this room (40% chance) with view 336/337
- Peacock feather may be present on beach if player hasn't collected it (moves to room when owned by 888)
- Player entry position varies based on previous room and player view (swimming vs land)
- Water region (501) automatically changes player view based on terrain: view 2=land, 5=shallow, 6=medium, 7=deep, 8=swimming
- Region synonyms: `ocean` = `seawater`
