.th STARTREK VI 29-MARCH-1980
.nh
.sh NAME
STARTREK \*- space war game
.sh SYNOPSIS
.it startrek
[random number seed value (integer) ]
.sh DESCRIPTION
STARTREK
is a space war game modelled after the TV program.
You are in command of the starship Enterprise
and must destroy all enemy vessels within 150 stardates,
meanwhile avoiding destruction.
.s3
All major commands use at least one day. Additionally,
days go by if you take too long to enter the next command. The rate is
determined by your skill level  (level 0 turns this off).
Each day, nearby enemy ships fire at you
with phasers at power levels equal to their shield strengthes.
This quantity is listed in the status as "HIT LEVEL".
Your prime defense is the
.it "deflector shields"
(also called deflectors).
You can set the strength of your
shields to anywhere from 0 to 2000 by transferring energy from the main
energy banks. When the Enterprise is hit by enemy fire, the shield level
is decreased. Depending on the hit level and your shield power, various
systems may be damaged. To avoid this, keep you shields up.
.s3
All actions consume resources, in the form of energy, stardates, and supplies.
Commands such as using the computers, the scanners, or the communicators
consume only energy. Most other commands use one stardate, except for
moving, in which case the time used depends on the distance.
The Enterprise starts out with 4000
.it quarks
(the unit of energy), ten torpedoes, and one nova-max missile.
If you run out of energy, you will be destroyed.
.s3
The
.it galaxy
is a 30 by 30 grid of positions (called sectors),
divided into nine quadrants (10x10 squares).
Positions are denoted by quadrant and sector coordinates.
Both quadrant and sector coordinates are numbered in matrix
row-column notation with 1,1 being the upper left hand corner.
The first number in the coordinate pair is the row (vertical position)
and the second is the column (horizontal position).
Sector coordinates are relative to the upper-left of that particular
quadrant.
.s3
The
.it scanners
are your prime source of information. The scanners examine an 11x11 area
around the Enterprise and display the results on the screen using this
legend:
.fi 2
.na
.nf
	     '*' = star              '.' = empty space
	     'E' = the Enterprise    ' ' = time warp
	     'B' = starbase          'M' = meteor shower
	     'K' = Klingon ship      'P' = Procyon system
	     'R' = Romulan ship      'G' = the Galileo
