# PR-3 — Protected Tourist Encounters ## Scope PR-3 adds the floor-six protected tourist encounter while keeping the tourist outside normal combat/death rewards. - Population attempts one deterministic tourist spawn only from floor 6 onward, in a reachable unoccupied safe/narrative room, with a hard maximum of one tourist per floor. - Tourist state is private actor metadata (`hidden_health`, ejection, moderation guard) and is preserved by floor serialization. - Dialogue routes selfie and endanger effects to `TouristService`; the Game journals, presents, refreshes HUD/audience, and awards the existing `tourist_met` achievement trigger. - A selfie grants audience spectacle but leaves the tourist unharmed. Hidden-health exhaustion ejects the tourist rather than using the combat death pipeline. - Ejection emits no actor death, XP grant, or loot drop; it never records a faction kill and applies one moderation strike only. ## Explicit required checks - **25-seed gate:** `test_no_tourists_before_floor_six_across_twenty_five_seeds` generates 25 deterministic floor-five seeds and finds **0 tourists in all 25**. - **60-seed gate:** `test_tourist_can_spawn_on_floor_six_across_sixty_seed_sample` generates 60 deterministic floor-six seeds and confirms that the eligible gate can spawn a tourist. The companion cap test verifies at most one tourist per eligible floor across 30 seeds. - **Selfie / audience / no harm:** the unit test confirms selfie increases audience spectacle, retains hidden health at **30**, and leaves the tourist unejected. The real Game E2E repeats the health/ejection checks through dialogue. - **Protected ejection:** the unit test drains hidden health in two 15-point endanger actions and verifies **0 XP**, **0 loot-drop events**, **0 tourist faction kills**, no `actor_died`, and **exactly 1** `moderation_strike`. The E2E additionally verifies actual player XP remains unchanged, tourist removal/ejection, one moderation strike, and the 60-turn deadline penalty. ## Verification and capture Final command: `./scripts/verify.sh` (Godot 4.5.0), completed successfully. | Suite | Passing | Tests | Assertions | | --- | ---: | ---: | ---: | | Unit | 197 | 197 | 2,450 | | Integration | 17 | 17 | 235,740 | | E2E | 61 | 61 | 615 | Visual capture passed: - `artifacts/visual-check.png`: `dungeon_non_black_pixels=489308`, `visible_pixels=17524`, `explored_pixels=10438`, `explored_luminance=0.012`, `unknown_pixels=365325`, `unknown_luminance=0.001`. - `artifacts/visual-check-exit.png`: `dungeon_non_black_pixels=488708`, `visible_pixels=29407`, `explored_pixels=17146`, `explored_luminance=0.012`, `unknown_pixels=277574`, `unknown_luminance=0.001`. No test, parse, script, or visual-check failures were found. Standard pre-existing GUT invalid-UID and Godot cleanup/resource warnings were emitted, but the verifier accepted them and exited 0. ## Fix round 1 — Task 3 review The dynamic HUD layout contract now derives the expected location id from the authored `floor_state.rooms` bounds before checking the live header text. This avoids calling `room_at()` on surface corridor cells whose map room id is intentionally absent, without changing SurfaceGenerator, HUD, or domain behavior. ## Git This report and only the PR-3 tourist implementation/tests are committed locally in one commit. No push or pull request was created.