feat(mystery): migration script and produced markdown content
Adds scripts/migrate-mystery-content.ts which reads rooms, items,
encounters, and endings from TypeScript source and emits byte-identical
markdown files under src/mystery/world/{rooms,items,encounters,endings}/.
Installs tsx as a devDep to support .ts imports across src/ during the
one-shot run.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
---
|
||||
id: rat
|
||||
startsIn: "[[cellar-stair]]"
|
||||
initialPhase: lurking
|
||||
---
|
||||
|
||||
## lurking
|
||||
A heavy rat watches you from the third step. Its eyes catch the light.
|
||||
|
||||
## attack-rat-resolved
|
||||
You stamp. The rat squeals and is gone into the dark.
|
||||
|
||||
## wait-stays
|
||||
The rat does not move. Neither do you.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
id: bad
|
||||
whenFlags: {}
|
||||
---
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
id: true
|
||||
whenFlags:
|
||||
ratGone: true
|
||||
---
|
||||
|
||||
You stand at the top of the stair. The thing below has settled. The door behind you opens, and outside, finally, is morning.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
id: wrong
|
||||
whenFlags: {}
|
||||
---
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
id: lamp
|
||||
names: ["lamp", "oil lamp", "torch"]
|
||||
short: "an oil lamp"
|
||||
takeable: true
|
||||
initialState:
|
||||
lit: false
|
||||
---
|
||||
|
||||
An iron oil lamp with a glass chimney. Currently unlit.
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
id: letter
|
||||
names: ["letter", "folded letter", "paper"]
|
||||
short: "a folded letter"
|
||||
takeable: true
|
||||
---
|
||||
|
||||
A folded letter on yellowed paper. The hand is unfamiliar. It reads: "Come at once. The thing in the cellar is waking."
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
id: matches
|
||||
names: ["matches", "safety matches", "box"]
|
||||
short: "a box of safety matches"
|
||||
takeable: true
|
||||
---
|
||||
|
||||
A small cardboard box of safety matches. Half-full.
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
id: cellar-stair
|
||||
title: "[ Cellar Stair ]"
|
||||
exitN: null
|
||||
exitS: null
|
||||
exitE: null
|
||||
exitW: "[[hallway]]"
|
||||
exitU: null
|
||||
exitD: null
|
||||
items: []
|
||||
encounter: "[[rat]]"
|
||||
---
|
||||
|
||||
## first-visit
|
||||
The stair drops into wet stone. The hallway is west. Something at the bottom is breathing.
|
||||
|
||||
## revisit
|
||||
The stair to the cellar.
|
||||
|
||||
## examined
|
||||
The stairs are stone, slick with damp. You can hear water below, and something else.
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
id: foyer
|
||||
title: "[ Foyer ]"
|
||||
exitN: "[[hallway]]"
|
||||
exitS: null
|
||||
exitE: null
|
||||
exitW: null
|
||||
exitU: null
|
||||
exitD: null
|
||||
items:
|
||||
- "[[letter]]"
|
||||
encounter: null
|
||||
safe: true
|
||||
---
|
||||
|
||||
## first-visit
|
||||
You stand in the foyer of a house you do not remember entering. The door behind you has closed without sound. A folded letter lies on a small table. A hallway leads north.
|
||||
|
||||
## revisit
|
||||
The foyer. The door behind you is still closed.
|
||||
|
||||
## examined
|
||||
A foyer with peeling paper. A small table holds nothing but the letter. The air smells of cold stone. A hallway leads north.
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
id: hallway
|
||||
title: "[ Hallway ]"
|
||||
exitN: null
|
||||
exitS: "[[foyer]]"
|
||||
exitE: "[[cellar-stair]]"
|
||||
exitW: null
|
||||
exitU: null
|
||||
exitD: null
|
||||
items:
|
||||
- "[[lamp]]"
|
||||
encounter: null
|
||||
---
|
||||
|
||||
## first-visit
|
||||
A long hallway, lit by nothing. An iron oil lamp sits on a side table. The foyer is south. A stair descends east.
|
||||
|
||||
## revisit
|
||||
The long hallway.
|
||||
|
||||
## examined
|
||||
The hallway runs further than the house should be wide. The dust on the floor is undisturbed except where you have walked. The oil lamp is on the side table.
|
||||
Reference in New Issue
Block a user