{
  "version": "1.1",
  "name": "Security Door Requires Keycard and Power",
  "startRoom": "lesson_entry",
  "author": "TAGMaker",
  "description": "Restore power, then use a carried keycard with the security door. Swiping the card before power returns changes nothing.",
  "playerAppearance": {
    "version": 1,
    "layout": "modern",
    "font": "sans",
    "colorScheme": "light",
    "textSize": 18,
    "lineHeight": 1.6,
    "readingWidth": 80,
    "quietReading": false,
    "mapMode": "discovered",
    "panels": {
      "inventory": true,
      "map": true,
      "objectives": true,
      "status": true,
      "words": true
    },
    "picture": {
      "visible": true,
      "fit": "contain",
      "focalX": 50,
      "focalY": 50
    },
    "commands": {
      "visible": true,
      "standard": [
        "look",
        "search",
        "inventory",
        "help"
      ],
      "custom": []
    },
    "words": []
  },
  "created": "2026-11-01T00:00:00.000Z",
  "modified": "2026-11-01T00:00:00.000Z",
  "files": [
    {
      "path": "rooms/lesson_entry.taml",
      "content": "room lesson_entry\n  blocked north: \"The security door blocks the way. Use the lab keycard with it first.\"\n  exit north: lesson_beyond when: lesson_open\n  name: \"Security Lobby\"\n  description: \"The security door blocks the way north. Take the lab keycard, then use lab keycard with security door. Use the power switch first.\"\n  dark: false\nend"
    },
    {
      "path": "rooms/lesson_beyond.taml",
      "content": "room lesson_beyond\n  exit south: lesson_entry\n  name: \"Laboratory\"\n  description: \"The passage is open. You can return south.\"\n  dark: false\nend"
    },
    {
      "path": "objects/lesson_tool.taml",
      "content": "object lesson_tool\n  name: \"lab keycard\"\n  description: \"A lab keycard for this obstacle. Take it before using it.\"\n  location: lesson_entry\n  takeable: true\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/lesson_gate.taml",
      "content": "object lesson_gate\n  name: \"security door\"\n  description: \"The security door blocks the way north. Use the lab keycard with it after restoring power.\"\n  location: lesson_entry\n  droppable: false\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/lesson_switch.taml",
      "content": "object lesson_switch\n  name: \"power switch\"\n  description: \"Use this switch to restore power to the door reader.\"\n  location: lesson_entry\n  droppable: false\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/sample_field_journal.taml",
      "content": "object sample_field_journal\n  name: \"field journal\"\n  description: \"Use this journal when you have completed the recipe to record your success. You can also keep exploring before you finish.\"\n  location: inventory\n  aliases: [\"journal\"]\n  takeable: true\n  droppable: false\n  use_give: true\n  weight: 0.1\nend"
    }
  ],
  "story": {
    "version": 1,
    "states": [
      {
        "id": "lesson_open",
        "name": "open",
        "description": "Progress remembered by this recipe.",
        "type": "boolean",
        "initial": false
      },
      {
        "id": "lesson_powered",
        "name": "powered",
        "description": "Progress remembered by this recipe.",
        "type": "boolean",
        "initial": false
      }
    ],
    "rules": [
      {
        "id": "lesson_restore_power",
        "name": "restore power",
        "enabled": true,
        "trigger": {
          "kind": "object",
          "target": "lesson_switch",
          "event": "use"
        },
        "match": "all",
        "conditions": [],
        "actions": [
          {
            "kind": "state",
            "target": "lesson_powered",
            "value": true
          },
          {
            "kind": "message",
            "value": "The reader lights up. You can now use the keycard with the security door."
          }
        ],
        "otherwise": "",
        "once": true,
        "repeatText": "The power is already on."
      },
      {
        "id": "sample_finish",
        "name": "Record the completed expedition",
        "enabled": true,
        "trigger": {
          "kind": "object",
          "target": "sample_field_journal",
          "event": "use"
        },
        "match": "all",
        "conditions": [
          {
            "kind": "state",
            "target": "lesson_open",
            "operator": "==",
            "value": true
          }
        ],
        "actions": [
          {
            "kind": "message",
            "value": "You cleared the security door and made the passage usable. You record the result in your field journal. Your expedition is complete."
          },
          {
            "kind": "score",
            "value": 100
          },
          {
            "kind": "end",
            "value": "Your expedition is complete."
          }
        ],
        "otherwise": "Your expedition is not complete yet. Follow the room clues, then use the field journal to record your success.",
        "once": true
      }
    ],
    "features": {
      "version": 1,
      "recipes": [
        {
          "id": "lesson_clear_obstacle",
          "name": "clear obstacle",
          "enabled": true,
          "verbs": [
            "use"
          ],
          "unordered": true,
          "inputs": [
            {
              "objectId": "lesson_tool",
              "disposition": "retain"
            }
          ],
          "tools": [],
          "target": {
            "kind": "object",
            "id": "lesson_gate"
          },
          "match": "all",
          "conditions": [
            {
              "kind": "state",
              "target": "lesson_powered",
              "operator": "==",
              "value": true
            }
          ],
          "actions": [
            {
              "kind": "state",
              "target": "lesson_open",
              "value": true
            }
          ],
          "once": true,
          "success": "You swipe the lab keycard through the reader. The security door slides open.",
          "failure": "Carry the lab keycard. Restore power with the power switch before using it with the security door.",
          "repeat": "This obstacle is already cleared. The way north remains open."
        }
      ]
    }
  },
  "cookbookRecipes": [
    {
      "version": 1,
      "settings": {
        "instance": "lesson",
        "recipeId": "11-security-door-requires-keycard-and-power",
        "choices": {
          "entry": {
            "existing": "",
            "name": "Security Lobby",
            "description": "The security door blocks the way north. Take the lab keycard, then use lab keycard with security door. Use the power switch first."
          },
          "beyond": {
            "existing": "",
            "name": "Laboratory",
            "description": "The passage is open. You can return south."
          },
          "tool": {
            "existing": "",
            "name": "lab keycard",
            "description": "A lab keycard for this obstacle. Take it before using it."
          },
          "gate": {
            "existing": "",
            "name": "security door",
            "description": "The security door blocks the way north. Use the lab keycard with it after restoring power."
          },
          "switch": {
            "existing": "",
            "name": "power switch",
            "description": "Use this switch to restore power to the door reader."
          }
        },
        "values": {
          "success": "You swipe the lab keycard through the reader. The security door slides open.",
          "failure": "Carry the lab keycard. Restore power with the power switch before using it with the security door.",
          "repeat": "This obstacle is already cleared. The way north remains open.",
          "blocked": "The security door blocks the way. Use the lab keycard with it first.",
          "power": "The reader lights up. You can now use the keycard with the security door."
        },
        "reuseRoutes": {}
      },
      "owned": [
        {
          "path": "files",
          "key": "rooms/lesson_entry.taml",
          "after": {
            "path": "rooms/lesson_entry.taml",
            "name": "lesson_entry.taml",
            "content": "room lesson_entry\n  blocked north: \"The security door blocks the way. Use the lab keycard with it first.\"\n  exit north: lesson_beyond when: lesson_open\n  name: \"Security Lobby\"\n  description: \"The security door blocks the way north. Take the lab keycard, then use lab keycard with security door. Use the power switch first.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "rooms/lesson_beyond.taml",
          "after": {
            "path": "rooms/lesson_beyond.taml",
            "name": "lesson_beyond.taml",
            "content": "room lesson_beyond\n  exit south: lesson_entry\n  name: \"Laboratory\"\n  description: \"The passage is open. You can return south.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_tool.taml",
          "after": {
            "path": "objects/lesson_tool.taml",
            "name": "lesson_tool.taml",
            "content": "object lesson_tool\n  name: \"lab keycard\"\n  description: \"A lab keycard for this obstacle. Take it before using it.\"\n  location: lesson_entry\n  takeable: true\n  use_give: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_gate.taml",
          "after": {
            "path": "objects/lesson_gate.taml",
            "name": "lesson_gate.taml",
            "content": "object lesson_gate\n  name: \"security door\"\n  description: \"The security door blocks the way north. Use the lab keycard with it after restoring power.\"\n  location: lesson_entry\n  droppable: false\n  use_give: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_switch.taml",
          "after": {
            "path": "objects/lesson_switch.taml",
            "name": "lesson_switch.taml",
            "content": "object lesson_switch\n  name: \"power switch\"\n  description: \"Use this switch to restore power to the door reader.\"\n  location: lesson_entry\n  droppable: false\n  use_give: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "objects",
          "key": "lesson_tool",
          "after": {
            "id": "lesson_tool",
            "name": "lab keycard",
            "description": "A lab keycard for this obstacle. Take it before using it.",
            "article": "",
            "location": "lesson_entry",
            "aliases": [],
            "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": []
          }
        },
        {
          "path": "objects",
          "key": "lesson_gate",
          "after": {
            "id": "lesson_gate",
            "name": "security door",
            "description": "The security door blocks the way north. Use the lab keycard with it after restoring power.",
            "article": "",
            "location": "lesson_entry",
            "aliases": [],
            "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": []
          }
        },
        {
          "path": "objects",
          "key": "lesson_switch",
          "after": {
            "id": "lesson_switch",
            "name": "power switch",
            "description": "Use this switch to restore power to the door reader.",
            "article": "",
            "location": "lesson_entry",
            "aliases": [],
            "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": []
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_entry",
          "after": {
            "id": "lesson_entry",
            "name": "Security Lobby",
            "description": "The security door blocks the way north. Take the lab keycard, then use lab keycard with security door. Use the power switch first.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 100,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "blockedDescriptions": {
              "north": "The security door blocks the way. Use the lab keycard with it first."
            }
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_beyond",
          "after": {
            "id": "lesson_beyond",
            "name": "Laboratory",
            "description": "The passage is open. You can return south.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 320,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "blockedDescriptions": {}
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_through",
          "after": {
            "id": "lesson_route_through",
            "fromRoom": "lesson_entry",
            "toRoom": "lesson_beyond",
            "direction": "north",
            "locked": false,
            "when": "lesson_open"
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_return",
          "after": {
            "id": "lesson_route_return",
            "fromRoom": "lesson_beyond",
            "toRoom": "lesson_entry",
            "direction": "south",
            "locked": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_open",
          "after": {
            "id": "lesson_open",
            "name": "open",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_powered",
          "after": {
            "id": "lesson_powered",
            "name": "powered",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.rules",
          "key": "lesson_restore_power",
          "after": {
            "id": "lesson_restore_power",
            "name": "restore power",
            "enabled": true,
            "trigger": {
              "kind": "object",
              "target": "lesson_switch",
              "event": "use"
            },
            "match": "all",
            "conditions": [],
            "actions": [
              {
                "kind": "state",
                "target": "lesson_powered",
                "value": true
              },
              {
                "kind": "message",
                "value": "The reader lights up. You can now use the keycard with the security door."
              }
            ],
            "otherwise": "",
            "once": true,
            "repeatText": "The power is already on."
          }
        },
        {
          "path": "manifest.story.features.recipes",
          "key": "lesson_clear_obstacle",
          "after": {
            "id": "lesson_clear_obstacle",
            "name": "clear obstacle",
            "enabled": true,
            "verbs": [
              "use"
            ],
            "unordered": true,
            "inputs": [
              {
                "objectId": "lesson_tool",
                "disposition": "retain"
              }
            ],
            "tools": [],
            "target": {
              "kind": "object",
              "id": "lesson_gate"
            },
            "match": "all",
            "conditions": [
              {
                "kind": "state",
                "target": "lesson_powered",
                "operator": "==",
                "value": true
              }
            ],
            "actions": [
              {
                "kind": "state",
                "target": "lesson_open",
                "value": true
              }
            ],
            "once": true,
            "success": "You swipe the lab keycard through the reader. The security door slides open.",
            "failure": "Carry the lab keycard. Restore power with the power switch before using it with the security door.",
            "repeat": "This obstacle is already cleared. The way north remains open."
          }
        }
      ]
    }
  ],
  "creatorNotes": "Restore power, then use a carried keycard with the security door. Swiping the card before power returns changes nothing.\nOpen Help → Cookbook → Security Door Requires Keycard and Power → Start this recipe to inspect its saved settings. The field journal and 100-point ending belong only to the sample game.\nCommands: north; use lab keycard with security door; take lab keycard; use lab keycard with security door; use power switch; use lab keycard with security door; use lab keycard with security door; north; south; use field journal",
  "mapRooms": [
    {
      "id": "lesson_entry",
      "name": "Security Lobby",
      "description": "The security door blocks the way north. Take the lab keycard, then use lab keycard with security door. Use the power switch first.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 100,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "blockedDescriptions": {
        "north": "The security door blocks the way. Use the lab keycard with it first."
      }
    },
    {
      "id": "lesson_beyond",
      "name": "Laboratory",
      "description": "The passage is open. You can return south.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 320,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "blockedDescriptions": {}
    }
  ],
  "mapExits": [
    {
      "id": "lesson_route_through",
      "fromRoom": "lesson_entry",
      "toRoom": "lesson_beyond",
      "direction": "north",
      "locked": false,
      "when": "lesson_open"
    },
    {
      "id": "lesson_route_return",
      "fromRoom": "lesson_beyond",
      "toRoom": "lesson_entry",
      "direction": "south",
      "locked": false
    }
  ],
  "objects": [
    {
      "id": "lesson_tool",
      "name": "lab keycard",
      "description": "A lab keycard for this obstacle. Take it before using it.",
      "article": "",
      "location": "lesson_entry",
      "aliases": [],
      "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": "lesson_gate",
      "name": "security door",
      "description": "The security door blocks the way north. Use the lab keycard with it after restoring power.",
      "article": "",
      "location": "lesson_entry",
      "aliases": [],
      "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": "lesson_switch",
      "name": "power switch",
      "description": "Use this switch to restore power to the door reader.",
      "article": "",
      "location": "lesson_entry",
      "aliases": [],
      "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": "sample_field_journal",
      "name": "field journal",
      "description": "Use this journal when you have completed the recipe to record your success. You can also keep exploring before you finish.",
      "article": "",
      "location": "inventory",
      "aliases": [
        "journal"
      ],
      "visible": true,
      "takeable": true,
      "droppable": false,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": []
    }
  ],
  "npcs": [],
  "activeMechanics": [],
  "verbAliases": [],
  "scripts": [],
  "worldEvents": [],
  "customMechanicDefs": [],
  "savedMechanicTemplates": [],
  "objectiveSets": [],
  "gameOutliner": {},
  "customRoomTemplates": [],
  "customObjectTemplates": [],
  "customNpcTemplates": [],
  "customSavedScripts": [],
  "requiredCapabilities": [
    "story-rules-v1",
    "creator-features-v1"
  ]
}
