{
  "version": "1.1",
  "name": "World Events: Invasion, Shelter & Resolution",
  "startRoom": "lesson_shelter",
  "author": "TAGMaker",
  "description": "A radio starts a warning, then a bounded group of harmless scouts arrives in the courtyard. The shelter is excluded. Turning off the beacon stops later waves and removes the remaining scouts.",
  "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_shelter.taml",
      "content": "room lesson_shelter\n  exit east: lesson_yard\n  name: \"Protected Shelter\"\n  description: \"The courtyard is east. This room is excluded from arrivals.\"\n  dark: false\nend"
    },
    {
      "path": "rooms/lesson_yard.taml",
      "content": "room lesson_yard\n  exit east: lesson_relay\n  exit west: lesson_shelter\n  name: \"Signal Courtyard\"\n  description: \"Use the radio to request a landing. The shelter is west; the beacon relay is east.\"\n  dark: false\nend"
    },
    {
      "path": "rooms/lesson_relay.taml",
      "content": "room lesson_relay\n  exit west: lesson_yard\n  name: \"Beacon Relay\"\n  description: \"Use the beacon to stop the arrivals and clear the courtyard. Return west.\"\n  dark: false\nend"
    },
    {
      "path": "objects/lesson_radio.taml",
      "content": "object lesson_radio\n  name: \"radio\"\n  description: \"Use this to start one landing request.\"\n  location: lesson_yard\n  droppable: false\n  use_give: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/lesson_beacon.taml",
      "content": "object lesson_beacon\n  name: \"beacon\"\n  description: \"Use this to end the landing event.\"\n  location: lesson_relay\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_requested",
        "name": "requested",
        "description": "Progress remembered by this recipe.",
        "type": "boolean",
        "initial": false
      },
      {
        "id": "lesson_stopped",
        "name": "stopped",
        "description": "Progress remembered by this recipe.",
        "type": "boolean",
        "initial": false
      }
    ],
    "rules": [
      {
        "id": "lesson_request",
        "name": "request",
        "enabled": true,
        "trigger": {
          "kind": "object",
          "target": "lesson_radio",
          "event": "use"
        },
        "match": "all",
        "conditions": [],
        "actions": [
          {
            "kind": "state",
            "target": "lesson_requested",
            "value": true
          },
          {
            "kind": "message",
            "value": "You send a landing request over the radio."
          }
        ],
        "otherwise": "",
        "once": true,
        "repeatText": "The landing has already been requested."
      },
      {
        "id": "lesson_stop",
        "name": "stop",
        "enabled": true,
        "trigger": {
          "kind": "object",
          "target": "lesson_beacon",
          "event": "use"
        },
        "match": "all",
        "conditions": [],
        "actions": [
          {
            "kind": "state",
            "target": "lesson_stopped",
            "value": true
          },
          {
            "kind": "message",
            "value": "You switch the beacon off."
          }
        ],
        "otherwise": "",
        "once": true,
        "repeatText": "The beacon is already off."
      },
      {
        "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_stopped",
            "operator": "==",
            "value": true
          }
        ],
        "actions": [
          {
            "kind": "message",
            "value": "The beacon resolved the scoped event and cleaned up its arrivals. 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
      }
    ]
  },
  "cookbookRecipes": [
    {
      "version": 1,
      "settings": {
        "instance": "lesson",
        "recipeId": "world-events",
        "choices": {
          "shelter": {
            "existing": "",
            "name": "Protected Shelter",
            "description": "The courtyard is east. This room is excluded from arrivals."
          },
          "yard": {
            "existing": "",
            "name": "Signal Courtyard",
            "description": "Use the radio to request a landing. The shelter is west; the beacon relay is east."
          },
          "relay": {
            "existing": "",
            "name": "Beacon Relay",
            "description": "Use the beacon to stop the arrivals and clear the courtyard. Return west."
          },
          "radio": {
            "existing": "",
            "name": "radio",
            "description": "Use this to start one landing request."
          },
          "beacon": {
            "existing": "",
            "name": "beacon",
            "description": "Use this to end the landing event."
          }
        },
        "values": {
          "radio": "You send a landing request over the radio.",
          "warning": "Blue lights gather above the courtyard. The shelter is protected.",
          "arrive": "An alien scout steps out of the blue light.",
          "finish": "With the beacon dark, the scouts withdraw.",
          "warningTurns": 2,
          "waveEvery": 3
        },
        "reuseRoutes": {}
      },
      "owned": [
        {
          "path": "files",
          "key": "rooms/lesson_shelter.taml",
          "after": {
            "path": "rooms/lesson_shelter.taml",
            "name": "lesson_shelter.taml",
            "content": "room lesson_shelter\n  exit east: lesson_yard\n  name: \"Protected Shelter\"\n  description: \"The courtyard is east. This room is excluded from arrivals.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "rooms/lesson_yard.taml",
          "after": {
            "path": "rooms/lesson_yard.taml",
            "name": "lesson_yard.taml",
            "content": "room lesson_yard\n  exit east: lesson_relay\n  exit west: lesson_shelter\n  name: \"Signal Courtyard\"\n  description: \"Use the radio to request a landing. The shelter is west; the beacon relay is east.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "rooms/lesson_relay.taml",
          "after": {
            "path": "rooms/lesson_relay.taml",
            "name": "lesson_relay.taml",
            "content": "room lesson_relay\n  exit west: lesson_yard\n  name: \"Beacon Relay\"\n  description: \"Use the beacon to stop the arrivals and clear the courtyard. Return west.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_radio.taml",
          "after": {
            "path": "objects/lesson_radio.taml",
            "name": "lesson_radio.taml",
            "content": "object lesson_radio\n  name: \"radio\"\n  description: \"Use this to start one landing request.\"\n  location: lesson_yard\n  droppable: false\n  use_give: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_beacon.taml",
          "after": {
            "path": "objects/lesson_beacon.taml",
            "name": "lesson_beacon.taml",
            "content": "object lesson_beacon\n  name: \"beacon\"\n  description: \"Use this to end the landing event.\"\n  location: lesson_relay\n  droppable: false\n  use_give: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "objects",
          "key": "lesson_radio",
          "after": {
            "id": "lesson_radio",
            "name": "radio",
            "description": "Use this to start one landing request.",
            "article": "",
            "location": "lesson_yard",
            "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_beacon",
          "after": {
            "id": "lesson_beacon",
            "name": "beacon",
            "description": "Use this to end the landing event.",
            "article": "",
            "location": "lesson_relay",
            "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_shelter",
          "after": {
            "id": "lesson_shelter",
            "name": "Protected Shelter",
            "description": "The courtyard is east. This room is excluded from arrivals.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 100,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "blockedDescriptions": {}
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_yard",
          "after": {
            "id": "lesson_yard",
            "name": "Signal Courtyard",
            "description": "Use the radio to request a landing. The shelter is west; the beacon relay is east.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 320,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "blockedDescriptions": {}
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_relay",
          "after": {
            "id": "lesson_relay",
            "name": "Beacon Relay",
            "description": "Use the beacon to stop the arrivals and clear the courtyard. Return west.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 540,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "blockedDescriptions": {}
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_yard",
          "after": {
            "id": "lesson_route_yard",
            "fromRoom": "lesson_shelter",
            "toRoom": "lesson_yard",
            "direction": "east",
            "locked": false
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_shelter",
          "after": {
            "id": "lesson_route_shelter",
            "fromRoom": "lesson_yard",
            "toRoom": "lesson_shelter",
            "direction": "west",
            "locked": false
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_relay",
          "after": {
            "id": "lesson_route_relay",
            "fromRoom": "lesson_yard",
            "toRoom": "lesson_relay",
            "direction": "east",
            "locked": false
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_yard_back",
          "after": {
            "id": "lesson_route_yard_back",
            "fromRoom": "lesson_relay",
            "toRoom": "lesson_yard",
            "direction": "west",
            "locked": false
          }
        },
        {
          "path": "worldEvents",
          "key": "lesson_arrivals",
          "after": {
            "id": "lesson_arrivals",
            "name": "Courtyard arrivals",
            "category": "invasion",
            "weatherType": "rain",
            "icon": "🛸",
            "startMessage": "An alien scout steps out of the blue light.",
            "atmosphericMessage": "",
            "atmosphericEvery": 3,
            "endMessage": "With the beacon dark, the scouts withdraw.",
            "audioMode": "none",
            "audioUrl": "",
            "audioData": "",
            "audioFilename": "",
            "durationType": "permanent",
            "durationTurns": 20,
            "triggerType": "flag_condition",
            "triggerAfterTurns": 5,
            "triggerFlag": "lesson_requested",
            "triggerFlagValue": "true",
            "scopeType": "selected",
            "scopeRooms": [
              "lesson_yard",
              "lesson_relay"
            ],
            "hazards": [],
            "enabled": true,
            "stopFlag": "lesson_stopped",
            "stopFlagValue": "true",
            "safeRooms": [
              "lesson_shelter"
            ],
            "warningTurns": 2,
            "warningMessage": "Blue lights gather above the courtyard. The shelter is protected.",
            "startBody": "",
            "turnBody": "",
            "endBody": "",
            "scenario": {
              "stateFlag": "event_lesson_arrivals_state",
              "darkness": false,
              "blockedExits": [],
              "roomDescription": "",
              "phases": [
                {
                  "name": "Rising",
                  "turns": 5,
                  "message": ""
                },
                {
                  "name": "Peak",
                  "turns": 5,
                  "message": ""
                }
              ],
              "repeat": false,
              "maxCycles": 3,
              "damage": 0,
              "protectionFlag": "",
              "originRooms": [],
              "spreadEvery": 3,
              "factionA": "Defenders",
              "factionB": "Invaders",
              "winnerFlag": "event_lesson_arrivals_winner",
              "resourceFlag": "event_lesson_arrivals_stock",
              "initialStock": 10,
              "consumption": 1,
              "consumptionEvery": 5,
              "restockFlag": "event_lesson_arrivals_delivery",
              "restockAmount": 5
            },
            "invasion": {
              "name": "alien scout",
              "description": "A harmless visitor studying the beacon.",
              "aliases": [],
              "disposition": "neutral",
              "presentation": "individual",
              "health": 20,
              "attackPower": 0,
              "defense": 0,
              "playerHitDamage": 25,
              "initialCount": 1,
              "waveSize": 1,
              "waveEvery": 3,
              "maxActive": 2,
              "totalLimit": 4,
              "spawnRooms": [
                "lesson_yard"
              ],
              "behavior": "stay",
              "patrolRooms": [],
              "moveEvery": 2,
              "defeatScore": 0,
              "clearOnEnd": true
            }
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_requested",
          "after": {
            "id": "lesson_requested",
            "name": "requested",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_stopped",
          "after": {
            "id": "lesson_stopped",
            "name": "stopped",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.rules",
          "key": "lesson_request",
          "after": {
            "id": "lesson_request",
            "name": "request",
            "enabled": true,
            "trigger": {
              "kind": "object",
              "target": "lesson_radio",
              "event": "use"
            },
            "match": "all",
            "conditions": [],
            "actions": [
              {
                "kind": "state",
                "target": "lesson_requested",
                "value": true
              },
              {
                "kind": "message",
                "value": "You send a landing request over the radio."
              }
            ],
            "otherwise": "",
            "once": true,
            "repeatText": "The landing has already been requested."
          }
        },
        {
          "path": "manifest.story.rules",
          "key": "lesson_stop",
          "after": {
            "id": "lesson_stop",
            "name": "stop",
            "enabled": true,
            "trigger": {
              "kind": "object",
              "target": "lesson_beacon",
              "event": "use"
            },
            "match": "all",
            "conditions": [],
            "actions": [
              {
                "kind": "state",
                "target": "lesson_stopped",
                "value": true
              },
              {
                "kind": "message",
                "value": "You switch the beacon off."
              }
            ],
            "otherwise": "",
            "once": true,
            "repeatText": "The beacon is already off."
          }
        }
      ]
    }
  ],
  "creatorNotes": "A radio starts a warning, then a bounded group of harmless scouts arrives in the courtyard. The shelter is excluded. Turning off the beacon stops later waves and removes the remaining scouts.\nOpen Help → Cookbook → World Events: Invasion, Shelter & Resolution → Start this recipe to inspect its saved settings. The field journal and 100-point ending belong only to the sample game.\nCommands: wait; east; use radio; west; wait; wait; wait; wait; wait; look; east; east; use beacon; use beacon; west; look; wait; use field journal",
  "mapRooms": [
    {
      "id": "lesson_shelter",
      "name": "Protected Shelter",
      "description": "The courtyard is east. This room is excluded from arrivals.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 100,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "blockedDescriptions": {}
    },
    {
      "id": "lesson_yard",
      "name": "Signal Courtyard",
      "description": "Use the radio to request a landing. The shelter is west; the beacon relay is east.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 320,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "blockedDescriptions": {}
    },
    {
      "id": "lesson_relay",
      "name": "Beacon Relay",
      "description": "Use the beacon to stop the arrivals and clear the courtyard. Return west.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 540,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "blockedDescriptions": {}
    }
  ],
  "mapExits": [
    {
      "id": "lesson_route_yard",
      "fromRoom": "lesson_shelter",
      "toRoom": "lesson_yard",
      "direction": "east",
      "locked": false
    },
    {
      "id": "lesson_route_shelter",
      "fromRoom": "lesson_yard",
      "toRoom": "lesson_shelter",
      "direction": "west",
      "locked": false
    },
    {
      "id": "lesson_route_relay",
      "fromRoom": "lesson_yard",
      "toRoom": "lesson_relay",
      "direction": "east",
      "locked": false
    },
    {
      "id": "lesson_route_yard_back",
      "fromRoom": "lesson_relay",
      "toRoom": "lesson_yard",
      "direction": "west",
      "locked": false
    }
  ],
  "objects": [
    {
      "id": "lesson_radio",
      "name": "radio",
      "description": "Use this to start one landing request.",
      "article": "",
      "location": "lesson_yard",
      "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_beacon",
      "name": "beacon",
      "description": "Use this to end the landing event.",
      "article": "",
      "location": "lesson_relay",
      "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": [
    {
      "id": "lesson_arrivals",
      "name": "Courtyard arrivals",
      "category": "invasion",
      "weatherType": "rain",
      "icon": "🛸",
      "startMessage": "An alien scout steps out of the blue light.",
      "atmosphericMessage": "",
      "atmosphericEvery": 3,
      "endMessage": "With the beacon dark, the scouts withdraw.",
      "audioMode": "none",
      "audioUrl": "",
      "audioData": "",
      "audioFilename": "",
      "durationType": "permanent",
      "durationTurns": 20,
      "triggerType": "flag_condition",
      "triggerAfterTurns": 5,
      "triggerFlag": "lesson_requested",
      "triggerFlagValue": "true",
      "scopeType": "selected",
      "scopeRooms": [
        "lesson_yard",
        "lesson_relay"
      ],
      "hazards": [],
      "enabled": true,
      "stopFlag": "lesson_stopped",
      "stopFlagValue": "true",
      "safeRooms": [
        "lesson_shelter"
      ],
      "warningTurns": 2,
      "warningMessage": "Blue lights gather above the courtyard. The shelter is protected.",
      "startBody": "",
      "turnBody": "",
      "endBody": "",
      "scenario": {
        "stateFlag": "event_lesson_arrivals_state",
        "darkness": false,
        "blockedExits": [],
        "roomDescription": "",
        "phases": [
          {
            "name": "Rising",
            "turns": 5,
            "message": ""
          },
          {
            "name": "Peak",
            "turns": 5,
            "message": ""
          }
        ],
        "repeat": false,
        "maxCycles": 3,
        "damage": 0,
        "protectionFlag": "",
        "originRooms": [],
        "spreadEvery": 3,
        "factionA": "Defenders",
        "factionB": "Invaders",
        "winnerFlag": "event_lesson_arrivals_winner",
        "resourceFlag": "event_lesson_arrivals_stock",
        "initialStock": 10,
        "consumption": 1,
        "consumptionEvery": 5,
        "restockFlag": "event_lesson_arrivals_delivery",
        "restockAmount": 5
      },
      "invasion": {
        "name": "alien scout",
        "description": "A harmless visitor studying the beacon.",
        "aliases": [],
        "disposition": "neutral",
        "presentation": "individual",
        "health": 20,
        "attackPower": 0,
        "defense": 0,
        "playerHitDamage": 25,
        "initialCount": 1,
        "waveSize": 1,
        "waveEvery": 3,
        "maxActive": 2,
        "totalLimit": 4,
        "spawnRooms": [
          "lesson_yard"
        ],
        "behavior": "stay",
        "patrolRooms": [],
        "moveEvery": 2,
        "defeatScore": 0,
        "clearOnEnd": true
      }
    }
  ],
  "customMechanicDefs": [],
  "savedMechanicTemplates": [],
  "objectiveSets": [],
  "gameOutliner": {},
  "customRoomTemplates": [],
  "customObjectTemplates": [],
  "customNpcTemplates": [],
  "customSavedScripts": [],
  "requiredCapabilities": [
    "story-rules-v1"
  ]
}
