diff --git a/Semesterprojekt/docs/enhancement-ideas.md b/Semesterprojekt/docs/enhancement-ideas.md index f004757..f48c541 100644 --- a/Semesterprojekt/docs/enhancement-ideas.md +++ b/Semesterprojekt/docs/enhancement-ideas.md @@ -78,6 +78,14 @@ Farb-Rollen: Items / NPCs / Exits / Heading / Gefahr. ### 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). - Ausbau Richtung: mehrstufige Quests, Bedingungen, NPC-"Memory" (Zustand), Quest-Log, evtl. Win-Condition daran gekoppelt. diff --git a/Semesterprojekt/src/main/resources/world/items.yaml b/Semesterprojekt/src/main/resources/world/items.yaml index 06d0650..70a52d5 100644 --- a/Semesterprojekt/src/main/resources/world/items.yaml +++ b/Semesterprojekt/src/main/resources/world/items.yaml @@ -22,3 +22,15 @@ id: key name: Brass Key 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 } diff --git a/Semesterprojekt/src/main/resources/world/npcs.yaml b/Semesterprojekt/src/main/resources/world/npcs.yaml index 5d9b04c..2abdb34 100644 --- a/Semesterprojekt/src/main/resources/world/npcs.yaml +++ b/Semesterprojekt/src/main/resources/world/npcs.yaml @@ -10,3 +10,8 @@ "Thank you! Here, take this key." gives: key consumes: lamp + dialogue: + - when: [{ flag: power_on }] + text: | + "You got the power running! The whole house feels less... + watchful now." diff --git a/Semesterprojekt/src/main/resources/world/rooms.yaml b/Semesterprojekt/src/main/resources/world/rooms.yaml index 4521903..2ce13cb 100644 --- a/Semesterprojekt/src/main/resources/world/rooms.yaml +++ b/Semesterprojekt/src/main/resources/world/rooms.yaml @@ -9,6 +9,11 @@ south: dungeon items: [letter, lamp] 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 name: Dark Hallway @@ -40,12 +45,17 @@ west: kitchen items: [] 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 name: Dungeon description: | - A dark, damp room. + A dark, damp room. A rusty generator squats in the corner. exits: north: kitchen - items: [] + items: [generator] npcs: []