Skip to content

An open-trigger room trap with no closable door validates clean and can never fire #46

Description

@mmacy

The gap

#35 closed the authored-saved-validated-clean-never-fires hole for trigger="open" room traps by making door opening the springing action (PR #44). Two authorable configurations reopen the same hole one level up:

  1. An area whose perimeter has no door at all. Trapped chamber entered only through open archways: no EdgeKind.DOOR edge touches the area, so no opening can ever occur.
  2. An area whose only door starts_open. OpenDoor and ForceDoor reject an already-open door, and the swing-shut rule skips doors the party didn't open, so in ordinary play the door never closes and is never opened.

Both pass TrapSpec, AreaSpec, and validate_adventure — which checks cells, ids, and transitions but never inspects traps — and the blade never falls.

Where the fix belongs

Authoring-time validation on validate_adventure (or LevelSpec), which alone can see both the areas and the edges: an open-trigger room trap on an area none of whose boundary edges is a closable door is a content error, reported before play like a dangling monster id. The starts_open case is arguably a warning rather than an error — a wedged-then-unwedged door can close again via the swing-shut rule if the party ever opens and passes it — so the exact severity needs a decision.

validate_content_pack should report the same gap for pack entries only if entries ever regain geometry; today an entry has no edges, so the check is adventure-side only.

Found by the review pass on PR #44.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions