import: 
  - defaults
---

Intro:
  dialog: Welcome to Spooky House.  The object of this game is to get to the exit with treasure and not get killed.
  go to: DiningRoom

FirstFloor:
  dialog: You enter the spooky house.
  choice:
    dialog: Would you like to go upstairs, or stay on the floor you're on?
    intents:
      UpstairsIntent:
        samples:
          - go upstairs
          - upstairs
        go to: Upstairs
      DiningRoomIntent:
        samples:
          - stay on the floor i'm on
          - stay on this floor
          - stay here
          - stay
        go to: DiningRoom

DiningRoom:
  dialog: You enter the dining room.
  choice: 
    dialog: Would you like to go to the kitchen or the living room?
    intents:
      KitchenIntent:
        samples:
          - go to the kitchen
          - the kitchen
          - kitchen
        go to: Kitchen
      LivingRoomIntent:
        samples:
          - go to the living room
          - the living room
          - living room
        go to: LivingRoom

Upstairs:
  dialog: You go upstairs and see three doors.
  choice:
    dialog: Which door would you like to go in? 1, 2, or 3?
    intents:
      DoorOneIntent:
        samples:
          - go to door one
          - open door one
          - door one
          - one
        go to: GhostDoorDeath
      DoorTwoIntent:
        samples:
          - go to door two
          - open door two
          - door two
          - two
          - go to door three
          - open door three
          - door three
          - three
        go to: GhostDoor

GhostDoor:
  dialog: You open the door and find a ghost. You are so scared you run downstairs to the front door.
  go to: FirstFloor.choice

GhostDoorDeath:
  dialog: You open the door and find a ghost. You are dead.

Kitchen:
  dialog: You enter the kitchen. 
  choice: 
    dialog: Do you want to eat something, or do you want to go back to the dining room?
    intents:
      EatFoodIntent:
        samples:
          - eat something
          - eat
        go to: PoisonFoodDeath
      DiningRoomIntent:
        samples:
          - go back to the dining room
          - back to the dining room
          - go to the dining room
          - the dining room
          - dining room
        go to: DiningRoom

PoisonFoodDeath:
  dialog: The food is poisonous. You are dead.

LivingRoomIntent:
  dialog: You enter the living room. 
  choice:
    dialog: Will you turn on the radio or go to the hallway?
    intents:
      TurnOnRadioIntent:
        samples:
          - i'll turn on the radio
          - turn on the radio
          - radio
        go to: RadioDeath
      HallwayIntent:
        samples:
          - go to the hallway
          - the hallway
          - hallway
        go to: Hallway

RadioDeath:
  dialog: The radio electrocutes you. You are dead.

Hallway:
  dialog: You enter the hallway.
  choice:
    dialog: Will you go to the next room or the exit?
    intents:
      NextRoomIntent:
        samples:
          - go to the next room
          - the next room
        go to: FoundTreasure
      ExitIntent:
        samples:
          - the exit
          - exit
        condition:
          value: attributes.hasTreasure
          if true: 
            go to: GameOver
          if false:
            dialog: There aren't that many doors.
            retry: true

FoundTreasure:
  dialog: You found some treasure!
  attributes:
    hasTreasure: true
  choice: 
    dialog: Will you go back to the hall or to the next room?
    intents:
      HallwayIntent:
        samples:
          - back to the hallway
          - go to the hallway
          - the hallway
          - hallway
        go to: Hallway
      NextRoomIntent:
        samples:
          - go to the next room
          - the next room
        go to: GhostDoorDeath

CantExit:
  dialog: You cannot exit until you have treasure.
  go to: Hallway.choice

GameOver:
  dialog: You managed to escape with the treasure.  You win!

