{
  "version": "1.1",
  "requiredCapabilities": [
    "story-rules-v1",
    "creator-features-v1",
    "objective-journal-v1",
    "mechanics-builder-v1"
  ],
  "name": "The Lighthouse Power Workshop",
  "author": "TAGMaker",
  "description": "A safe three-room workshop demonstrating editable mechanics, actual fuse/fuel Recipes, powered transport, fuel exhaustion, harmless suspicion and a linked Objectives journal. Complete the service for 100 points and 10 harbor coins.",
  "startRoom": "quay",
  "created": "2026-10-24T00:00:00.000Z",
  "modified": "2026-10-24T00:00:00.000Z",
  "playerConfig": {
    "scoreEnabled": true,
    "healthEnabled": false,
    "moneyEnabled": true,
    "startingMoney": 0,
    "currencyName": "harbor coins"
  },
  "gameBrief": {
    "version": 1,
    "playerRole": "A lighthouse service volunteer.",
    "goal": "Repair the generator, retrieve a signal lens, and deliver it to the keeper.",
    "success": "Native repairs, operating power, lens acquisition and accepted delivery agree with the mission journal."
  },
  "story": {
    "version": 1,
    "states": [
      {
        "id": "mp_lighthouse_generator_repaired",
        "name": "Lighthouse backup generator (lighthouse_generator) — Repaired",
        "description": "Owned native dependency of this editable mechanic.",
        "type": "boolean",
        "initial": false
      },
      {
        "id": "mp_lighthouse_generator_powered",
        "name": "Lighthouse backup generator (lighthouse_generator) — Powered",
        "description": "Owned native dependency of this editable mechanic.",
        "type": "boolean",
        "initial": false
      },
      {
        "id": "mp_lighthouse_noise_alerted",
        "name": "Generator noise and harmless watchman (lighthouse_noise) — Alarm active",
        "description": "Owned native dependency of this editable mechanic.",
        "type": "boolean",
        "initial": false
      }
    ],
    "rules": [],
    "features": {
      "version": 1,
      "commandContext": true,
      "recipes": [
        {
          "id": "deliver_signal_lens",
          "name": "Accepted signal-lens delivery",
          "enabled": true,
          "verbs": [
            "give"
          ],
          "unordered": false,
          "inputs": [
            {
              "objectId": "signal_lens",
              "disposition": "transfer"
            }
          ],
          "tools": [],
          "target": {
            "kind": "npc",
            "id": "keeper"
          },
          "roomId": "quay",
          "match": "all",
          "conditions": [],
          "actions": [],
          "once": true,
          "success": "The keeper accepts the signal lens and records the completed service.",
          "failure": "Carry the signal lens back to the quay and give it to the keeper.",
          "repeat": "The keeper has already accepted the lens."
        },
        {
          "id": "mp_lighthouse_generator_repair",
          "name": "Lighthouse backup generator — Install the repair fuse",
          "enabled": true,
          "mechanicId": "lighthouse_generator",
          "verbs": [
            "use"
          ],
          "unordered": false,
          "inputs": [
            {
              "objectId": "brass_fuse",
              "disposition": "consume"
            }
          ],
          "tools": [],
          "target": {
            "kind": "object",
            "id": "generator"
          },
          "match": "all",
          "conditions": [],
          "actions": [
            {
              "kind": "state",
              "target": "mp_lighthouse_generator_repaired",
              "value": true
            }
          ],
          "once": true,
          "success": "The fuse seats with a firm click. The machine is repaired.",
          "failure": "Carry the required item and tools, and use them with the selected target.",
          "repeat": "That interaction is already complete."
        },
        {
          "id": "mp_lighthouse_generator_refuel",
          "name": "Lighthouse backup generator — Refuel the machine",
          "enabled": true,
          "mechanicId": "lighthouse_generator",
          "verbs": [
            "use"
          ],
          "unordered": false,
          "inputs": [
            {
              "objectId": "fuel_can",
              "disposition": "consume"
            }
          ],
          "tools": [],
          "target": {
            "kind": "object",
            "id": "generator"
          },
          "match": "all",
          "conditions": [
            {
              "kind": "state",
              "target": "mp_lighthouse_generator_repaired",
              "operator": "==",
              "value": true
            }
          ],
          "actions": [],
          "once": false,
          "success": "You pour the fuel into the repaired machine.",
          "failure": "Carry the required item and tools, and use them with the selected target.",
          "repeat": "That interaction is already complete."
        }
      ],
      "mechanics": [
        {
          "version": 1,
          "id": "lighthouse_generator",
          "name": "Lighthouse backup generator",
          "description": "Repair a machine with a real fuse, refuel it through a native Recipe, switch it on, consume operating fuel, and power a connected gate.",
          "category": "Devices",
          "enabled": true,
          "autoStart": true,
          "inputs": [
            {
              "id": "machine",
              "name": "Machine control",
              "kind": "object",
              "required": true,
              "value": "generator"
            },
            {
              "id": "fuse",
              "name": "Repair fuse / material",
              "kind": "object",
              "required": true,
              "value": "brass_fuse"
            },
            {
              "id": "fuel",
              "name": "Fuel item",
              "kind": "object",
              "required": true,
              "value": "fuel_can"
            },
            {
              "id": "gate",
              "name": "Powered gate",
              "kind": "object",
              "required": true,
              "value": "safety_gate"
            },
            {
              "id": "fuelUnits",
              "name": "Operating turns per fuel item",
              "kind": "number",
              "required": true,
              "value": 8,
              "min": 1,
              "max": 1000
            }
          ],
          "variables": [
            {
              "id": "fuel",
              "name": "Fuel",
              "type": "number",
              "initial": 0,
              "min": 0,
              "max": 1000,
              "showInPlayer": true,
              "suffix": "turns"
            }
          ],
          "scope": {
            "kind": "global",
            "rooms": []
          },
          "initialPhase": "broken",
          "phases": [
            {
              "id": "broken",
              "name": "Broken",
              "onEnter": [
                {
                  "kind": "state",
                  "target": "mp_lighthouse_generator_powered",
                  "value": false
                }
              ],
              "onExit": []
            },
            {
              "id": "off",
              "name": "Off",
              "onEnter": [
                {
                  "kind": "state",
                  "target": "mp_lighthouse_generator_powered",
                  "value": false
                },
                {
                  "kind": "object_state",
                  "target": "$gate",
                  "property": "locked",
                  "value": true
                }
              ],
              "onExit": []
            },
            {
              "id": "running",
              "name": "Running",
              "onEnter": [
                {
                  "kind": "state",
                  "target": "mp_lighthouse_generator_powered",
                  "value": true
                },
                {
                  "kind": "object_state",
                  "target": "$gate",
                  "property": "locked",
                  "value": false
                },
                {
                  "kind": "message",
                  "value": "The machine starts. Its connected gate is powered."
                }
              ],
              "onExit": [
                {
                  "kind": "state",
                  "target": "mp_lighthouse_generator_powered",
                  "value": false
                },
                {
                  "kind": "object_state",
                  "target": "$gate",
                  "property": "locked",
                  "value": true
                }
              ]
            }
          ],
          "rules": [
            {
              "id": "already_repaired",
              "name": "Remember the actual world repair after a counter reset",
              "enabled": true,
              "trigger": {
                "kind": "start",
                "target": "",
                "event": ""
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "flag",
                    "target": "mp_lighthouse_generator_repaired",
                    "operator": "==",
                    "value": true
                  }
                ]
              },
              "actions": [
                {
                  "kind": "phase",
                  "target": "off"
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0,
              "phase": "broken"
            },
            {
              "id": "repair",
              "name": "Observe the accepted repair Recipe",
              "enabled": true,
              "trigger": {
                "kind": "fact",
                "target": "mp_lighthouse_generator_repair",
                "event": "recipe"
              },
              "conditions": {
                "match": "all",
                "conditions": []
              },
              "actions": [
                {
                  "kind": "phase",
                  "target": "off"
                },
                {
                  "kind": "message",
                  "value": "The machine is repaired. Add fuel, then USE the machine."
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0,
              "phase": "broken"
            },
            {
              "id": "refuel",
              "name": "Accept fuel consumed by the native Recipe",
              "enabled": true,
              "trigger": {
                "kind": "fact",
                "target": "mp_lighthouse_generator_refuel",
                "event": "recipe"
              },
              "conditions": {
                "match": "all",
                "conditions": []
              },
              "actions": [
                {
                  "kind": "local",
                  "target": "fuel",
                  "operation": "add",
                  "value": {
                    "input": "fuelUnits"
                  }
                },
                {
                  "kind": "message",
                  "value": "Fuel is added. Remaining fuel: {{variable:fuel}} operating turns."
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0
            },
            {
              "id": "start",
              "name": "Start the repaired machine",
              "enabled": true,
              "trigger": {
                "kind": "object",
                "target": "$machine",
                "event": "use"
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "event",
                    "field": "secondary",
                    "operator": "==",
                    "value": ""
                  },
                  {
                    "match": "all",
                    "conditions": [
                      {
                        "kind": "local",
                        "target": "fuel",
                        "operator": ">",
                        "value": 0
                      }
                    ]
                  }
                ]
              },
              "actions": [
                {
                  "kind": "phase",
                  "target": "running"
                }
              ],
              "otherwise": [
                {
                  "kind": "message",
                  "value": "The machine needs fuel. Carry the fuel item and USE it WITH the machine."
                }
              ],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0,
              "phase": "off"
            },
            {
              "id": "stop",
              "name": "Switch off a running machine",
              "enabled": true,
              "trigger": {
                "kind": "object",
                "target": "$machine",
                "event": "use"
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "event",
                    "field": "secondary",
                    "operator": "==",
                    "value": ""
                  },
                  {
                    "match": "all",
                    "conditions": []
                  }
                ]
              },
              "actions": [
                {
                  "kind": "phase",
                  "target": "off"
                },
                {
                  "kind": "message",
                  "value": "You switch the machine off."
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0,
              "phase": "running"
            },
            {
              "id": "broken",
              "name": "Explain the missing repair",
              "enabled": true,
              "trigger": {
                "kind": "object",
                "target": "$machine",
                "event": "use"
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "event",
                    "field": "secondary",
                    "operator": "==",
                    "value": ""
                  },
                  {
                    "match": "all",
                    "conditions": []
                  }
                ]
              },
              "actions": [
                {
                  "kind": "message",
                  "value": "The machine needs its fuse / repair material. Carry it and USE it WITH the machine."
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0,
              "phase": "broken"
            },
            {
              "id": "burn",
              "name": "Consume fuel on each operating turn",
              "enabled": true,
              "trigger": {
                "kind": "turn",
                "target": "",
                "event": ""
              },
              "conditions": {
                "match": "all",
                "conditions": []
              },
              "actions": [
                {
                  "kind": "local",
                  "target": "fuel",
                  "operation": "subtract",
                  "value": 1
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 10,
              "phase": "running"
            },
            {
              "id": "exhausted",
              "name": "Stop when fuel is exhausted",
              "enabled": true,
              "trigger": {
                "kind": "turn",
                "target": "",
                "event": ""
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "local",
                    "target": "fuel",
                    "operator": "<=",
                    "value": 0
                  }
                ]
              },
              "actions": [
                {
                  "kind": "phase",
                  "target": "off"
                },
                {
                  "kind": "message",
                  "value": "The fuel runs out. The machine stops and its gate loses power."
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0,
              "phase": "running"
            }
          ],
          "sourcePreset": "powered_machine",
          "notes": "A machine, fuse, fuel item, and controlled gate.\nCarry the fuse or fuel; USE FUSE WITH MACHINE / USE FUEL WITH MACHINE.\nPause freezes the operating clock while retaining current power; terminal controls stop power and lock its gate. Reset changes local clocks/resources without recreating consumed world items. This package adds native repair/refuel Recipes and two named story states. Link exits or Objectives to mp_lighthouse_generator_powered. Active turns include the command that starts the machine.",
          "onControl": {
            "disable": [
              {
                "kind": "state",
                "target": "mp_lighthouse_generator_powered",
                "value": false
              },
              {
                "kind": "object_state",
                "target": "$gate",
                "property": "locked",
                "value": true
              },
              {
                "kind": "phase",
                "target": "off"
              }
            ],
            "complete": [
              {
                "kind": "state",
                "target": "mp_lighthouse_generator_powered",
                "value": false
              },
              {
                "kind": "object_state",
                "target": "$gate",
                "property": "locked",
                "value": true
              },
              {
                "kind": "phase",
                "target": "off"
              }
            ],
            "fail": [
              {
                "kind": "state",
                "target": "mp_lighthouse_generator_powered",
                "value": false
              },
              {
                "kind": "object_state",
                "target": "$gate",
                "property": "locked",
                "value": true
              },
              {
                "kind": "phase",
                "target": "off"
              }
            ],
            "reset": [
              {
                "kind": "state",
                "target": "mp_lighthouse_generator_powered",
                "value": false
              },
              {
                "kind": "object_state",
                "target": "$gate",
                "property": "locked",
                "value": true
              },
              {
                "kind": "phase",
                "target": "broken"
              }
            ]
          }
        },
        {
          "version": 1,
          "id": "lighthouse_lift",
          "name": "Powered lift and emergency return",
          "description": "Two controls connect origin and destination, with a guarded optional fare in both directions. Insufficient funds leave the player in place.",
          "category": "Travel",
          "enabled": true,
          "autoStart": true,
          "inputs": [
            {
              "id": "origin",
              "name": "Origin room",
              "kind": "room",
              "required": true,
              "value": "powerhouse"
            },
            {
              "id": "destination",
              "name": "Destination room",
              "kind": "room",
              "required": true,
              "value": "gallery"
            },
            {
              "id": "outbound",
              "name": "Outbound control",
              "kind": "object",
              "required": true,
              "value": "lift_control"
            },
            {
              "id": "inbound",
              "name": "Return control",
              "kind": "object",
              "required": true,
              "value": "return_lever"
            },
            {
              "id": "fare",
              "name": "Fare per trip",
              "kind": "number",
              "required": true,
              "value": 0,
              "min": 0,
              "max": 1000000
            }
          ],
          "variables": [
            {
              "id": "fare",
              "name": "Configured fare",
              "type": "number",
              "initial": "$fare",
              "min": 0,
              "max": 1000000
            }
          ],
          "scope": {
            "kind": "global",
            "rooms": []
          },
          "initialPhase": "",
          "phases": [],
          "rules": [
            {
              "id": "outbound",
              "name": "Travel from origin",
              "enabled": true,
              "trigger": {
                "kind": "object",
                "target": "$outbound",
                "event": "use"
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "event",
                    "field": "secondary",
                    "operator": "==",
                    "value": ""
                  },
                  {
                    "match": "all",
                    "conditions": [
                      {
                        "kind": "objective",
                        "criterion": {
                          "kind": "room_current",
                          "target": "$origin",
                          "targetKind": "room"
                        }
                      },
                      {
                        "match": "any",
                        "conditions": [
                          {
                            "kind": "local",
                            "target": "fare",
                            "operator": "==",
                            "value": 0
                          },
                          {
                            "kind": "flag",
                            "target": "money",
                            "operator": ">=",
                            "value": "$fare"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "kind": "flag",
                    "target": "mp_lighthouse_generator_powered",
                    "operator": "==",
                    "value": true
                  }
                ]
              },
              "actions": [
                {
                  "kind": "currency",
                  "operation": "subtract",
                  "value": {
                    "input": "fare"
                  }
                },
                {
                  "kind": "goto",
                  "target": "$destination"
                },
                {
                  "kind": "message",
                  "value": "You arrive at the destination."
                }
              ],
              "otherwise": [
                {
                  "kind": "message",
                  "value": "The lift has no power. Repair and fuel the generator, then USE GENERATOR."
                }
              ],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0
            },
            {
              "id": "inbound",
              "name": "Return to the origin",
              "enabled": true,
              "trigger": {
                "kind": "object",
                "target": "$inbound",
                "event": "use"
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "event",
                    "field": "secondary",
                    "operator": "==",
                    "value": ""
                  },
                  {
                    "match": "all",
                    "conditions": [
                      {
                        "kind": "objective",
                        "criterion": {
                          "kind": "room_current",
                          "target": "$destination",
                          "targetKind": "room"
                        }
                      },
                      {
                        "match": "any",
                        "conditions": [
                          {
                            "kind": "local",
                            "target": "fare",
                            "operator": "==",
                            "value": 0
                          },
                          {
                            "kind": "flag",
                            "target": "money",
                            "operator": ">=",
                            "value": "$fare"
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              "actions": [
                {
                  "kind": "currency",
                  "operation": "subtract",
                  "value": {
                    "input": "fare"
                  }
                },
                {
                  "kind": "goto",
                  "target": "$origin"
                },
                {
                  "kind": "message",
                  "value": "You return to the origin."
                }
              ],
              "otherwise": [
                {
                  "kind": "message",
                  "value": "The return route is unavailable here, or you cannot afford its fare."
                }
              ],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0
            }
          ],
          "sourcePreset": "transport",
          "notes": "Origin and destination rooms, each with its own usable control.\nSet fare to zero for free travel. A positive fare requires player currency."
        },
        {
          "version": 1,
          "id": "lighthouse_noise",
          "name": "Generator noise and harmless watchman",
          "description": "Suspicion rises in a selected guarded room. A worn disguise prevents detection; a real distraction item reduces suspicion. Detection uses saved seeded chance.",
          "category": "NPC & Stealth",
          "enabled": true,
          "autoStart": true,
          "inputs": [
            {
              "id": "zone",
              "name": "Guarded room",
              "kind": "room",
              "required": true,
              "value": "powerhouse"
            },
            {
              "id": "guard",
              "name": "Guard NPC",
              "kind": "npc",
              "required": true,
              "value": "watchman"
            },
            {
              "id": "disguise",
              "name": "Protective disguise",
              "kind": "object",
              "required": true,
              "value": "worker_jacket"
            },
            {
              "id": "distraction",
              "name": "Consumable distraction",
              "kind": "object",
              "required": true,
              "value": "windup_toy"
            },
            {
              "id": "threshold",
              "name": "Suspicion threshold",
              "kind": "number",
              "required": true,
              "value": 2,
              "min": 1,
              "max": 100
            }
          ],
          "variables": [
            {
              "id": "noise",
              "name": "Suspicion",
              "type": "number",
              "initial": 0,
              "min": 0,
              "max": 100,
              "showInPlayer": true
            },
            {
              "id": "threshold",
              "name": "Detection threshold",
              "type": "number",
              "initial": "$threshold",
              "min": 1,
              "max": 100
            }
          ],
          "scope": {
            "kind": "rooms",
            "rooms": [
              "$zone"
            ]
          },
          "initialPhase": "hidden",
          "phases": [
            {
              "id": "hidden",
              "name": "Hidden",
              "onEnter": [],
              "onExit": []
            },
            {
              "id": "alerted",
              "name": "Alerted",
              "onEnter": [
                {
                  "kind": "state",
                  "target": "mp_lighthouse_noise_alerted",
                  "value": true
                },
                {
                  "kind": "message",
                  "value": "The guard detects you. The alarm state is now active."
                }
              ],
              "onExit": []
            }
          ],
          "rules": [
            {
              "id": "noise",
              "name": "Movement and activity raise suspicion",
              "enabled": true,
              "trigger": {
                "kind": "turn",
                "target": "",
                "event": ""
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "flag",
                    "target": "mp_lighthouse_generator_powered",
                    "operator": "==",
                    "value": true
                  }
                ]
              },
              "actions": [
                {
                  "kind": "local",
                  "target": "noise",
                  "operation": "add",
                  "value": 1
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 20
            },
            {
              "id": "detect",
              "name": "A nearby living guard may detect you",
              "enabled": true,
              "trigger": {
                "kind": "turn",
                "target": "",
                "event": ""
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "local",
                    "target": "noise",
                    "operator": ">=",
                    "value": "@threshold"
                  },
                  {
                    "kind": "objective",
                    "criterion": {
                      "kind": "npc_at",
                      "target": "$guard",
                      "secondary": "$zone",
                      "targetKind": "npc"
                    }
                  },
                  {
                    "match": "not",
                    "conditions": [
                      {
                        "kind": "objective",
                        "criterion": {
                          "kind": "object_worn",
                          "target": "$disguise",
                          "targetKind": "object"
                        }
                      }
                    ]
                  },
                  {
                    "kind": "flag",
                    "target": "mp_lighthouse_generator_powered",
                    "operator": "==",
                    "value": true
                  }
                ]
              },
              "actions": [
                {
                  "kind": "phase",
                  "target": "alerted"
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 2,
              "maxUses": 0,
              "probability": 0.35,
              "priority": 0,
              "phase": "hidden"
            },
            {
              "id": "distract",
              "name": "Use a real distraction item",
              "enabled": true,
              "trigger": {
                "kind": "object",
                "target": "$distraction",
                "event": "use"
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "event",
                    "field": "secondary",
                    "operator": "==",
                    "value": ""
                  },
                  {
                    "match": "all",
                    "conditions": [
                      {
                        "kind": "objective",
                        "criterion": {
                          "kind": "object_possessed",
                          "target": "$distraction",
                          "targetKind": "object"
                        }
                      }
                    ]
                  }
                ]
              },
              "actions": [
                {
                  "kind": "consume",
                  "target": "$distraction"
                },
                {
                  "kind": "local",
                  "target": "noise",
                  "operation": "set",
                  "value": 0
                },
                {
                  "kind": "state",
                  "target": "mp_lighthouse_noise_alerted",
                  "value": false
                },
                {
                  "kind": "phase",
                  "target": "hidden"
                },
                {
                  "kind": "message",
                  "value": "The distraction draws attention away. Suspicion returns to zero."
                }
              ],
              "otherwise": [
                {
                  "kind": "message",
                  "value": "Carry the distraction item before using it."
                }
              ],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0
            }
          ],
          "sourcePreset": "stealth_noise",
          "notes": "One guarded room, a living guard there, a wearable disguise, and a usable distraction item.\nThe shared alarm state mp_lighthouse_noise_alerted can trigger an existing Security World Event. NPC movement stays with native routines; this preset never teleports the guard."
        }
      ],
      "randomTables": [],
      "routines": []
    }
  },
  "files": [
    {
      "path": "scripts/game_start.taml",
      "content": "script on_game_start\n  goto: quay\nend"
    },
    {
      "path": "scripts/on_turn_end.taml",
      "content": "script on_turn_end\nend"
    },
    {
      "path": "rooms/quay.taml",
      "content": "room quay\n  name: \"Lighthouse Quay\"\n  narrative: \"The keeper needs a signal lens from the lighthouse gallery. A safe workshop waits NORTH. TAKE WORKER JACKET and WEAR WORKER JACKET if you want the harmless watchman to ignore you. Repair and fuel the generator, use the powered lift, then bring the lens back here. OBJECTIVES and HINT explain the route. This workshop has no hostile enemies.\"\n  description: \"A worker jacket hangs beside the keeper. The powerhouse is north.\"\n  hint: \"TAKE WORKER JACKET, WEAR WORKER JACKET, then go NORTH and READ BRIEFING.\"\n  exit north: powerhouse\nend"
    },
    {
      "path": "rooms/powerhouse.taml",
      "content": "room powerhouse\n  name: \"Lighthouse Powerhouse\"\n  description: \"The generator, safety gate and lift control share one circuit. A brass fuse, fuel can, windup toy and briefing are within reach. The quay is south.\"\n  hint: \"TAKE BRASS FUSE and TAKE FUEL CAN. USE BRASS FUSE WITH GENERATOR, then USE FUEL CAN WITH GENERATOR. USE GENERATOR starts it. USE LIFT CONTROL goes upstairs while power lasts.\"\n  exit south: quay\n  exit up: gallery when: mp_lighthouse_generator_powered\n  blocked up: \"The gallery lift has no power. Repair, refuel and start the generator.\"\nend"
    },
    {
      "path": "rooms/gallery.taml",
      "content": "room gallery\n  name: \"Upper Signal Gallery\"\n  description: \"The spare signal lens rests beside an emergency return lever. The return is mechanical and always works.\"\n  hint: \"TAKE SIGNAL LENS, then USE RETURN LEVER. You can also go DOWN. Switch off the generator to save fuel, go SOUTH, and GIVE SIGNAL LENS TO KEEPER.\"\n  exit down: powerhouse\nend"
    },
    {
      "path": "objects/worker_jacket.taml",
      "content": "object worker_jacket\n  name: \"worker jacket\"\n  description: \"A lighthouse worker jacket. WEAR WORKER JACKET to keep the harmless watchman from identifying you as an unfamiliar visitor.\"\n  location: quay\n  aliases: [\"jacket\", \"coat\"]\n  takeable: true\n  wearable: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/brass_fuse.taml",
      "content": "object brass_fuse\n  name: \"brass fuse\"\n  description: \"A replacement brass fuse. Carry it, then USE BRASS FUSE WITH GENERATOR.\"\n  location: powerhouse\n  aliases: [\"fuse\"]\n  takeable: true\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/fuel_can.taml",
      "content": "object fuel_can\n  name: \"fuel can\"\n  description: \"One measured can of fuel provides eight operating turns. Carry it, then USE FUEL CAN WITH GENERATOR after repairing the generator.\"\n  location: powerhouse\n  aliases: [\"fuel\", \"can\"]\n  takeable: true\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/generator.taml",
      "content": "object generator\n  name: \"generator\"\n  description: \"A compact backup generator with an empty fuse holder and fuel tank. Repair it, refuel it, and USE GENERATOR to switch it on or off.\"\n  location: powerhouse\n  aliases: [\"machine\"]\n  droppable: false\n  use_give: true\n  switchable: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/safety_gate.taml",
      "content": "object safety_gate\n  name: \"safety gate\"\n  description: \"An electrical latch unlocks while the generator is powered. The lift control uses the same power state.\"\n  location: powerhouse\n  aliases: [\"gate\"]\n  droppable: false\n  locked: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/lift_control.taml",
      "content": "object lift_control\n  name: \"lift control\"\n  description: \"USE LIFT CONTROL to reach the upper gallery while the generator is powered.\"\n  location: powerhouse\n  aliases: [\"lift\", \"elevator\"]\n  droppable: false\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/return_lever.taml",
      "content": "object return_lever\n  name: \"return lever\"\n  description: \"An emergency mechanical return. USE RETURN LEVER to return to the powerhouse even if generator power has failed.\"\n  location: gallery\n  aliases: [\"lever\", \"return control\"]\n  droppable: false\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/signal_lens.taml",
      "content": "object signal_lens\n  name: \"signal lens\"\n  description: \"The spare signal lens requested by the keeper. Bring it back to the quay and give it to the keeper.\"\n  location: gallery\n  aliases: [\"lens\"]\n  takeable: true\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/windup_toy.taml",
      "content": "object windup_toy\n  name: \"windup toy\"\n  description: \"A harmless windup distraction. Carry it and USE WINDUP TOY at the powerhouse to reduce suspicion. The toy is consumed when used.\"\n  location: powerhouse\n  aliases: [\"toy\", \"distraction\"]\n  takeable: true\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/briefing.taml",
      "content": "object briefing\n  name: \"briefing\"\n  description: \"LIGHTHOUSE POWER WORKSHOP: Take and wear the worker jacket at the quay if you want the watchman to ignore you. At the powerhouse TAKE BRASS FUSE and TAKE FUEL CAN. USE BRASS FUSE WITH GENERATOR repairs it. USE FUEL CAN WITH GENERATOR adds eight operating turns of fuel. USE GENERATOR switches it on; USE LIFT CONTROL takes you upstairs while power is on. TAKE SIGNAL LENS, USE RETURN LEVER, and USE GENERATOR to switch the generator off and save fuel. Go SOUTH and GIVE SIGNAL LENS TO KEEPER. The machine consumes fuel only while running and automatically stops at zero. The emergency return lever always works, so power loss cannot trap you upstairs. OBJECTIVES, HINT and the Mechanics status panel explain progress. This is a safe workshop: the watchman raises an alarm state but never attacks.\"\n  location: powerhouse\n  aliases: [\"instructions\", \"note\"]\n  droppable: false\n  weight: 0.1\n  on read:\n    print \"LIGHTHOUSE POWER WORKSHOP: Take and wear the worker jacket at the quay if you want the watchman to ignore you. At the powerhouse TAKE BRASS FUSE and TAKE FUEL CAN. USE BRASS FUSE WITH GENERATOR repairs it. USE FUEL CAN WITH GENERATOR adds eight operating turns of fuel. USE GENERATOR switches it on; USE LIFT CONTROL takes you upstairs while power is on. TAKE SIGNAL LENS, USE RETURN LEVER, and USE GENERATOR to switch the generator off and save fuel. Go SOUTH and GIVE SIGNAL LENS TO KEEPER. The machine consumes fuel only while running and automatically stops at zero. The emergency return lever always works, so power loss cannot trap you upstairs. OBJECTIVES, HINT and the Mechanics status panel explain progress. This is a safe workshop: the watchman raises an alarm state but never attacks.\"\n  end\nend"
    },
    {
      "path": "npcs/keeper.taml",
      "content": "npc keeper\n  name: \"keeper\"\n  description: \"The lighthouse keeper needs the signal lens from the upper gallery.\"\n  location: quay\n  mobile: false\n  follow: false\n  aliases: [\"lighthouse keeper\"]\n  health: 100\n  combat_side: neutral\n  auto_fight: false\n  attack_power: 10\n  defense: 0\n  trust: 50\n  dialogue default:\n    print \"keeper looks at you in silence.\"\n  end\n  on talk:\n    print \"Please repair and fuel the generator, retrieve the signal lens upstairs, then bring it back to me. The emergency return always works.\"\n  end\nend"
    },
    {
      "path": "npcs/watchman.taml",
      "content": "npc watchman\n  name: \"watchman\"\n  description: \"A harmless watchman notices unfamiliar visitors when the generator makes noise. The worker jacket is a recognizable disguise.\"\n  location: powerhouse\n  mobile: false\n  follow: false\n  aliases: [\"guard\"]\n  health: 100\n  combat_side: neutral\n  auto_fight: false\n  attack_power: 10\n  defense: 0\n  trust: 50\n  dialogue default:\n    print \"watchman looks at you in silence.\"\n  end\n  on talk:\n    print \"Wear your worker jacket around operating equipment. I only raise an alarm; this workshop has no combat.\"\n  end\nend"
    }
  ],
  "mapRooms": [
    {
      "id": "quay",
      "name": "Lighthouse Quay",
      "narrative": "The keeper needs a signal lens from the lighthouse gallery. A safe workshop waits NORTH. TAKE WORKER JACKET and WEAR WORKER JACKET if you want the harmless watchman to ignore you. Repair and fuel the generator, use the powered lift, then bring the lens back here. OBJECTIVES and HINT explain the route. This workshop has no hostile enemies.",
      "description": "A worker jacket hangs beside the keeper. The powerhouse is north.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "TAKE WORKER JACKET, WEAR WORKER JACKET, then go NORTH and READ BRIEFING.",
      "dark": false,
      "roomType": "regular",
      "x": 300,
      "y": 350,
      "width": 160,
      "height": 64,
      "color": "#000000"
    },
    {
      "id": "powerhouse",
      "name": "Lighthouse Powerhouse",
      "description": "The generator, safety gate and lift control share one circuit. A brass fuse, fuel can, windup toy and briefing are within reach. The quay is south.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "TAKE BRASS FUSE and TAKE FUEL CAN. USE BRASS FUSE WITH GENERATOR, then USE FUEL CAN WITH GENERATOR. USE GENERATOR starts it. USE LIFT CONTROL goes upstairs while power lasts.",
      "dark": false,
      "roomType": "regular",
      "x": 300,
      "y": 180,
      "width": 160,
      "height": 64,
      "color": "#000000"
    },
    {
      "id": "gallery",
      "name": "Upper Signal Gallery",
      "description": "The spare signal lens rests beside an emergency return lever. The return is mechanical and always works.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "TAKE SIGNAL LENS, then USE RETURN LEVER. You can also go DOWN. Switch off the generator to save fuel, go SOUTH, and GIVE SIGNAL LENS TO KEEPER.",
      "dark": false,
      "roomType": "regular",
      "x": 500,
      "y": 180,
      "width": 160,
      "height": 64,
      "color": "#000000"
    }
  ],
  "mapExits": [
    {
      "id": "quay_powerhouse",
      "fromRoom": "quay",
      "toRoom": "powerhouse",
      "direction": "north",
      "locked": false
    },
    {
      "id": "powerhouse_quay",
      "fromRoom": "powerhouse",
      "toRoom": "quay",
      "direction": "south",
      "locked": false
    },
    {
      "id": "powerhouse_gallery",
      "fromRoom": "powerhouse",
      "toRoom": "gallery",
      "direction": "up",
      "when": "mp_lighthouse_generator_powered",
      "locked": false
    },
    {
      "id": "gallery_powerhouse",
      "fromRoom": "gallery",
      "toRoom": "powerhouse",
      "direction": "down",
      "locked": false
    }
  ],
  "objects": [
    {
      "id": "worker_jacket",
      "name": "worker jacket",
      "description": "A lighthouse worker jacket. WEAR WORKER JACKET to keep the harmless watchman from identifying you as an unfamiliar visitor.",
      "article": "",
      "location": "quay",
      "aliases": [
        "jacket",
        "coat"
      ],
      "visible": true,
      "takeable": true,
      "droppable": true,
      "useGive": false,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": true,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": []
    },
    {
      "id": "brass_fuse",
      "name": "brass fuse",
      "description": "A replacement brass fuse. Carry it, then USE BRASS FUSE WITH GENERATOR.",
      "article": "",
      "location": "powerhouse",
      "aliases": [
        "fuse"
      ],
      "visible": true,
      "takeable": true,
      "droppable": true,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": []
    },
    {
      "id": "fuel_can",
      "name": "fuel can",
      "description": "One measured can of fuel provides eight operating turns. Carry it, then USE FUEL CAN WITH GENERATOR after repairing the generator.",
      "article": "",
      "location": "powerhouse",
      "aliases": [
        "fuel",
        "can"
      ],
      "visible": true,
      "takeable": true,
      "droppable": true,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": []
    },
    {
      "id": "generator",
      "name": "generator",
      "description": "A compact backup generator with an empty fuse holder and fuel tank. Repair it, refuel it, and USE GENERATOR to switch it on or off.",
      "article": "",
      "location": "powerhouse",
      "aliases": [
        "machine"
      ],
      "visible": true,
      "takeable": false,
      "droppable": false,
      "useGive": true,
      "container": false,
      "switchable": true,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": []
    },
    {
      "id": "safety_gate",
      "name": "safety gate",
      "description": "An electrical latch unlocks while the generator is powered. The lift control uses the same power state.",
      "article": "",
      "location": "powerhouse",
      "aliases": [
        "gate"
      ],
      "visible": true,
      "takeable": false,
      "droppable": false,
      "useGive": false,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": true,
      "lockKey": "",
      "events": []
    },
    {
      "id": "lift_control",
      "name": "lift control",
      "description": "USE LIFT CONTROL to reach the upper gallery while the generator is powered.",
      "article": "",
      "location": "powerhouse",
      "aliases": [
        "lift",
        "elevator"
      ],
      "visible": true,
      "takeable": false,
      "droppable": false,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": []
    },
    {
      "id": "return_lever",
      "name": "return lever",
      "description": "An emergency mechanical return. USE RETURN LEVER to return to the powerhouse even if generator power has failed.",
      "article": "",
      "location": "gallery",
      "aliases": [
        "lever",
        "return control"
      ],
      "visible": true,
      "takeable": false,
      "droppable": false,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": []
    },
    {
      "id": "signal_lens",
      "name": "signal lens",
      "description": "The spare signal lens requested by the keeper. Bring it back to the quay and give it to the keeper.",
      "article": "",
      "location": "gallery",
      "aliases": [
        "lens"
      ],
      "visible": true,
      "takeable": true,
      "droppable": true,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": []
    },
    {
      "id": "windup_toy",
      "name": "windup toy",
      "description": "A harmless windup distraction. Carry it and USE WINDUP TOY at the powerhouse to reduce suspicion. The toy is consumed when used.",
      "article": "",
      "location": "powerhouse",
      "aliases": [
        "toy",
        "distraction"
      ],
      "visible": true,
      "takeable": true,
      "droppable": true,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": []
    },
    {
      "id": "briefing",
      "name": "briefing",
      "description": "LIGHTHOUSE POWER WORKSHOP: Take and wear the worker jacket at the quay if you want the watchman to ignore you. At the powerhouse TAKE BRASS FUSE and TAKE FUEL CAN. USE BRASS FUSE WITH GENERATOR repairs it. USE FUEL CAN WITH GENERATOR adds eight operating turns of fuel. USE GENERATOR switches it on; USE LIFT CONTROL takes you upstairs while power is on. TAKE SIGNAL LENS, USE RETURN LEVER, and USE GENERATOR to switch the generator off and save fuel. Go SOUTH and GIVE SIGNAL LENS TO KEEPER. The machine consumes fuel only while running and automatically stops at zero. The emergency return lever always works, so power loss cannot trap you upstairs. OBJECTIVES, HINT and the Mechanics status panel explain progress. This is a safe workshop: the watchman raises an alarm state but never attacks.",
      "article": "",
      "location": "powerhouse",
      "aliases": [
        "instructions",
        "note"
      ],
      "visible": true,
      "takeable": false,
      "droppable": false,
      "useGive": false,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": [
        {
          "id": "read",
          "event": "read",
          "withTarget": "",
          "body": "print \"LIGHTHOUSE POWER WORKSHOP: Take and wear the worker jacket at the quay if you want the watchman to ignore you. At the powerhouse TAKE BRASS FUSE and TAKE FUEL CAN. USE BRASS FUSE WITH GENERATOR repairs it. USE FUEL CAN WITH GENERATOR adds eight operating turns of fuel. USE GENERATOR switches it on; USE LIFT CONTROL takes you upstairs while power is on. TAKE SIGNAL LENS, USE RETURN LEVER, and USE GENERATOR to switch the generator off and save fuel. Go SOUTH and GIVE SIGNAL LENS TO KEEPER. The machine consumes fuel only while running and automatically stops at zero. The emergency return lever always works, so power loss cannot trap you upstairs. OBJECTIVES, HINT and the Mechanics status panel explain progress. This is a safe workshop: the watchman raises an alarm state but never attacks.\""
        }
      ]
    }
  ],
  "npcs": [
    {
      "id": "keeper",
      "name": "keeper",
      "description": "The lighthouse keeper needs the signal lens from the upper gallery.",
      "location": "quay",
      "mobile": false,
      "aliases": [
        "lighthouse keeper"
      ],
      "onEnter": "",
      "onExamine": "",
      "onTalk": "print \"Please repair and fuel the generator, retrieve the signal lens upstairs, then bring it back to me. The emergency return always works.\"",
      "onAttack": "",
      "onDeath": "",
      "onFollow": "",
      "onAutoAttack": "",
      "onTrustChange": "",
      "onGive": "",
      "onBeforeTalk": "",
      "onAfterTalk": "",
      "onBeforeAttack": "",
      "onAfterAttack": "",
      "onDamage": "",
      "onHeal": "",
      "onMove": "",
      "onLeave": "",
      "followPlayer": false,
      "health": 100,
      "combatSide": "neutral",
      "autoFight": false,
      "attackPower": 10,
      "defense": 0,
      "trustLevel": 50,
      "conversationEnabled": false,
      "convGreeting": "",
      "convFarewell": "",
      "convTopics": [],
      "dialogues": [
        {
          "id": "default",
          "trigger": "default",
          "body": "print \"keeper looks at you in silence.\""
        }
      ]
    },
    {
      "id": "watchman",
      "name": "watchman",
      "description": "A harmless watchman notices unfamiliar visitors when the generator makes noise. The worker jacket is a recognizable disguise.",
      "location": "powerhouse",
      "mobile": false,
      "aliases": [
        "guard"
      ],
      "onEnter": "",
      "onExamine": "",
      "onTalk": "print \"Wear your worker jacket around operating equipment. I only raise an alarm; this workshop has no combat.\"",
      "onAttack": "",
      "onDeath": "",
      "onFollow": "",
      "onAutoAttack": "",
      "onTrustChange": "",
      "onGive": "",
      "onBeforeTalk": "",
      "onAfterTalk": "",
      "onBeforeAttack": "",
      "onAfterAttack": "",
      "onDamage": "",
      "onHeal": "",
      "onMove": "",
      "onLeave": "",
      "followPlayer": false,
      "health": 100,
      "combatSide": "neutral",
      "autoFight": false,
      "attackPower": 10,
      "defense": 0,
      "trustLevel": 50,
      "conversationEnabled": false,
      "convGreeting": "",
      "convFarewell": "",
      "convTopics": [],
      "dialogues": [
        {
          "id": "default",
          "trigger": "default",
          "body": "print \"watchman looks at you in silence.\""
        }
      ]
    }
  ],
  "objectiveSets": [
    {
      "id": "lighthouse_service",
      "name": "Lighthouse service",
      "playerLabel": "Restore the lighthouse service",
      "commands": "objectives journal logbook",
      "showInExport": true,
      "goals": [
        {
          "id": "repair",
          "label": "Repair the generator with its fuse",
          "type": "flag",
          "flagName": "",
          "flagValue": "true",
          "roomId": "",
          "roomName": "",
          "scoreTarget": 100,
          "countFlags": "",
          "prereqGoalId": "",
          "hidden": false,
          "tracking": {
            "category": "build",
            "group": "main",
            "description": "",
            "criteria": [
              {
                "kind": "recipe",
                "target": "mp_lighthouse_generator_repair"
              }
            ],
            "match": "all",
            "requiredCount": 1,
            "prerequisites": [],
            "optional": false,
            "exclusiveGroup": "",
            "availabilityConditions": [],
            "revealConditions": [],
            "mode": "achievement",
            "retroactive": true,
            "targetTurns": 5,
            "interruption": "reset",
            "deadlineTurns": 0,
            "failureConditions": [],
            "rewards": [],
            "failureActions": [],
            "completionText": "",
            "failureText": "",
            "linkedQuestId": "",
            "linkedStageId": "",
            "hintId": ""
          }
        },
        {
          "id": "refuel",
          "label": "Refuel the repaired generator",
          "type": "flag",
          "flagName": "",
          "flagValue": "true",
          "roomId": "",
          "roomName": "",
          "scoreTarget": 100,
          "countFlags": "",
          "prereqGoalId": "",
          "hidden": false,
          "tracking": {
            "category": "build",
            "group": "main",
            "description": "",
            "criteria": [
              {
                "kind": "recipe",
                "target": "mp_lighthouse_generator_refuel"
              }
            ],
            "match": "all",
            "requiredCount": 1,
            "prerequisites": [
              "repair"
            ],
            "optional": false,
            "exclusiveGroup": "",
            "availabilityConditions": [],
            "revealConditions": [],
            "mode": "achievement",
            "retroactive": true,
            "targetTurns": 5,
            "interruption": "reset",
            "deadlineTurns": 0,
            "failureConditions": [],
            "rewards": [],
            "failureActions": [],
            "completionText": "",
            "failureText": "",
            "linkedQuestId": "",
            "linkedStageId": "",
            "hintId": ""
          }
        },
        {
          "id": "operate",
          "label": "Operate the generator and power the gate",
          "type": "flag",
          "flagName": "",
          "flagValue": "true",
          "roomId": "",
          "roomName": "",
          "scoreTarget": 100,
          "countFlags": "",
          "prereqGoalId": "",
          "hidden": false,
          "tracking": {
            "category": "build",
            "group": "main",
            "description": "This remembers actual operation, so you may switch the generator off after returning.",
            "criteria": [
              {
                "kind": "flag",
                "target": "mp_lighthouse_generator_powered",
                "value": true
              }
            ],
            "match": "all",
            "requiredCount": 1,
            "prerequisites": [
              "refuel"
            ],
            "optional": false,
            "exclusiveGroup": "",
            "availabilityConditions": [],
            "revealConditions": [],
            "mode": "achievement",
            "retroactive": true,
            "targetTurns": 5,
            "interruption": "reset",
            "deadlineTurns": 0,
            "failureConditions": [],
            "rewards": [],
            "failureActions": [],
            "completionText": "",
            "failureText": "",
            "linkedQuestId": "",
            "linkedStageId": "",
            "hintId": ""
          }
        },
        {
          "id": "lens",
          "label": "Recover the signal lens upstairs",
          "type": "flag",
          "flagName": "",
          "flagValue": "true",
          "roomId": "",
          "roomName": "",
          "scoreTarget": 100,
          "countFlags": "",
          "prereqGoalId": "",
          "hidden": false,
          "tracking": {
            "category": "collect",
            "group": "main",
            "description": "",
            "criteria": [
              {
                "kind": "object_found",
                "target": "signal_lens",
                "targetKind": "object"
              }
            ],
            "match": "all",
            "requiredCount": 1,
            "prerequisites": [
              "operate"
            ],
            "optional": false,
            "exclusiveGroup": "",
            "availabilityConditions": [],
            "revealConditions": [],
            "mode": "achievement",
            "retroactive": true,
            "targetTurns": 5,
            "interruption": "reset",
            "deadlineTurns": 0,
            "failureConditions": [],
            "rewards": [],
            "failureActions": [],
            "completionText": "",
            "failureText": "",
            "linkedQuestId": "",
            "linkedStageId": "",
            "hintId": ""
          }
        },
        {
          "id": "delivery",
          "label": "Hand the lens to the keeper",
          "type": "flag",
          "flagName": "",
          "flagValue": "true",
          "roomId": "",
          "roomName": "",
          "scoreTarget": 100,
          "countFlags": "",
          "prereqGoalId": "",
          "hidden": false,
          "tracking": {
            "category": "deliver",
            "group": "main",
            "description": "",
            "criteria": [
              {
                "kind": "delivery",
                "target": "signal_lens",
                "secondary": "keeper",
                "targetKind": "object"
              }
            ],
            "match": "all",
            "requiredCount": 1,
            "prerequisites": [
              "lens"
            ],
            "optional": false,
            "exclusiveGroup": "",
            "availabilityConditions": [],
            "revealConditions": [],
            "mode": "achievement",
            "retroactive": true,
            "targetTurns": 5,
            "interruption": "reset",
            "deadlineTurns": 0,
            "failureConditions": [],
            "rewards": [],
            "failureActions": [],
            "completionText": "",
            "failureText": "",
            "linkedQuestId": "",
            "linkedStageId": "",
            "hintId": ""
          }
        },
        {
          "id": "briefing",
          "label": "Read the workshop briefing",
          "type": "flag",
          "flagName": "",
          "flagValue": "true",
          "roomId": "",
          "roomName": "",
          "scoreTarget": 100,
          "countFlags": "",
          "prereqGoalId": "",
          "hidden": false,
          "tracking": {
            "category": "investigate",
            "group": "bonus",
            "description": "",
            "criteria": [
              {
                "kind": "fact",
                "target": "briefing",
                "event": "read",
                "targetKind": "object"
              }
            ],
            "match": "all",
            "requiredCount": 1,
            "prerequisites": [],
            "optional": true,
            "exclusiveGroup": "",
            "availabilityConditions": [],
            "revealConditions": [],
            "mode": "achievement",
            "retroactive": true,
            "targetTurns": 5,
            "interruption": "reset",
            "deadlineTurns": 0,
            "failureConditions": [],
            "rewards": [],
            "failureActions": [],
            "completionText": "",
            "failureText": "",
            "linkedQuestId": "",
            "linkedStageId": "",
            "hintId": ""
          }
        }
      ],
      "onCompleteBody": "print \"Lighthouse service complete! Your real repair, fuel use, power connection and accepted lens delivery agree with the mission journal. You earn 100 points and 10 harbor coins. Restart to try running out of fuel, switching off early, or saving and loading.\"\nend_game",
      "settings": {
        "description": "Repair and operate the real generator, recover the signal lens, and make an accepted delivery to the keeper.",
        "pauseJournal": true,
        "notifications": true,
        "panelCollapsed": false,
        "completionConditions": [
          {
            "kind": "room",
            "target": "quay",
            "operator": "==",
            "value": true
          }
        ],
        "rewards": [
          {
            "kind": "score",
            "value": 100
          },
          {
            "kind": "money",
            "value": 10
          }
        ],
        "failureConditions": [],
        "failureActions": [],
        "failureText": ""
      }
    }
  ],
  "activeMechanics": [],
  "verbAliases": [],
  "scripts": [
    {
      "id": "on_game_start",
      "name": "On Game Start",
      "description": "Runs automatically when the game starts.",
      "body": "goto: quay",
      "kind": "global"
    },
    {
      "id": "on_turn_end",
      "name": "on_turn_end",
      "description": "Ordinary turn lifecycle.",
      "body": "",
      "kind": "global"
    }
  ],
  "worldEvents": [],
  "customMechanicDefs": [],
  "savedMechanicTemplates": [],
  "gameOutliner": {
    "title": "The Island of Failed Prophets",
    "hook": "You are invited to a remote island gathering of disgraced doomsday prophets, but when one of them predicts a final catastrophe before sunrise, the island turns into a deadly puzzle of lies, traps, rituals, and hidden machinery.",
    "coreIdea": "The player is trapped on Saint Orison Island with failed prophets, cult leaders, fake mystics, disgraced scientists, wealthy believers, and dangerous followers. A new prophecy claims that before sunrise the island will burn, the sea will rise, and only the true believer will leave alive. The player investigates, survives escalating danger, builds NPC relationships, uncovers the truth, stops the final ritual, and escapes before dawn.",
    "playerRole": "You are a skeptical investigator and writer known for exposing cults, false prophets, fake miracles, and end-times frauds. You begin confident and rational, but the island is designed to make you doubt what is staged and what might be real.",
    "mainObjective": "Survive the island, expose the false prophecy, stop the final ritual, rescue key allies, and escape before sunrise.",
    "secondaryObjectives": "Repair the radio tower and call for help. Rescue the sidekick if captured. Collect evidence proving the prophecy is staged. Discover who invited you to the island. Learn the mentor's hidden connection to the island. Expose the true villain. Escape with enough proof to destroy the cult network. Find the secret ending by proving the prophecy may be partly real.",
    "toneGenre": "Genre: mystery, survival horror, psychological thriller, cult investigation.\nTone: dark, tense, strange, suspicious, atmospheric.\nPerspective: second person, present tense.\nStyle: exploration-heavy text adventure with story-driven puzzles, NPC relationships, survival mechanics, clue gathering, danger events, and combat.",
    "settingOverview": "Remote Saint Orison Island: dock, guest lodge, dining hall, chapel, Prophets' Hall, observatory, gardens, radio tower, sea caves, maintenance tunnels, underground bunker, and burning shrine. The island should feel like a classic text adventure map with connected rooms, locked areas, hidden exits, puzzles, danger zones, and meaningful objects.",
    "storyTheme": "Main theme: What happens when people would rather believe a terrifying lie than face an ordinary truth?\n\nSecondary themes: fear as a weapon, cult manipulation, shame and redemption, skepticism versus faith, truth versus performance, the need to be believed, and the danger of charismatic leaders.",
    "mainConflict": "The player believes the prophecy is fake. The island is designed to make the player doubt that belief. The enemies want the player silenced, converted, discredited, or killed. The mystery is whether the prophecy is a fraud, staged ritual, murder plot, or something partly real.",
    "coreMechanics": "Health, fear meter, trust system, evidence score, time until dawn, and combat.\n\nFear may distort descriptions or choices. Trust unlocks help and secrets. Evidence improves endings. Time phases move from arrival to sunrise.",
    "mainNpcs": "Sidekick: Mara Voss, a documentary filmmaker and secret investigator.\nMentor: Dr. Elias Crowe, a former psychologist and cult-deprogramming expert.\nAllies: Nina Vale, Brother Amos, Tessa Quill.\nNeutral: Boat Captain, Archivist, Silent Gardener, Rich Patron.\nEnemies: Mother Sable, Jonah Flint, White-Robed Disciples, Masked Bell-Ringer, the True Architect.",
    "objectCategories": "Key objects: rusted key, brass chapel key, observatory crank, bunker access card.\nSurvival: bandages, clean water, lantern oil, coffee tin, matches, raincoat, rope.\nClue objects: torn prophecy page, burned journal, wet invitation, old photograph, audio tape, star chart, guest registry, payment ledger.\nWeapons: walking stick, kitchen knife, broken bottle, flare gun, rusted spear.\nPuzzle, trade, and dangerous objects as needed.",
    "mainRooms": "Dock: arrival — no easy way back.\nGuest Lodge: safe hub and early clues.\nDining Hall: prophecy announced, first danger.\nProphets' Hall: history of failed predictions.\nChapel: ritual room and bell puzzle.\nObservatory: false blood moon.\nGarden Maze: navigation/fear puzzle.\nRadio Tower: call for help.\nSea Caves: tide danger.\nMaintenance Tunnels: staged miracles revealed.\nUnderground Bunker: truth of the prophecy.\nBurning Shrine: final confrontation.",
    "puzzleDesign": "Example — The Chapel Bell Sequence:\nLocation: Chapel of the Last Hour.\nRequired objects: silver bell, torn hymn page, wax seal.\nClues: hymn page gives numbers; floor symbols show order.\nSolution: ring the bell according to the hymn pattern while standing on the correct symbol.\nFailure: chapel locks, fear rises, Bell-Ringer may appear.\nReward: hidden crypt stairs open.",
    "eventDesign": "Example events: The First Bell, The Poisoned Toast, The False Moon, Mara's Capture, The Rising Tide, The Shrine Fire.\n\nEach event should have a trigger, player choices, consequences, and story effect.",
    "combatDesign": "Example — White-Robed Disciple:\nLocation: Radio Tower or tunnels.\nWeapon: club or knife. Danger: medium.\nOptions: fight, flee, distract, use flare, call Mara for help, hide in maintenance closet.\nVictory reward: patrol key, robe disguise, or restricted path access.\nFailure penalty: health loss, capture, item loss, or fear increase.",
    "dialogueDesign": "Dialogue should reveal story, build relationships, unlock clues, and create consequences.\n\nTopics may include island, prophecy, specific NPCs, accusations, showing evidence, offering items, requesting help, threatening, comforting, lying, or telling the truth.\n\nExample: showing Tessa the red glass disc unlocks her explanation of the false blood moon effect.",
    "scoringSystem": "+5 useful object found\n+10 minor puzzle solved\n+20 major puzzle solved\n+25 rescue an ally\n+30 expose a fake omen\n+50 stop the final ritual\n+50 escape with evidence\n\nNegative score for: harming innocents, abandoning sidekick, destroying evidence, or killing when avoidable.",
    "endings": "Best: expose prophecy, save Mara, stop ritual, escape with evidence.\nGood: escape and stop ritual but lack enough proof.\nDark: escape alone while the island burns.\nCult: fail the final mind puzzle and become the new prophet.\nDeath: die from fire, tide, combat, poison, or final trap.\nSecret: prove most was fake but discover one part was real.",
    "builderChecklist": "Before building, answer:\n• What is the main objective?\n• What is the locked setting?\n• Who is the sidekick?\n• Who is the mentor?\n• Who are allies, neutrals, enemies?\n• What objects are essential, optional, dangerous, or misleading?\n• What are the rooms, puzzles, traps, combat encounters, mechanics, and endings?\n• What is the first scene the player experiences?\n• What is the emotional core of the story?",
    "finalNotes": "What makes this idea exciting as a text adventure: the island setting creates a natural locked environment, the NPC network rewards exploration and relationship-building, and the prophecy mystery gives the player a reason to investigate every room.\n\nBuild first: the core island loop — dock, lodge, dining hall, chapel — with working NPCs and the evidence system."
  },
  "customRoomTemplates": [],
  "customObjectTemplates": [],
  "customNpcTemplates": [],
  "customSavedScripts": []
}
