"EMERG for
Interlogic SF Game
(c) Copyright 1981,1982 Infocom, Inc. All Rights Reserved
"
The comment refers to “lighting and environmental controls”, but it’s not obvious why these devices have been split off into their own file. All the rest of the game logic is stuffed into actions.zil. Perhaps the author started to split everything up into functional groups and just never got very far.
<ROUTINE SWITCH-FCN ()
<COND (<VERB? LAMP-ON TURN THROW>
<TELL
"There is a sickening wheeze, but nothing else happens." CR>)
<TELL "It's already on." CR>)
(ELSE
<TELL
"The lights in the room come on and there is a deafening FOOOOM! noise as the
computer starts up." CR>
<TELL
"The main display blinks once and then displays the word \"Ready\"." CR>)
(ELSE
<TELL
"The main display blinks twice, a bell rings, and out of the output
hopper onto the floor is extruded a gold rod! A moment later, a
previously unseen enunciator panel comes on." CR>
<RTRUE>)>)
(ELSE
<TELL
"On the main display lights blink insistently and the word \"Fault\"
appears." CR>)>)>)
(<VERB? LAMP-OFF>
<TELL
"The computer is off." CR>)>>
<ROUTINE COMPUTER-ROOM-FCN (RARG)
<TELL
"This is the main computer room. The builders of this ship were obviously
still wedded to large mainframes: this one stretches off in all directions
and is thirty meters high. There is an overlarge switch at about eye-level
and an access panel below it, which is ">
<TELL "open">)
(ELSE <TELL "closed">)>
<TELL ". The power seems to be ">
(ELSE <TELL "off." CR>)>
"There is a strong smell of burning components here." CR>)>
<RTRUE>)>>
<OBJECT ENUNCIATOR
(DESC "enunciator panel")
(LDESC "An enunciator panel is prominent along one wall here.")
(SYNONYM PANEL LIGHT LIGHTS SYMBOL)
(ADJECTIVE ENUNCIATOR RED YELLOW BLUE GREEN)
<ROUTINE ENUNCIATOR-F ()
<COND (<VERB? EXAMINE>
<TELL
"On the left are three banks of four colored lights: red, yellow, green, and
blue. The first is labelled with a symbol of the emission of rays: of the
lights underneath, the red one is flashing and the yellow one is brightly
lit. The second column is labelled with a stylized docking port and the third
with an airlock. The only indications on these two banks are the yellow ones,
the first of which is brightly lit and the other of which is flashing. On the
right are six other lights, each bearing a stylized picture. The first four,
all dark, represent navigation, engine, library, and defenses. A fifth,
bearing the picture of a cage, is brightly lit. The sixth is "
(ELSE <TELL "The panel is dark." CR>)>)>>
<GLOBAL AIR-FLASH <TABLE
"flickering dimly"
"flashing slowly"
"flashing rapidly"
"also brightly lit"
"also brightly lit">>
<GLOBAL REPAIR-PANEL
" bears a symbol in three parts: the first two parts, in black, are a
solid block and a fluid level. The third, in red, is a series of parallel
wavy lines.">
<ROOM REPAIR-ROOM
(DESC "Repair Room")
<ROUTINE REPAIR-ROOM-FCN (RARG)
<TELL
"This is a bright room taken up by two large pieces of machinery. On the
leftmost one is a symbol depicting the emission of rays and beside it a
yellow slot. The other machine" ,REPAIR-PANEL " Beside it are three diagrams;
under each one is a
red slot. The first diagram shows four single dots equally spaced around a
six-dot cluster. The second shows two eight-dot clusters in close proximity.
The third has three single dots equally spaced around a seven-dot cluster.
The only exit is up some stairs." CR>)>>
<OBJECT YELLOW-SLOT
(DESC "yellow slot")
(SYNONYM SLOT HOLE)
(ADJECTIVE YELLOW)
(CAPACITY 6)
<ROUTINE YELLOW-SLOT-F ()
<CRLF>)
<ROUTINE WONT-FIT ()
<TELL "The " D ,PRSO " doesn't fit." CR>>
<OBJECT RED-SLOT
(DESC "red slot")
(SYNONYM SLOT HOLE)
(ADJECTIVE RED FIRST SECOND THIRD)
(CAPACITY 5)
<ROUTINE RED-SLOT-F ("AUX" NUM)
<COND (<OR <G? .NUM 3> <EQUAL? .NUM 0>>
<TELL "You must specify which red slot." CR>)
(T
<TELL
" You hear the subdued hum of some machinery coming to life." CR>
<COND (<==? .NUM 2>
(T
<COND (<==? .NUM 3>
<RTRUE>)>)>)>>
<ROUTINE RIGHT-KEY ()
<TELL
"The " D ,PRSO " disappears into the slot.">>
<ROUTINE WRONG-KEY ()
<TELL
"The " D ,PRSO " slides into the slot and disappears." CR>>
This timer handles the refreshing of the artifact’s atmosphere if you select the right option in the REPAIR-ROOM.
<ROUTINE I-FRESH-AIR ()
<TELL
"The air seems fine now." CR>)>
<RTRUE>)>
"The air seems a bit better, but is still ">)>
<GLOBAL POISON-COUNT 0>
This timer handles the replacement of the artifact’s atmosphere if you select the wrong option in the REPAIR-ROOM.
As with I-BAD-AIR, wearing the SPACESUIT will not save you.
<ROUTINE I-POISON-AIR ()
<ENABLE <QUEUE I-POISON-AIR 1>>)
"Suddenly, you notice everything around you going dark, as though
the artifact was shutting down. The lights are dimming everywhere,
and a faint thrumming vibration stops; one you didn't even notice
until it ceased.">)
"You are overcome by noxious gases and slump to the floor, dead.">)>)
(T
<QUEUE I-POISON-AIR 30>)>>
This timer handles the slow degradation of the artifact’s atmosphere.
If the air runs out completely while you are wearing the SPACESUIT, the power goes out instead – sorry! If you were outside the artifact, the shutdown politely waits for you to return.
<ROUTINE I-BAD-AIR ()
<ENABLE <QUEUE I-BAD-AIR 1>>)
"You gasp for air, but there is none left, and slump to the ground, dead.">)
(T
"Suddenly, you notice everything around you going dark, as though
the artifact was shutting down. The lights are dimming everywhere,
and a faint thrumming vibration stops; one you didn't even notice
until it ceased.">)>)
(T
<GLOBAL AIR-COUNT 0>
<ROUTINE DESCRIBE-AIR (STR)
"You gasp for air, but there is none left, and slump to the ground, dead.">)
(T
"You are overcome by noxious gases and slump to the floor, dead.">)>)
<TELL .STR
CR>)
(T
<GLOBAL AMMONIA-TABLE <TABLE
"foo"
"glass cleaner."
"ammonia."
"ammonia.">>
<GLOBAL METHANE-TABLE <TABLE
"foo"
"charcoal."
"coal gas."
"coal gas.">>
<GLOBAL AMMONIA? <>>
<GLOBAL POISON-AIRS <TABLE
"foo"
"quite pungent, smelling vaguely of "
"quite hard to breathe, permeated with the smell of "
"almost unbreathable, and heavy with the smell of ">>
<GLOBAL LIGHT-AIRS <TABLE
"quite breathable and slightly sweet."
"quite thin."
"quite hard to breathe."
"almost unbreathable.">>