{
  "version": "1.1",
  "name": "World State Changes After Repair",
  "startRoom": "lesson_room",
  "author": "TAGMaker",
  "description": "Fit a carried drive belt to a broken pump. The successful repair consumes the belt once, drains the room, opens the tunnel and changes the keeper’s response.",
  "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  blocked north: \"The tunnel is flooded. Repair the pump first.\"\n  exit north: lesson_tunnel when: lesson_repaired\n  name: \"Flooded Pump Room\"\n  description: \"A broken pump stands in shallow water.\"\n  smart_description: \"{\\\"version\\\":1,\\\"parts\\\":[{\\\"type\\\":\\\"conditional\\\",\\\"id\\\":\\\"lesson_flood_text\\\",\\\"when\\\":{\\\"kind\\\":\\\"flag_equals\\\",\\\"flag\\\":\\\"lesson_repaired\\\",\\\"value\\\":true},\\\"then\\\":\\\"The floor is dry. The tunnel north is clear.\\\",\\\"otherwise\\\":\\\"Floodwater covers the floor. The tunnel north is submerged.\\\"}]}\"\n  dark: false\nend"
    },
    {
      "path": "rooms/lesson_tunnel.taml",
      "content": "room lesson_tunnel\n  exit south: lesson_room\n  name: \"Drain Tunnel\"\n  description: \"The drained tunnel leads south to the pump room.\"\n  dark: false\nend"
    },
    {
      "path": "objects/lesson_pump.taml",
      "content": "object lesson_pump\n  name: \"broken pump\"\n  description: \"Use a carried drive belt with this pump to repair it.\"\n  location: lesson_room\n  droppable: false\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/lesson_belt.taml",
      "content": "object lesson_belt\n  name: \"drive belt\"\n  description: \"A spare pump drive belt.\"\n  location: lesson_room\n  takeable: true\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "npcs/lesson_keeper.taml",
      "content": "npc lesson_keeper\n  name: \"pump keeper\"\n  description: \"The keeper needs the pump repaired.\"\n  location: lesson_room\n  mobile: false\n  follow: false\n  health: 100\n  combat_side: neutral\n  auto_fight: false\n  attack_power: 10\n  defense: 0\n  trust: 50\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_repaired",
        "name": "repaired",
        "description": "Progress remembered by this recipe.",
        "type": "boolean",
        "initial": false
      }
    ],
    "rules": [
      {
        "id": "lesson_before",
        "name": "before",
        "enabled": true,
        "trigger": {
          "kind": "npc",
          "target": "lesson_keeper",
          "event": "talk"
        },
        "match": "all",
        "conditions": [
          {
            "kind": "state",
            "target": "lesson_repaired",
            "operator": "==",
            "value": false
          }
        ],
        "actions": [
          {
            "kind": "message",
            "value": "Please repair the pump. The tunnel is flooded."
          }
        ],
        "otherwise": "",
        "once": false
      },
      {
        "id": "lesson_after",
        "name": "after",
        "enabled": true,
        "trigger": {
          "kind": "npc",
          "target": "lesson_keeper",
          "event": "talk"
        },
        "match": "all",
        "conditions": [
          {
            "kind": "state",
            "target": "lesson_repaired",
            "operator": "==",
            "value": true
          }
        ],
        "actions": [
          {
            "kind": "message",
            "value": "The pump is working. You can use the tunnel now."
          }
        ],
        "otherwise": "",
        "once": false
      },
      {
        "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_repaired",
            "operator": "==",
            "value": true
          }
        ],
        "actions": [
          {
            "kind": "message",
            "value": "The repaired pump, room description, keeper and tunnel agree. 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_repair",
          "name": "repair",
          "enabled": true,
          "verbs": [
            "use"
          ],
          "unordered": true,
          "inputs": [
            {
              "objectId": "lesson_belt",
              "disposition": "consume"
            }
          ],
          "tools": [],
          "target": {
            "kind": "object",
            "id": "lesson_pump"
          },
          "match": "all",
          "conditions": [],
          "actions": [
            {
              "kind": "state",
              "target": "lesson_repaired",
              "value": true
            }
          ],
          "once": true,
          "success": "You fit the drive belt. The pump starts and drains the tunnel.",
          "failure": "Carry the drive belt and use it with the broken pump.",
          "repeat": "The pump is already repaired."
        }
      ]
    }
  },
  "cookbookRecipes": [
    {
      "version": 1,
      "settings": {
        "instance": "lesson",
        "recipeId": "35-world-state-changes-after-repair",
        "choices": {
          "room": {
            "existing": "",
            "name": "Flooded Pump Room",
            "description": "A broken pump stands in shallow water."
          },
          "tunnel": {
            "existing": "",
            "name": "Drain Tunnel",
            "description": "The drained tunnel leads south to the pump room."
          },
          "pump": {
            "existing": "",
            "name": "broken pump",
            "description": "Use a carried drive belt with this pump to repair it."
          },
          "belt": {
            "existing": "",
            "name": "drive belt",
            "description": "A spare pump drive belt."
          },
          "keeper": {
            "existing": "",
            "name": "pump keeper",
            "description": "The keeper needs the pump repaired."
          }
        },
        "values": {
          "success": "You fit the drive belt. The pump starts and drains the tunnel.",
          "failure": "Carry the drive belt and use it with the broken pump.",
          "repeat": "The pump is already repaired.",
          "before": "Floodwater covers the floor. The tunnel north is submerged.",
          "after": "The floor is dry. The tunnel north is clear.",
          "npc_before": "Please repair the pump. The tunnel is flooded.",
          "npc_after": "The pump is working. You can use the tunnel now."
        },
        "reuseRoutes": {}
      },
      "owned": [
        {
          "path": "files",
          "key": "rooms/lesson_room.taml",
          "after": {
            "path": "rooms/lesson_room.taml",
            "name": "lesson_room.taml",
            "content": "room lesson_room\n  blocked north: \"The tunnel is flooded. Repair the pump first.\"\n  exit north: lesson_tunnel when: lesson_repaired\n  name: \"Flooded Pump Room\"\n  description: \"A broken pump stands in shallow water.\"\n  smart_description: \"{\\\"version\\\":1,\\\"parts\\\":[{\\\"type\\\":\\\"conditional\\\",\\\"id\\\":\\\"lesson_flood_text\\\",\\\"when\\\":{\\\"kind\\\":\\\"flag_equals\\\",\\\"flag\\\":\\\"lesson_repaired\\\",\\\"value\\\":true},\\\"then\\\":\\\"The floor is dry. The tunnel north is clear.\\\",\\\"otherwise\\\":\\\"Floodwater covers the floor. The tunnel north is submerged.\\\"}]}\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "rooms/lesson_tunnel.taml",
          "after": {
            "path": "rooms/lesson_tunnel.taml",
            "name": "lesson_tunnel.taml",
            "content": "room lesson_tunnel\n  exit south: lesson_room\n  name: \"Drain Tunnel\"\n  description: \"The drained tunnel leads south to the pump room.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_pump.taml",
          "after": {
            "path": "objects/lesson_pump.taml",
            "name": "lesson_pump.taml",
            "content": "object lesson_pump\n  name: \"broken pump\"\n  description: \"Use a carried drive belt with this pump to repair it.\"\n  location: lesson_room\n  droppable: false\n  use_give: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_belt.taml",
          "after": {
            "path": "objects/lesson_belt.taml",
            "name": "lesson_belt.taml",
            "content": "object lesson_belt\n  name: \"drive belt\"\n  description: \"A spare pump drive belt.\"\n  location: lesson_room\n  takeable: true\n  use_give: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "npcs/lesson_keeper.taml",
          "after": {
            "path": "npcs/lesson_keeper.taml",
            "name": "lesson_keeper.taml",
            "content": "npc lesson_keeper\n  name: \"pump keeper\"\n  description: \"The keeper needs the pump repaired.\"\n  location: lesson_room\n  mobile: false\n  follow: false\n  health: 100\n  combat_side: neutral\n  auto_fight: false\n  attack_power: 10\n  defense: 0\n  trust: 50\nend",
            "isDirty": true
          }
        },
        {
          "path": "objects",
          "key": "lesson_pump",
          "after": {
            "id": "lesson_pump",
            "name": "broken pump",
            "description": "Use a carried drive belt with this pump to repair it.",
            "article": "",
            "location": "lesson_room",
            "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_belt",
          "after": {
            "id": "lesson_belt",
            "name": "drive belt",
            "description": "A spare pump drive belt.",
            "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": "npcs",
          "key": "lesson_keeper",
          "after": {
            "id": "lesson_keeper",
            "name": "pump keeper",
            "description": "The keeper needs the pump repaired.",
            "location": "lesson_room",
            "mobile": false,
            "aliases": [],
            "onEnter": "",
            "onExamine": "",
            "onTalk": "",
            "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": []
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_room",
          "after": {
            "id": "lesson_room",
            "name": "Flooded Pump Room",
            "description": "A broken pump stands in shallow water.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 100,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "smartProse": {
              "description": {
                "version": 1,
                "parts": [
                  {
                    "type": "conditional",
                    "id": "lesson_flood_text",
                    "when": {
                      "kind": "flag_equals",
                      "flag": "lesson_repaired",
                      "value": true
                    },
                    "then": "The floor is dry. The tunnel north is clear.",
                    "otherwise": "Floodwater covers the floor. The tunnel north is submerged."
                  }
                ]
              }
            },
            "blockedDescriptions": {
              "north": "The tunnel is flooded. Repair the pump first."
            }
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_tunnel",
          "after": {
            "id": "lesson_tunnel",
            "name": "Drain Tunnel",
            "description": "The drained tunnel leads south to the pump room.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 320,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "blockedDescriptions": {}
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_tunnel",
          "after": {
            "id": "lesson_route_tunnel",
            "fromRoom": "lesson_room",
            "toRoom": "lesson_tunnel",
            "direction": "north",
            "locked": false,
            "when": "lesson_repaired"
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_return",
          "after": {
            "id": "lesson_route_return",
            "fromRoom": "lesson_tunnel",
            "toRoom": "lesson_room",
            "direction": "south",
            "locked": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_repaired",
          "after": {
            "id": "lesson_repaired",
            "name": "repaired",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.rules",
          "key": "lesson_before",
          "after": {
            "id": "lesson_before",
            "name": "before",
            "enabled": true,
            "trigger": {
              "kind": "npc",
              "target": "lesson_keeper",
              "event": "talk"
            },
            "match": "all",
            "conditions": [
              {
                "kind": "state",
                "target": "lesson_repaired",
                "operator": "==",
                "value": false
              }
            ],
            "actions": [
              {
                "kind": "message",
                "value": "Please repair the pump. The tunnel is flooded."
              }
            ],
            "otherwise": "",
            "once": false
          }
        },
        {
          "path": "manifest.story.rules",
          "key": "lesson_after",
          "after": {
            "id": "lesson_after",
            "name": "after",
            "enabled": true,
            "trigger": {
              "kind": "npc",
              "target": "lesson_keeper",
              "event": "talk"
            },
            "match": "all",
            "conditions": [
              {
                "kind": "state",
                "target": "lesson_repaired",
                "operator": "==",
                "value": true
              }
            ],
            "actions": [
              {
                "kind": "message",
                "value": "The pump is working. You can use the tunnel now."
              }
            ],
            "otherwise": "",
            "once": false
          }
        },
        {
          "path": "manifest.story.features.recipes",
          "key": "lesson_repair",
          "after": {
            "id": "lesson_repair",
            "name": "repair",
            "enabled": true,
            "verbs": [
              "use"
            ],
            "unordered": true,
            "inputs": [
              {
                "objectId": "lesson_belt",
                "disposition": "consume"
              }
            ],
            "tools": [],
            "target": {
              "kind": "object",
              "id": "lesson_pump"
            },
            "match": "all",
            "conditions": [],
            "actions": [
              {
                "kind": "state",
                "target": "lesson_repaired",
                "value": true
              }
            ],
            "once": true,
            "success": "You fit the drive belt. The pump starts and drains the tunnel.",
            "failure": "Carry the drive belt and use it with the broken pump.",
            "repeat": "The pump is already repaired."
          }
        }
      ]
    }
  ],
  "creatorNotes": "Fit a carried drive belt to a broken pump. The successful repair consumes the belt once, drains the room, opens the tunnel and changes the keeper’s response.\nOpen Help → Cookbook → World State Changes After Repair → Start this recipe to inspect its saved settings. The field journal and 100-point ending belong only to the sample game.\nCommands: look; talk pump keeper; north; use drive belt with broken pump; take drive belt; use drive belt with broken pump; look; talk pump keeper; use drive belt with broken pump; north; south; use field journal",
  "mapRooms": [
    {
      "id": "lesson_room",
      "name": "Flooded Pump Room",
      "description": "A broken pump stands in shallow water.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 100,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "smartProse": {
        "description": {
          "version": 1,
          "parts": [
            {
              "type": "conditional",
              "id": "lesson_flood_text",
              "when": {
                "kind": "flag_equals",
                "flag": "lesson_repaired",
                "value": true
              },
              "then": "The floor is dry. The tunnel north is clear.",
              "otherwise": "Floodwater covers the floor. The tunnel north is submerged."
            }
          ]
        }
      },
      "blockedDescriptions": {
        "north": "The tunnel is flooded. Repair the pump first."
      }
    },
    {
      "id": "lesson_tunnel",
      "name": "Drain Tunnel",
      "description": "The drained tunnel leads south to the pump room.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 320,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "blockedDescriptions": {}
    }
  ],
  "mapExits": [
    {
      "id": "lesson_route_tunnel",
      "fromRoom": "lesson_room",
      "toRoom": "lesson_tunnel",
      "direction": "north",
      "locked": false,
      "when": "lesson_repaired"
    },
    {
      "id": "lesson_route_return",
      "fromRoom": "lesson_tunnel",
      "toRoom": "lesson_room",
      "direction": "south",
      "locked": false
    }
  ],
  "objects": [
    {
      "id": "lesson_pump",
      "name": "broken pump",
      "description": "Use a carried drive belt with this pump to repair it.",
      "article": "",
      "location": "lesson_room",
      "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_belt",
      "name": "drive belt",
      "description": "A spare pump drive belt.",
      "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": "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": [
    {
      "id": "lesson_keeper",
      "name": "pump keeper",
      "description": "The keeper needs the pump repaired.",
      "location": "lesson_room",
      "mobile": false,
      "aliases": [],
      "onEnter": "",
      "onExamine": "",
      "onTalk": "",
      "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": []
    }
  ],
  "activeMechanics": [],
  "verbAliases": [],
  "scripts": [],
  "worldEvents": [],
  "customMechanicDefs": [],
  "savedMechanicTemplates": [],
  "objectiveSets": [],
  "gameOutliner": {},
  "customRoomTemplates": [],
  "customObjectTemplates": [],
  "customNpcTemplates": [],
  "customSavedScripts": [],
  "requiredCapabilities": [
    "smart-prose-v1",
    "story-rules-v1",
    "creator-features-v1"
  ]
}
