{
  "version": "1.1",
  "name": "Limited Reveal Spell",
  "startRoom": "lesson_room",
  "author": "TAGMaker",
  "description": "A carried reveal scroll has two real charges. USE, CAST or INVOKE reveals an existing hidden gem. Each successful cast spends one charge; at zero the scroll crumbles. Trying without carrying it spends 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_room.taml",
      "content": "room lesson_room\n  name: \"Scroll Chamber\"\n  description: \"Take the reveal scroll, then CAST REVEAL SCROLL. It reveals a hidden gem and has two charges.\"\n  dark: false\nend"
    },
    {
      "path": "objects/lesson_scroll.taml",
      "content": "object lesson_scroll\n  name: \"reveal scroll\"\n  description: \"A two-charge revealing spell.\"\n  location: lesson_room\n  takeable: true\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/lesson_gem.taml",
      "content": "object lesson_gem\n  name: \"hidden gem\"\n  description: \"A real gem revealed by the scroll.\"\n  location: lesson_room\n  visible: false\n  takeable: 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_revealed",
        "name": "revealed",
        "description": "Progress remembered by this recipe.",
        "type": "boolean",
        "initial": false
      }
    ],
    "rules": [
      {
        "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_revealed",
            "operator": "==",
            "value": true
          }
        ],
        "actions": [
          {
            "kind": "message",
            "value": "The finite scroll revealed the existing gem without duplicating it. 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,
      "mechanics": [
        {
          "version": 1,
          "id": "lesson_spell",
          "name": "Limited reveal scroll",
          "description": "Limited reveal scroll",
          "category": "Creator Cookbook",
          "enabled": true,
          "autoStart": true,
          "inputs": [],
          "variables": [
            {
              "id": "charges",
              "name": "Charges left",
              "type": "number",
              "initial": 2,
              "min": 0,
              "max": 100,
              "showInPlayer": true
            }
          ],
          "scope": {
            "kind": "global",
            "rooms": []
          },
          "initialPhase": "",
          "phases": [],
          "rules": [
            {
              "id": "cast",
              "name": "cast",
              "enabled": true,
              "trigger": {
                "kind": "object",
                "target": "lesson_scroll",
                "event": "use"
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "local",
                    "target": "charges",
                    "operator": ">",
                    "value": 0
                  },
                  {
                    "kind": "rule",
                    "condition": {
                      "kind": "inventory",
                      "target": "lesson_scroll",
                      "operator": "==",
                      "value": true
                    }
                  }
                ]
              },
              "actions": [
                {
                  "kind": "reveal",
                  "target": "lesson_gem"
                },
                {
                  "kind": "state",
                  "target": "lesson_revealed",
                  "value": true
                },
                {
                  "kind": "message",
                  "value": "The scroll reveals the hidden gem."
                },
                {
                  "kind": "local",
                  "target": "charges",
                  "operation": "subtract",
                  "value": 1
                }
              ],
              "otherwise": [
                {
                  "kind": "message",
                  "value": "Carry the scroll before casting it."
                }
              ],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 20
            },
            {
              "id": "spent",
              "name": "spent",
              "enabled": true,
              "trigger": {
                "kind": "turn",
                "target": "",
                "event": ""
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "local",
                    "target": "charges",
                    "operator": "==",
                    "value": 0
                  }
                ]
              },
              "actions": [
                {
                  "kind": "place",
                  "target": "lesson_scroll",
                  "destination": "nowhere"
                },
                {
                  "kind": "message",
                  "value": "The last charge is spent. The scroll crumbles."
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 1,
              "probability": 1,
              "priority": 10
            }
          ]
        }
      ]
    }
  },
  "cookbookRecipes": [
    {
      "version": 1,
      "settings": {
        "instance": "lesson",
        "recipeId": "reference-spell",
        "choices": {
          "room": {
            "existing": "",
            "name": "Scroll Chamber",
            "description": "Take the reveal scroll, then CAST REVEAL SCROLL. It reveals a hidden gem and has two charges."
          },
          "scroll": {
            "existing": "",
            "name": "reveal scroll",
            "description": "A two-charge revealing spell."
          },
          "gem": {
            "existing": "",
            "name": "hidden gem",
            "description": "A real gem revealed by the scroll."
          }
        },
        "values": {
          "cast": "The scroll reveals the hidden gem.",
          "empty": "The last charge is spent. The scroll crumbles.",
          "charges": 2
        },
        "reuseRoutes": {}
      },
      "owned": [
        {
          "path": "files",
          "key": "rooms/lesson_room.taml",
          "after": {
            "path": "rooms/lesson_room.taml",
            "name": "lesson_room.taml",
            "content": "room lesson_room\n  name: \"Scroll Chamber\"\n  description: \"Take the reveal scroll, then CAST REVEAL SCROLL. It reveals a hidden gem and has two charges.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_scroll.taml",
          "after": {
            "path": "objects/lesson_scroll.taml",
            "name": "lesson_scroll.taml",
            "content": "object lesson_scroll\n  name: \"reveal scroll\"\n  description: \"A two-charge revealing spell.\"\n  location: lesson_room\n  takeable: true\n  use_give: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_gem.taml",
          "after": {
            "path": "objects/lesson_gem.taml",
            "name": "lesson_gem.taml",
            "content": "object lesson_gem\n  name: \"hidden gem\"\n  description: \"A real gem revealed by the scroll.\"\n  location: lesson_room\n  visible: false\n  takeable: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "objects",
          "key": "lesson_scroll",
          "after": {
            "id": "lesson_scroll",
            "name": "reveal scroll",
            "description": "A two-charge revealing spell.",
            "article": "",
            "location": "lesson_room",
            "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_gem",
          "after": {
            "id": "lesson_gem",
            "name": "hidden gem",
            "description": "A real gem revealed by the scroll.",
            "article": "",
            "location": "lesson_room",
            "aliases": [],
            "visible": false,
            "takeable": true,
            "droppable": true,
            "useGive": false,
            "container": false,
            "switchable": false,
            "edible": false,
            "drinkable": false,
            "wearable": false,
            "weapon": false,
            "weight": 0.1,
            "locked": false,
            "lockKey": "",
            "events": []
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_room",
          "after": {
            "id": "lesson_room",
            "name": "Scroll Chamber",
            "description": "Take the reveal scroll, then CAST REVEAL SCROLL. It reveals a hidden gem and has two charges.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 100,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000"
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_revealed",
          "after": {
            "id": "lesson_revealed",
            "name": "revealed",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.features.mechanics",
          "key": "lesson_spell",
          "after": {
            "version": 1,
            "id": "lesson_spell",
            "name": "Limited reveal scroll",
            "description": "Limited reveal scroll",
            "category": "Creator Cookbook",
            "enabled": true,
            "autoStart": true,
            "inputs": [],
            "variables": [
              {
                "id": "charges",
                "name": "Charges left",
                "type": "number",
                "initial": 2,
                "min": 0,
                "max": 100,
                "showInPlayer": true
              }
            ],
            "scope": {
              "kind": "global",
              "rooms": []
            },
            "initialPhase": "",
            "phases": [],
            "rules": [
              {
                "id": "cast",
                "name": "cast",
                "enabled": true,
                "trigger": {
                  "kind": "object",
                  "target": "lesson_scroll",
                  "event": "use"
                },
                "conditions": {
                  "match": "all",
                  "conditions": [
                    {
                      "kind": "local",
                      "target": "charges",
                      "operator": ">",
                      "value": 0
                    },
                    {
                      "kind": "rule",
                      "condition": {
                        "kind": "inventory",
                        "target": "lesson_scroll",
                        "operator": "==",
                        "value": true
                      }
                    }
                  ]
                },
                "actions": [
                  {
                    "kind": "reveal",
                    "target": "lesson_gem"
                  },
                  {
                    "kind": "state",
                    "target": "lesson_revealed",
                    "value": true
                  },
                  {
                    "kind": "message",
                    "value": "The scroll reveals the hidden gem."
                  },
                  {
                    "kind": "local",
                    "target": "charges",
                    "operation": "subtract",
                    "value": 1
                  }
                ],
                "otherwise": [
                  {
                    "kind": "message",
                    "value": "Carry the scroll before casting it."
                  }
                ],
                "initialDelay": 0,
                "interval": 1,
                "cooldown": 0,
                "maxUses": 0,
                "probability": 1,
                "priority": 20
              },
              {
                "id": "spent",
                "name": "spent",
                "enabled": true,
                "trigger": {
                  "kind": "turn",
                  "target": "",
                  "event": ""
                },
                "conditions": {
                  "match": "all",
                  "conditions": [
                    {
                      "kind": "local",
                      "target": "charges",
                      "operator": "==",
                      "value": 0
                    }
                  ]
                },
                "actions": [
                  {
                    "kind": "place",
                    "target": "lesson_scroll",
                    "destination": "nowhere"
                  },
                  {
                    "kind": "message",
                    "value": "The last charge is spent. The scroll crumbles."
                  }
                ],
                "otherwise": [],
                "initialDelay": 0,
                "interval": 1,
                "cooldown": 0,
                "maxUses": 1,
                "probability": 1,
                "priority": 10
              }
            ]
          }
        }
      ]
    }
  ],
  "creatorNotes": "A carried reveal scroll has two real charges. USE, CAST or INVOKE reveals an existing hidden gem. Each successful cast spends one charge; at zero the scroll crumbles. Trying without carrying it spends nothing.\nOpen Help → Cookbook → Limited Reveal Spell → Start this recipe to inspect its saved settings. The field journal and 100-point ending belong only to the sample game.\nCommands: use reveal scroll; take reveal scroll; cast reveal scroll; take hidden gem; invoke reveal scroll; cast reveal scroll; use field journal",
  "mapRooms": [
    {
      "id": "lesson_room",
      "name": "Scroll Chamber",
      "description": "Take the reveal scroll, then CAST REVEAL SCROLL. It reveals a hidden gem and has two charges.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 100,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000"
    }
  ],
  "mapExits": [],
  "objects": [
    {
      "id": "lesson_scroll",
      "name": "reveal scroll",
      "description": "A two-charge revealing spell.",
      "article": "",
      "location": "lesson_room",
      "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_gem",
      "name": "hidden gem",
      "description": "A real gem revealed by the scroll.",
      "article": "",
      "location": "lesson_room",
      "aliases": [],
      "visible": false,
      "takeable": true,
      "droppable": true,
      "useGive": false,
      "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",
    "mechanics-builder-v1"
  ]
}
