WP-058: Phantom’s souvenir shop: the tokens buy Fred a bottle (Gen 1)

Status: ✅ Done (2026-11-16) Phase: 4 (game logic) Depends on: WP-057 ✅ (Phantom’s story values), WP-023 ✅ (the toolbar), WP-021 ✅ (clickables) Companion EC: none (inline checklist under Exit criteria) Estimated effort: Half a day Pre-flight: pre-flight-WP-058-2026-11-16


Result (2026-11-16)

The room played by WP-115 (2026-11-29). The self-test now plays it through the engine’s mouse and tick, the tokens taken from the toolbar. The class matches the original. One gap was in the engine: the cursor stayed drawn through the opening and every blocking scene, where the original fades it out.

The reference is wp060_ref.py: WP-057’s, plus the souvenir shop, written from the trace before the engine ran. It reads the placements, the hotspot’s states and Fred’s fetch from the art and object.ini, and which scenes and lines are on the disc from the sound archives’ indexes. It never runs the engine. At script level 3 the chase check now has 7 shop lines on Phantom (25 in all), and one on Showdown, which has no souvenir shop (216 in all).

The first run differed on two lines, both the check’s own bugs:

The second run matched all 25 lines on Phantom and all 216 on Showdown.

Exit criteria:

  1. Against the reference: ✅ Phantom:
    • The placements. The bottle a requires object at depth 0; the hotspot a clickable at its priority= 150, placed on its B.
    • The openings. From the town, Fred walks in (DL, 50 in front). The first visit has Souvenir_Shop.1201_, holding input, and sets IntroDone; the next has none. While Screaming, 330A1_ and one of Jane’s screams, 1, 2, 3 and 5 over 100 visits.
    • The bottle. With the arrow, 120A_ holds input. With the tokens, they leave the toolbar, the cursor is the arrow, and the shop holds input. Fred fetches it at tick 1 (OBJ_FRED_P03_GET_WATER_BOTTLE, state 13, with Fred_Takes_Bottle); the shelf shows EMPTYB. At tick 67 the bottle is in the toolbar and 120B_ holds input. On the next visit the bottle is a plain sprite.
    • Leaving while bought still puts the bottle in the toolbar.
    • The hotspot: B gives 120X_, C nothing, D (next A) 120X1_.
    • The profile: IntroDone, cleared by the reset.
    • Showdown prints that it has no souvenir shop.
  2. Live, Phantom: ✅ Through test_script, minimized, from a profile with the tokens in the toolbar:
    • The arrow: the bottle clicked with the arrow gave 120A_, Shaggy and Fred.
    • The tokens: taken from the open toolbar onto the bottle, they left their slot. Fred fetched the bottle with Fred_Takes_Bottle; it went in the toolbar’s first slot, and Fred said 120B_.
  3. Build and diff: ✅ Scooby-only build: 0 errors, 0 warnings. The exit and click checks have nothing stuck. The room check is identical to WP-020’s (69 and 53 rooms).
    • Showdown: its other checks are identical to WP-057’s run but for the imported clue name in the profile check. That line differs between this build’s own two runs, so it varies by run (see below).
    • Phantom: its checks differ only as expected:
      • the setup check now shows the shop’s first-visit opening;
      • the profile has the shop’s IntroDone;
      • the drawbridge’s keys are random by design.
    • Fork commit 831ce91cc3 (9 files staged by name) is pushed.

Deviations and gaps:

Found on the way:


Goal

Make Phantom’s souvenir shop, ROOM_P03_Souvenir_Shop, play as the original does. Until now it had the base class:

Background

The souvenir shop (scooby-exe):

Scope

In scope (fork, engines/scooby/ only):

Exit criteria

  1. Both titles match an independent reference line for line:
    • the class;
    • the placements;
    • the openings by IntroDone and Screaming, with Fred’s walk-in;
    • the screams;
    • the bottle with the arrow and with the tokens;
    • Fred’s fetch, with its ticks;
    • the bottle once taken;
    • leaving while bought;
    • the hotspot’s lines;
    • the profile.

    Showdown prints that it has no souvenir shop.

  2. Live, in Phantom: the bottle with the arrow, then the tokens from the toolbar on it; Fred fetches it into the toolbar.
  3. Scooby-only build: 0 errors and 0 warnings. The earlier checks and the room check are unchanged but for the shop’s opening and key. The fork diff stays inside engines/scooby/, staged by name.

Deliverables