Category:Elevator and stairs (Example)

From IFWiki

Premise

There are four rooms in this example. Their names. descriptions, objects, and directions are:

  • Ground Floor
    You are on the ground floor. The open/closed door to the elevator is north, and the stairs are up.
    Objects: elevator door, call button, stairs.
    North: to Elevator if the door is open.
    Up: to Second Floor.
  • Second Floor
    You are on the second floor. The open/closed door to the elevator is north, and stairs go both up and down from here.
    Objects: elevator door, call button, stairs.
    North: to Elevator if the door is open.
    Up: to Third Floor.
    Down: to Ground Floor.
  • Third Floor
    You are on the third floor. The open/closed door to the elevator is north, or you can take the stairs down.
    Objects: elevator door, call button, stairs.
    North: to Elevator if the door is open.
    Down: to Second Floor.
  • Elevator
    You are inside the elevator. The door to the south is open/closed, and there's the usual panel of buttons beside it.
    Objects: elevator door, panel of buttons, ground/g button, 2/two button, 3/three button, LED display.
    South: to whichever of the other three rooms is appropriate, if the door is open.

At the beginning of the game, the PC is at Ground Floor, all doors are closed, and the elevator is at ground floor level.

At any floor, X ELEVATOR or X DOOR should say: "The elevator door is open/closed, and there's a call button beside it." OPEN DOOR should either say "The elevator door is already open." or "Try pushing the call button." (if closed). CLOSE DOOR should say "The elevator door is already closed." or "The elevator door will close automatically when it needs to." (if open).

X CALL BUTTON on any floor: "Pushing this button summons the elevator to this floor. It's currently lit/dark." PUSH CALL BUTTON should do:

  • "Nothing happens." if the elevator is on this floor and the door is open. Make sure the doors don't automatically close this turn, however.
  • "The elevator door opens." if the elevator is on this floor and the door is closed.
  • "The call button lights up." If any elevator doors anywhere are open, take this game turn to close them; the elevator will start moving on the next turn. Otherwise, the elevator moves this turn. The elevator takes one game turn to move from one floor to the next, and also takes one game turn to open or close its doors. When the doors open, say "The elevator door opens. The call button blinks off." If the elevator's controls are left alone, the door will stay open for two turns and then close automatically.

X STAIRS should say "They go up.", "They go up and down.", and "They go down." from the appropriate floors. If you choose to implement two stairs objects on the second floor, you must eliminate the disambiguity question "Which stairs do you mean, the stairs or the stairs?" for all possible cases (e.g.: HIT STAIRS, SMELL STAIRS, PUSH STAIRS, etc.)

Going up or down any stairs should take three turns of game time, not one.

None of the objects are takeable, but "TAKE STAIRS" at Ground Floor should be equivalant to "UP". At Third Floor, "TAKE STAIRS" should do the same thing as "DOWN". At Second Floor, "TAKE STAIRS" should ask "Do you want to take the stairs up, or take the stairs down?" Support the specific phrases "TAKE STAIRS UP" and "TAKE STAIRS DOWN" where appropriate.

X PANEL or X BUTTONS inside the elevator should say "The panel has three buttons: G, 2, and 3. There is also a LED display that reads G/2/3." X DISPLAY should say "The LED display is showing a large red G/2/3." Pushing a button inside the elevator should work just like pushing the call button on that floor.

Add appropriate elevator motion messages: "You feel the elevator going up/down (and then it comes to a stop)."

For sanity's sake, if the PC pushes a button when any other button is lit, turn the previously lit button off so there's only one elevator order to worry about at any one time.