# A small Adventure Kit story to copy and change.
# It uses every feature except images and sound: a question, health, an item,
# a locked choice, a timer, a defeat and an ending.
# The full format is at https://adventurekit.lettersandcolors.com/

adventure:
  title: The Last Lamp
  description: A storm, a dark lighthouse, and a ship heading for the rocks.
  author:
    name: Your Name
  version: 1.0
  kit_version: 1.0

settings:
  health:
    name: Warmth
    namePlural: Warmth
    max: 5
    min: 1
    default: 4
  inventory:
    name: Supplies
    contents:
      oil:
        name: Can of lamp oil
        namePlural: Cans of lamp oil
        description: Enough to keep the lamp lit until morning.
        start: 0
        max: 1

menu:
  options:
    begin:
      name: Start
      to: start
    how_to_play:
      name: How to play
      content: >
        Pick a choice to move the story along.

        Some choices need supplies first. Others give you only a few seconds to decide.
    credits:
      name: Credits
      content: Written by Your Name. Made with Adventure Kit.

questionnaire:
  keeper:
    question: What is the lighthouse keeper's name?
    type: string
    default: Morgan

screens:
  start:
    content: >
      The lamp at the top of the lighthouse has gone out, and the storm is getting worse.

      Through the rain, {keeper} sees the lights of a fishing boat. It's heading straight for the rocks.
    go:
      - fetch_oil
      - climb_tower
      - wait_it_out

  fetch_oil:
    name: Run to the shed for oil
    health: -1
    inventory:
      oil: 1
    condition:
      - type: inventory
        item: oil
        comparison: equal
        amount: 0
    content: >
      The wind knocks {keeper} flat twice on the way. Soaked and shivering, they find one last can of lamp oil.
    go:
      - climb_tower

  climb_tower:
    name: Climb the tower and light the lamp
    inventory:
      oil: -1
    condition:
      - type: inventory
        item: oil
        comparison: greater
        amount: 0
    timer:
      duration: 10
      to: too_late
    content: >
      {keeper} pours the oil, but the matches are damp. The boat is close now.
    go:
      lamp_lit:
        name: Strike the last dry match

  wait_it_out:
    name: Wait for the storm to pass
    health: -4
    content: >
      {keeper} sits by the cold stove and waits. The storm doesn't pass, and the cold creeps in.

  too_late:
    name: Too late
    content: >
      The match won't catch in time. Far below, the boat's lights swing hard to one side. Then they go dark.
    go:
      start:
        name: Try again
      back:
        name: Main menu

  lamp_lit:
    name: The lamp is lit
    content: >
      The match flares. The great lamp turns, and its beam sweeps across the water.

      The boat turns away from the rocks, just in time. At dawn, the crew rows ashore to thank {keeper}.
