Skip to content

task 6 brief

Xopher edited this page Oct 22, 2026 · 1 revision

Task 6: The Eagle as JSON (board #1456)

Since the plan was written, the converter was split for the line budget: tools/temples/classic/convert.py is the CLI and run(); the stages live in lttp_tables.py, lttp_layout.py, lttp_doors.py, lttp_contents.py; the pinned copies are under tools/temples/classic/vendor/ (LoZ_1.dot is there). Keep every file under 500 lines: put the Eagle's matcher in its own module (for example loz_eagle.py) that convert.py calls for wind-temple.

Files:

  • Create: the Eagle module, tools/temples/classic/overrides/wind-temple.json (only if needed), tools/temples/classic/dungeons/wind-temple.json
  • Modify: tools/temples/classic/convert.py (route wind-temple to the Eagle module)
  • Test: tests/unit/ClassicDungeonJson.spec.ts

Interfaces:

  • Consumes: the ClassicDungeon schema (tools/temples/classic/classicDungeon.ts).

  • Produces: dungeons/wind-temple.json with source: "Zelda 1 Level 1 (Eagle)", one floor 1F of 6×6. Its 17 Eagle cells are the non-wall cells of today's src/lib/engine/temples/wind-temple.ts, minus the owner's 4: (3,5), (4,4), (4,5), (5,5) (row, col).

  • Step 1: Write failing tests (a Wind branch of the spec):

    • The Wind JSON has exactly the 17 Eagle cells.
    • The entrance is at (5,2), the boss at (1,4) and the Triforce cell (the future Master Room) at (1,5).
    • It has 6 small keys and 6 small-key side pairs.
    • There's one map and one compass.
  • Step 2: Run chemx test tests/unit/ClassicDungeonJson.spec.ts. Expected: FAIL.

  • Step 3: Implement.

    • Match LoZ_1.dot's nodes onto the Eagle cells by search, keeping every non-stairway edge between orthogonal neighbours. The anchors are: s = entrance, b = boss, t = Triforce.
    • The bow's basement links to the push-block room at (0,1) as a teleport.
    • Tags: k with e → keyDrop: 'small'; k alone → chest: 'small-key'; i → map or compass in graph order. Edge labels: k → small-key, b → bomb, l → shutter.
    • A node that fits no cell stops the run and is named. It's never guessed.
  • Step 4: Run the spec. Expected: PASS; also run the converter for all eight LTTP dungeons and confirm git status --short tools/temples/classic/dungeons shows only the new wind file (the eight others byte-identical).

  • Step 5: Commit feat(tools): the Eagle's rooms and doors as JSON, matched from Zelda 1 Level 1.

Lead rulings (binding)

  • The spec's "exactly one Big Key and one big-chest" checks stay LTTP-only (source starts with "LTTP"). The Wind JSON has no Big Key (the owner keeps the Boss Key in his own east room, re-added by Task 9). Of Level 1's two I key items, the one reached by the stairway (the bow basement) is the big-chest; the other is chest: "other".

Table of Contents


Home - See Pages

Developer Docs

Start Screen

User Management

My Portal

My Home

The City (Hometown)

The World Map

The Dungeon

Game Master

Settings

Support & Glossary

About XP

Clone this wiki locally