.ad
.fi
Romulan ships, meteor showers, Procyon, and the Galileo
are normally invisible.
Space warps and black holes are always invisible.
Hyperscan will show invisible things as a question mark, if they are close
enough, but will not identify them.
.s3
In addition, you have a
.it "galaxy map"
which is a summary of the contents of each quadrant. For each of the nine
quadrants, three numbers are printed; the number of enemy vessels, the
number of starbases, and the number of stars in that quadrant.
The scanners are quite vulnerable to damage. If the scanners are out,
the scanner display and the galaxy map will not be
updated. The computer is also necessary for the galaxy map. If the computer
is down, the galaxy map display area will be blanked out.
.s3
There are three ways to move the Enterprise, the impulse engines, the
warp drive, and the panic button.
The
.it "panic button"
is for emergency use only - it jumps you to a randomly chosen point in the
galaxy - not necessarily any better than where you are now. The
.it "impulse engines"
are used for normal, "near space" movement.
You must specify a direction (see discussion of angles above) and a distance
to move. The farther you move, the more energy (quarks) and time (stardates)
you use. You can ram enemy vessels if your shields are up; but you might
get damaged. If you hit a black hole with your shields up, you will bounce
off. Do not run into your starbases.
The
.it "warp drive"
is used for longer distances. This command also needs a direction and a
distance, but the distance is measured in
.it "warp factors,"
which are multiples of four units.
The warp drive is somewhat risky in that the distance and direction are
randomly perturbed.
.s3
Angles are measured in degrees  starting at zero on the X-axis, increasing
in a counter-clockwise direction.
Negative angles are allowed.
Distances are measured in sectors. A distance along an oblique angle is
the maximum of the x and y distances.
.s3
The offensive weapons of the Enterprise consist of photon torpedoes,
phasers, tractor beams, and the nova-max missile. The
.it nova-max
missile destroys everything (vessels, stars, starbases, etc.)
in a quadrant. It always travels a distance of ten sectors in the direction
fired and then causes the quadrant it is in to go nova. If fired off the edge
of the galaxy, it disappears.
The
.it torpedoes
are the most generally useful weapon you have. A torpedo can destroy any
vessel, a star, or a starbase. The maximum range of a torpedo
is five sectors, so you can shoot anything you can see on the scanners. A
.it spread
is a group of torpedoes fired in a fan-shaped group with a constant
angular offset between successive firings.
The
.it phasers
are cheaper to use than torpedoes but  have some disadvantages. The range
of the phasers is only three sectors. The phaser power used must be at least
as high as the deflector level of the object it hits, after being
attenuated by distance and possibly space dust.
The
.it "tractor beams"
can be used to capture enemy vessels in adjacent sectors.
See the note about invisible Romulans.
.s3
There are
.it starbases
randomly positioned in the galaxy. If you dock at one (move next to it),
your supplies and energy level will be replenished and most damage will be
repaired. You cannot return to a starbase too soon unless you are in some
sort of trouble.
.s3
.it Procyon
is one of the star systems in the galaxy. At a random point in the game,
you will receive a call for help from Procyon.
If you can get to the quadrant containing Procyon
and open communications before it goes nova,
it will become a time warp. You may then regain 25 stardates by
flying through it.
If you take more than 20 days to get there, it will go nova -
destroying its quadrant.
.s3
The
.it Galileo
is a scoutship that is off on an independent mission. At a random time, it
appears in the galaxy and requests that you pick it up. To do so, you must
move next to it and take it on board with the tractor beams.
If you don't get there soon enough, it is destroyed by the Klingons.
Incidentally, the Galileo carries an extra nova-max missile which is
sometimes handy.
.s3
There are a few
.it "meteor showers"
scattered through space. If you
happen to run into one, the Enterprise will be severely damaged.
Unfortunately, they are invisible until you hit them.
Meteor showers absorb phasers but a torpedo will remove one.
.s3
.it "Space warps"
are also invisible. If you travel through one of these, you will
appear somewhere else, randomly.
Nothing short of a nova can eliminate a space warp.
.s3
.it "Black holes"
are a significant danger. If you run into one, your ship will be damaged
and deflected off course - providing your shields hold.
If not, particularly if your shields are down, you stand a good chance
of being destroyed.
.s3
The
.it Romulan
vessels are normally invisible.
They become visible if they are hit by phasers but survive.
If you capture one with the tractor beams,
they will self-destruct, causing you some difficulty.
The tractor beam mechanism is somewhat stupid, it grabs the first ship it
finds, even an invisible Romulan.
.s3
.it Commands
are integers.
Many require additional values. These parameters may be typed on the same
line as the command number (seperated by spaces) if you know their order.
Otherwise, the program will prompt you for them.
.s3
You may use your usual character and line kill keys but they will
work only within the value you are currently typing.
You may kill a complete command line by using the RUBOUT (DEL) key,
up to the point where you enter the last parameter.
After that, it's too late.
EOT (CTRL-D) exits startrek completely.
.sh COMMANDS:

.lp +10 10
1	move the Enterprise on
.it impulse
engines; requires
direction and distance parameters

.lp +10 10
2	move using the
.it warp
drive, where the distance is measured in warp factors (4 sectors each).

.lp +10 10
3	fire the
.it phasers

.lp +10 10
4	launch a
.it "photon torpedo"

.lp +10 10
5	launch a fan shaped group (
.it spread
) of torpedos

.lp +10 10
6	fire the
.it nova-max
missile which destroys everything in the quadrant it is fired into.

.lp +10 10
7	set the level of the deflector
.it shields
(max = 1500)

