Sharpee
Chord / The World / Exits and blocked exits

Exits and blocked exits

Rooms connect with direction lines. Twelve directions exist: the eight compass points, up and down, and in and out. A plain exit connects both ways: the return exit is inferred in the opposite direction, so north to the Herb Garden on the Rose Walk also puts a south exit on the Herb Garden, and in to the Potting Shed on the Rose Walk puts an out exit on the shed. Write , one-way for an exit with no way back — a landing the story reaches only by moving the player there, and leaves by walking:

create Behind the Fruit Stall
  a room
  southwest to the Fruit Stall, one-way

The same modifier works on a door line (north to the Hall through the oak door, one-way): the door opens from the written side only.

create the Rose Walk
  a room
  north to the Herb Garden
  east to the Orchard
  south is blocked: hedge-too-thick

  Gravel crunches underfoot between the rose beds.

in and out are exits like any other, and take , one-way, through <door> and a blocked line the same way. in the Potting Shed with an article is placement, not an exit; in to the Potting Shed with to is the exit. A player types in, inside, out or outside to use them:

create the Rose Walk
  a room
  in to the Potting Shed
  in is blocked while the shed door is locked: shed-locked

A blocked exit refuses travel and speaks the named phrase (the key after the colon names a phrase the story defines, a single kebab-case word; dots are illegal, ADR-254). The block can be conditional:

create the Orchard
  a room
  west to the Rose Walk
  up is blocked while the ladder is not here: no-way-up

  Apple trees stand in crooked rows.

Exits on one line

A room with several exits can list them on one exits: line, separated by commas. Each is the same <direction> to <room> as a single line, with through <door> allowed, and a plain exits: line infers the return exits just as single lines do. exits, one-way: makes every exit on the line one-way, which is how a port of an older game transcribes its exit table exactly, with no phantom ways back. A blocked exit keeps its own line beside the exits: line and guards that one direction:

create the Mine Entrance, a room
  exits, one-way: northeast to the Upper Tunnel, southeast to the Lower Tunnel, up to the Mine
  down is blocked: too-dark

  You are at the entrance to an abandoned mine. A dark corridor is below.

create the Upper Tunnel, a room
  exits: south to the Lower Tunnel

  A tunnel, sloping down.

create the Lower Tunnel, a room

  A tunnel, going nowhere.

create the Mine, a room

  The mine proper: timber, damp, and silence.

define phrases en-US
  too-dark:
    The corridor below is too dark to try.

A per-exit , one-way is not allowed inside an exits: line, because a comma there already separates exits. A room that mixes the two writes an exits: line and an exits, one-way: line, or single lines. An exits: line belongs in a room block; a region lists its rooms' exits in an exits table instead.

Passages: an exit named by its command

Some ways out of a room have no compass word. The player types xyzzy, or climb the rope, or follow the cables. A passage block names such an exit by the commands the player types, and leads somewhere exactly as a compass exit does:

create the Cable Trench
  a room, dark
  up to the Loading Dock

  passage to the Sorting Room
    grammar
      follow the cables
      crawl along the cables
  end passage

  A trench under the dock floor. Lit, the cables can be seen running
  off toward the sorting machine.

The head says where the passage leads, with through <door> as on any exit. grammar comes first, with one command per line under it, written as an action's grammar is: or joins two words (crawl or creep along the cables) and […] marks a word the player may leave out. A passage takes no nouns, so the is a word here, never a slot. Articles are optional for the player: follow cables reaches follow the cables. The first command names the passage on the map.

A passage is one-way by construction, since there is no opposite of xyzzy: no return exit is inferred, and , one-way on the head is an error. A passage is an exit, so it appears on the map, on the player going fires for it, a door on the way is consulted, and the destination's after the player entering runs. Its commands are grammar only in the room that declares it: elsewhere climb the rope is the standard climbing action, and xyzzy is not understood, exactly as if the passage had not been written.

A passage's blocked and deadly lines live inside its block, after grammar, at most one of each:

create the Cable Trench
  a room, dark

  passage to the Sorting Room
    grammar
      follow the cables
      crawl along the cables
    blocked while the grating is shut: grating-shut
  end passage

Exits that exist while a condition holds

A single compass exit line takes a while <condition> tail, and a passage takes a while <condition> line inside its block. While the condition is false the exit is not there: going refuses as with no exit written, a passage's commands are not grammar, and the map draws it as a conditional exit. This is a hidden exit, and it is not the same as a blocked one: a blocked exit exists and refuses with your phrase; a hidden exit does not exist and refuses with the platform's "You can't go that way." An exit that is both hidden and blocked is hidden.

create the Crawl
  a room
  north to the Passage while the boulder is rolled aside

create the Cable Trench
  a room, dark

  passage to the Sorting Room
    grammar
      follow the cables
    while the Cable Trench is not dark
  end passage

The inferred reverse of a two-way exit carries the same condition: a way is there or not from both ends. For a one-sided reveal, write , one-way on each side. while is not allowed on an exits: line or in a region's exit table, where the condition would run into the next exit; give the exit a line of its own.

Who may take an exit

A room's admits: line names the steered vehicles that may enter it (see vehicles). The same list takes the word pushing for a thing pushed along the way, and a single exit line takes its own admits list for that one way:

create the Sorting Room
  a room
  east to the Loading Dock admits pushing
  east is blocked while the dock door is sealed: dock-sealed

create the mail trolley
  a thing, pushable
  in the Sorting Room

The thing can say its own ways instead, as room pairs, in a pushing block. between is both ways, from … to one way, and every row must name an exit the first room already has to the second, so the block can never disagree with the map. The room's admits pushing admits every pushable thing; the block admits this one, and the two coexist (a trolley with a block beside a boulder without one, on the same door):

create the mail trolley
  a thing, pushable
  in the Sorting Room

  pushing
    between the Sorting Room and the Loading Dock
  end pushing

Either way, push trolley east moves the trolley and the player into the Loading Dock together, and the dock is described with the trolley in it. Every refusal the player's own step would meet refuses the push in the same words: no exit, a hidden way, the blocked phrase, a closed or locked door, a vehicle the player is riding. A way that exists but does not admit pushing refuses with "You can't push the trolley that way." An exit line's admits comes after the door and , one-way and before while.