feat(content): demo the state engine (generator unlocks/lights the cellar)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,14 @@ Farb-Rollen: Items / NPCs / Exits / Heading / Gefahr.
|
|||||||
|
|
||||||
### 5. Quest-System (NPC-Ausbau)
|
### 5. Quest-System (NPC-Ausbau)
|
||||||
|
|
||||||
|
> ✅ Fundament umgesetzt (Branch `feature/quest-foundation`): World-Flags +
|
||||||
|
> Condition/Effect-Engine, verschlossene Exits, zustandsabhängige Beschreibungen,
|
||||||
|
> bedingte Dialoge, Reaktionen mit requires/effects, Schalter-Effekte. Demo:
|
||||||
|
> Generator schaltet Strom → Keller-Tür öffnet + Raum wird beleuchtet. Quest-
|
||||||
|
> Objekte/Log (#3.2) und Enden (#3.3) sowie Licht/Dunkelheit & Item-Kombination
|
||||||
|
> stehen noch aus.
|
||||||
|
|
||||||
|
|
||||||
- Aktuelles NPC-System: Begrüßung + Geschenk-Reaktion (Item → Item).
|
- Aktuelles NPC-System: Begrüßung + Geschenk-Reaktion (Item → Item).
|
||||||
- Ausbau Richtung: mehrstufige Quests, Bedingungen, NPC-"Memory" (Zustand),
|
- Ausbau Richtung: mehrstufige Quests, Bedingungen, NPC-"Memory" (Zustand),
|
||||||
Quest-Log, evtl. Win-Condition daran gekoppelt.
|
Quest-Log, evtl. Win-Condition daran gekoppelt.
|
||||||
|
|||||||
@@ -22,3 +22,15 @@
|
|||||||
id: key
|
id: key
|
||||||
name: Brass Key
|
name: Brass Key
|
||||||
description: A small brass key, polished from use.
|
description: A small brass key, polished from use.
|
||||||
|
|
||||||
|
- type: switchable
|
||||||
|
id: generator
|
||||||
|
name: Generator
|
||||||
|
description: A rusty generator with a heavy lever.
|
||||||
|
initialState: false
|
||||||
|
onText: |
|
||||||
|
You heave the lever. Somewhere deep in the manor, the lights flicker on.
|
||||||
|
offText: |
|
||||||
|
You pull the lever back; the manor falls dark again.
|
||||||
|
effects:
|
||||||
|
- { setFlag: power_on }
|
||||||
|
|||||||
@@ -10,3 +10,8 @@
|
|||||||
"Thank you! Here, take this key."
|
"Thank you! Here, take this key."
|
||||||
gives: key
|
gives: key
|
||||||
consumes: lamp
|
consumes: lamp
|
||||||
|
dialogue:
|
||||||
|
- when: [{ flag: power_on }]
|
||||||
|
text: |
|
||||||
|
"You got the power running! The whole house feels less...
|
||||||
|
watchful now."
|
||||||
|
|||||||
@@ -9,6 +9,11 @@
|
|||||||
south: dungeon
|
south: dungeon
|
||||||
items: [letter, lamp]
|
items: [letter, lamp]
|
||||||
npcs: [old_man]
|
npcs: [old_man]
|
||||||
|
exitLocks:
|
||||||
|
- direction: east
|
||||||
|
requires: [{ flag: power_on }]
|
||||||
|
blocked: |
|
||||||
|
The cellar door is held shut by a magnetic lock — dead without power.
|
||||||
|
|
||||||
- id: hallway
|
- id: hallway
|
||||||
name: Dark Hallway
|
name: Dark Hallway
|
||||||
@@ -40,12 +45,17 @@
|
|||||||
west: kitchen
|
west: kitchen
|
||||||
items: []
|
items: []
|
||||||
npcs: []
|
npcs: []
|
||||||
|
descriptionStates:
|
||||||
|
- when: [{ flag: power_on }]
|
||||||
|
text: |
|
||||||
|
With the power back, a bare bulb buzzes overhead, revealing
|
||||||
|
shelves of dusty jars along the far wall.
|
||||||
|
|
||||||
- id: dungeon
|
- id: dungeon
|
||||||
name: Dungeon
|
name: Dungeon
|
||||||
description: |
|
description: |
|
||||||
A dark, damp room.
|
A dark, damp room. A rusty generator squats in the corner.
|
||||||
exits:
|
exits:
|
||||||
north: kitchen
|
north: kitchen
|
||||||
items: []
|
items: [generator]
|
||||||
npcs: []
|
npcs: []
|
||||||
|
|||||||
Reference in New Issue
Block a user