.lp +10 10
8	push the
.it panic
button - causes a random warp drive jump.
Needless to say, it may get you out of the fire and into the frying pan.

.lp +10 10
9	use
.it hyperscan
sensors.
Objects which would normally be invisible show up as
question marks. This goes away on the next stardate.

.lp +10 10
10	invoke the battle
.it computer
to calculate trajectory angles to all visible enemy.
The results are printed on the computer output line in the form
"KVA = ...."

.lp +10 10
11	calculate the
.it trajectory
to a specified position relative to the Enterprise.
Needs two values: the vertical displacement (positive upward),
and the horizontal displacment (positive to the right).

.lp +10 10
12	attempt to
.it "open communcations"
with
.it Procyon
to find its location. Works only if the
Enterprise is in the same quadrant as Procyon.

.lp +10 10
13	long range scan, gives a new
.it "galaxy map"
and does a hyperscan.

.lp +10 10
14	grapple with the
.it "tractor beams,"
requires use of
the deflector shields. Beware of unseen Romulans.

.lp +10 10
98	causes a fork to the Unix
.it shell
- useful for doing real work in the background while preserving the state
of the game. You can return to
Startrek
by typing a <CTRL-D>.

.lp +10 10
99	trigger
.it self-destruct
by imploding the di-lithium crystals
(rather bad form).
.io
.sh COSTS:

.lp +10 10
impulse engines - one day & [15 + 7.5*(# in tow)] quarks for each sector

.lp +10 10
warp drive - 30 quarks to get started, then for each warp factor: one day
and 15 + 15*(# in tow) quarks

.lp +10 10
panic jump - 5 days and 100 quarks

.lp +10 10
phasers - one day and a number of quarks equal to the phaser power

.lp +10 10
torpedo - one day, 110 quarks, and one torpedo

.lp +10 10
torpedo spread - one day and (# of torpedoes fired)*110 quarks

.lp +10 10
nova-max - 5 days and 500 quarks

.lp +10 10
tractor beam - one day, 50 quarks directly and 100 quarks from the shields

.lp +10 10
shields - each unit of power put into the deflectors counts as one quark used,
except for any left over at the end of the game

.lp +10 10
long range scan (galaxy map) - 100 quarks and one day

.lp +10 10
computer - 50 quarks

.lp +10 10
trajectory calculation - 25 quarks

.lp +10 10
communications (with Procyon) - 10 quarks

.lp +10 10
damage from enemy hits or obstacles will use quarks from
the energy banks if the deflectors are down or are too low.

.i0
.sh SCORING
Your performance is rated by a numeric efficiency score
calculated by :
.fi 2
.na
.nf
.i0
.s3
    SCORE = 12 for each Klingon eliminated
		 + 15 for each Romulan destroyed
		 + 5 extra for each captured vessel
		 + 10 times the skill level
		 - # of stardate used
		 - (quarks used)/500
		 - 50 for each nova-max used
		 - 1/2 for each torpedo
		 +/- 25 if you save/lose the Galileo
		 +/- 25 if you save/lose Procyon
		 - 100 if the Enterprise is destroyed.

.fi
.ad
.fi 2
Because of this formula,
it is better to capture an enemy vessel than to destroy it,
as long as you don't take too much time. Phasers are cheaper to
use than torpedoes, unless you can get several at one time with
a spread.
A score in the range 400-499 is good. Anything 500 or higher is excellent.
.sh DIAGNOSTICS
If you attempt to type a non-digit when a numeric value is required, you get
a message saying "INVALID DIGIT". Merely type the correct value to
continue.
Some kinds of illegal values (e.g. negative phaser power) are caught but
produce no error message. You just get a question mark and the
program waits for a valid response.

.sh AUTHORS
Robert Haar, Computer Vision Lab,Computer Science Center, Univ. of Md.;
derived from a version by  Paul Winslow,
David Neuman, and Dennis Mumaugh (D.O.D.).
