{
  "version": "1.1",
  "name": "Water Restores Thirst",
  "startRoom": "lesson_room",
  "author": "TAGMaker",
  "description": "Drinking from a carried water flask restores a bounded hydration meter by 40. The empty flask stays in inventory, its description changes, and it cannot restore water twice.",
  "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: \"Dry Trail\"\n  description: \"Take and drink the water flask. Its empty container stays with you.\"\n  dark: false\nend"
    },
    {
      "path": "objects/lesson_flask.taml",
      "content": "object lesson_flask\n  name: \"water flask\"\n  description: \"A flask of fresh water.\"\n  smart_description: \"{\\\"version\\\":1,\\\"parts\\\":[{\\\"type\\\":\\\"conditional\\\",\\\"id\\\":\\\"lesson_flask_text\\\",\\\"when\\\":{\\\"kind\\\":\\\"flag_equals\\\",\\\"flag\\\":\\\"lesson_empty\\\",\\\"value\\\":true},\\\"then\\\":\\\"The water flask is empty.\\\",\\\"otherwise\\\":\\\"The flask contains fresh water.\\\"}]}\"\n  location: lesson_room\n  takeable: true\n  drinkable: 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"
    }
  ],
  "playerConfig": {
    "healthEnabled": true,
    "startingHealth": 100
  },
  "story": {
    "version": 1,
    "states": [
      {
        "id": "lesson_empty",
        "name": "empty",
        "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_empty",
            "operator": "==",
            "value": true
          }
        ],
        "actions": [
          {
            "kind": "message",
            "value": "The water restored hydration once, leaving an empty flask. 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_survival",
          "name": "Water and hydration",
          "description": "Water and hydration",
          "category": "Creator Cookbook",
          "enabled": true,
          "autoStart": true,
          "inputs": [],
          "variables": [
            {
              "id": "thirst",
              "name": "Hydration",
              "type": "number",
              "initial": 50,
              "min": 0,
              "max": 100,
              "showInPlayer": true
            }
          ],
          "scope": {
            "kind": "global",
            "rooms": []
          },
          "initialPhase": "",
          "phases": [],
          "rules": [
            {
              "id": "drink",
              "name": "drink",
              "enabled": true,
              "trigger": {
                "kind": "object",
                "target": "lesson_flask",
                "event": "drink"
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "rule",
                    "condition": {
                      "kind": "inventory",
                      "target": "lesson_flask",
                      "operator": "==",
                      "value": true
                    }
                  },
                  {
                    "kind": "rule",
                    "condition": {
                      "kind": "state",
                      "target": "lesson_empty",
                      "operator": "==",
                      "value": false
                    }
                  }
                ]
              },
              "actions": [
                {
                  "kind": "local",
                  "target": "thirst",
                  "operation": "add",
                  "value": 40
                },
                {
                  "kind": "state",
                  "target": "lesson_empty",
                  "value": true
                },
                {
                  "kind": "message",
                  "value": "You drink the water. The flask is now empty."
                }
              ],
              "otherwise": [
                {
                  "kind": "message",
                  "value": "The flask must be carried and still contain water."
                }
              ],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0
            },
            {
              "id": "decay",
              "name": "decay",
              "enabled": true,
              "trigger": {
                "kind": "turn",
                "target": "",
                "event": ""
              },
              "conditions": {
                "match": "all",
                "conditions": []
              },
              "actions": [
                {
                  "kind": "local",
                  "target": "thirst",
                  "operation": "subtract",
                  "value": 1
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 20
            },
            {
              "id": "dehydration",
              "name": "dehydration",
              "enabled": true,
              "trigger": {
                "kind": "turn",
                "target": "",
                "event": ""
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "local",
                    "target": "thirst",
                    "operator": "<=",
                    "value": 0
                  }
                ]
              },
              "actions": [
                {
                  "kind": "health",
                  "operation": "add",
                  "value": -5
                },
                {
                  "kind": "message",
                  "value": "You need water. Thirst costs you 5 Health."
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0
            }
          ]
        }
      ]
    }
  },
  "cookbookRecipes": [
    {
      "version": 1,
      "settings": {
        "instance": "lesson",
        "recipeId": "40-water-restores-thirst",
        "choices": {
          "room": {
            "existing": "",
            "name": "Dry Trail",
            "description": "Take and drink the water flask. Its empty container stays with you."
          },
          "flask": {
            "existing": "",
            "name": "water flask",
            "description": "A flask of fresh water."
          }
        },
        "values": {
          "drink": "You drink the water. The flask is now empty.",
          "failure": "The flask must be carried and still contain water.",
          "restore": 40,
          "decay": 1,
          "enableHealth": true
        },
        "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: \"Dry Trail\"\n  description: \"Take and drink the water flask. Its empty container stays with you.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_flask.taml",
          "after": {
            "path": "objects/lesson_flask.taml",
            "name": "lesson_flask.taml",
            "content": "object lesson_flask\n  name: \"water flask\"\n  description: \"A flask of fresh water.\"\n  smart_description: \"{\\\"version\\\":1,\\\"parts\\\":[{\\\"type\\\":\\\"conditional\\\",\\\"id\\\":\\\"lesson_flask_text\\\",\\\"when\\\":{\\\"kind\\\":\\\"flag_equals\\\",\\\"flag\\\":\\\"lesson_empty\\\",\\\"value\\\":true},\\\"then\\\":\\\"The water flask is empty.\\\",\\\"otherwise\\\":\\\"The flask contains fresh water.\\\"}]}\"\n  location: lesson_room\n  takeable: true\n  drinkable: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "objects",
          "key": "lesson_flask",
          "after": {
            "id": "lesson_flask",
            "name": "water flask",
            "description": "A flask of fresh water.",
            "article": "",
            "location": "lesson_room",
            "aliases": [],
            "visible": true,
            "takeable": true,
            "droppable": true,
            "useGive": false,
            "container": false,
            "switchable": false,
            "edible": false,
            "drinkable": true,
            "wearable": false,
            "weapon": false,
            "weight": 0.1,
            "locked": false,
            "lockKey": "",
            "events": [],
            "smartProse": {
              "description": {
                "version": 1,
                "parts": [
                  {
                    "type": "conditional",
                    "id": "lesson_flask_text",
                    "when": {
                      "kind": "flag_equals",
                      "flag": "lesson_empty",
                      "value": true
                    },
                    "then": "The water flask is empty.",
                    "otherwise": "The flask contains fresh water."
                  }
                ]
              }
            }
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_room",
          "after": {
            "id": "lesson_room",
            "name": "Dry Trail",
            "description": "Take and drink the water flask. Its empty container stays with you.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 100,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000"
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_empty",
          "after": {
            "id": "lesson_empty",
            "name": "empty",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.features.mechanics",
          "key": "lesson_survival",
          "after": {
            "version": 1,
            "id": "lesson_survival",
            "name": "Water and hydration",
            "description": "Water and hydration",
            "category": "Creator Cookbook",
            "enabled": true,
            "autoStart": true,
            "inputs": [],
            "variables": [
              {
                "id": "thirst",
                "name": "Hydration",
                "type": "number",
                "initial": 50,
                "min": 0,
                "max": 100,
                "showInPlayer": true
              }
            ],
            "scope": {
              "kind": "global",
              "rooms": []
            },
            "initialPhase": "",
            "phases": [],
            "rules": [
              {
                "id": "drink",
                "name": "drink",
                "enabled": true,
                "trigger": {
                  "kind": "object",
                  "target": "lesson_flask",
                  "event": "drink"
                },
                "conditions": {
                  "match": "all",
                  "conditions": [
                    {
                      "kind": "rule",
                      "condition": {
                        "kind": "inventory",
                        "target": "lesson_flask",
                        "operator": "==",
                        "value": true
                      }
                    },
                    {
                      "kind": "rule",
                      "condition": {
                        "kind": "state",
                        "target": "lesson_empty",
                        "operator": "==",
                        "value": false
                      }
                    }
                  ]
                },
                "actions": [
                  {
                    "kind": "local",
                    "target": "thirst",
                    "operation": "add",
                    "value": 40
                  },
                  {
                    "kind": "state",
                    "target": "lesson_empty",
                    "value": true
                  },
                  {
                    "kind": "message",
                    "value": "You drink the water. The flask is now empty."
                  }
                ],
                "otherwise": [
                  {
                    "kind": "message",
                    "value": "The flask must be carried and still contain water."
                  }
                ],
                "initialDelay": 0,
                "interval": 1,
                "cooldown": 0,
                "maxUses": 0,
                "probability": 1,
                "priority": 0
              },
              {
                "id": "decay",
                "name": "decay",
                "enabled": true,
                "trigger": {
                  "kind": "turn",
                  "target": "",
                  "event": ""
                },
                "conditions": {
                  "match": "all",
                  "conditions": []
                },
                "actions": [
                  {
                    "kind": "local",
                    "target": "thirst",
                    "operation": "subtract",
                    "value": 1
                  }
                ],
                "otherwise": [],
                "initialDelay": 0,
                "interval": 1,
                "cooldown": 0,
                "maxUses": 0,
                "probability": 1,
                "priority": 20
              },
              {
                "id": "dehydration",
                "name": "dehydration",
                "enabled": true,
                "trigger": {
                  "kind": "turn",
                  "target": "",
                  "event": ""
                },
                "conditions": {
                  "match": "all",
                  "conditions": [
                    {
                      "kind": "local",
                      "target": "thirst",
                      "operator": "<=",
                      "value": 0
                    }
                  ]
                },
                "actions": [
                  {
                    "kind": "health",
                    "operation": "add",
                    "value": -5
                  },
                  {
                    "kind": "message",
                    "value": "You need water. Thirst costs you 5 Health."
                  }
                ],
                "otherwise": [],
                "initialDelay": 0,
                "interval": 1,
                "cooldown": 0,
                "maxUses": 0,
                "probability": 1,
                "priority": 0
              }
            ]
          }
        },
        {
          "path": "manifest.playerConfig.healthEnabled",
          "key": "$value",
          "after": true
        },
        {
          "path": "manifest.playerConfig.startingHealth",
          "key": "$value",
          "after": 100
        }
      ]
    }
  ],
  "creatorNotes": "Drinking from a carried water flask restores a bounded hydration meter by 40. The empty flask stays in inventory, its description changes, and it cannot restore water twice.\nOpen Help → Cookbook → Water Restores Thirst → Start this recipe to inspect its saved settings. The field journal and 100-point ending belong only to the sample game.\nCommands: drink water flask; take water flask; drink water flask; drink water flask; examine water flask; drop water flask; take water flask; drink water flask; use field journal",
  "mapRooms": [
    {
      "id": "lesson_room",
      "name": "Dry Trail",
      "description": "Take and drink the water flask. Its empty container stays with you.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 100,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000"
    }
  ],
  "mapExits": [],
  "objects": [
    {
      "id": "lesson_flask",
      "name": "water flask",
      "description": "A flask of fresh water.",
      "article": "",
      "location": "lesson_room",
      "aliases": [],
      "visible": true,
      "takeable": true,
      "droppable": true,
      "useGive": false,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": true,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": [],
      "smartProse": {
        "description": {
          "version": 1,
          "parts": [
            {
              "type": "conditional",
              "id": "lesson_flask_text",
              "when": {
                "kind": "flag_equals",
                "flag": "lesson_empty",
                "value": true
              },
              "then": "The water flask is empty.",
              "otherwise": "The flask contains fresh water."
            }
          ]
        }
      }
    },
    {
      "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": [
    "smart-prose-v1",
    "story-rules-v1",
    "creator-features-v1",
    "mechanics-builder-v1"
  ]
}
