phantasia

title: phantasia(6)

summary: an interterminal fantasy game

text:
# phantasia(6)

## NAME
phantasia — an interterminal fantasy game

## SYNOPSIS
phantasia

[-abHmpSsx]

## DESCRIPTION
phantasia is a role playing game which allows players to roll up characters of various types to fight monsters and other players. Progression of characters is based upon gaining experience from fighting monsters (and other players).

Most of the game is menu driven and self-explanatory (more or less). The screen is cursor updated, so be sure to set up the TERM variable in your environment.

The options provide for a variety of functions to support the game. They are:

-a

Get a listing of all character names on file.

-b

Show scoreboard of top characters per login.

-H

Print header only.

-m

Get a monster listing.

-p

Purge old characters.

-S

Turn on wizard options, if allowed, if running as “root”.

-s

Invokes phantasia without header information.

-x

Examine/change a particular character on file.

The characters are saved on a common file, in order to make the game interactive between players. The characters are given a password in order to retrieve them later. Only characters above level zero are saved. Characters unused for awhile will be purged. Characters are only placed on the scoreboard when they die.

## PARTICULARS

### Normal Play
A number of the player's more important statistics are almost always displayed on the screen, with maximums (where applicable) in parentheses.

The character is placed randomly near the center of a Cartesian system. Most commands are selected with a single letter or digit. For example, one may move by hitting 'W', 'S', 'N', or 'E', (lower case may also be used, at no time is the game case dependent). One may also use 'H', 'J', 'K', 'L', for movement, similar to vi(1). To move to a specific (x, y) coordinate, use the move ('1') command. The distance a character can move is calculated by 1 plus 1.5 per level. Moving in a compass direction will move the player the maximum allowed distance in that direction.

A player may see who else is playing by using the players ('2') option. One may see the coordinates of those who are the same distance or closer to the origin as he/she. Kings, and council of the wise can see and can be seen by everyone. A palantir removes these restrictions.

One can talk to other players with the talk ('3') option. In general, this is a line or so of text. To remove a current message, just type ⟨return⟩ when prompted for a message.

The stats ('4') option shows additional characteristics of a player.

One may leave the game either with the quit ('5') option.

One may rest by default. Resting lets one regain maximum energy level, and also lets one find mana (more is found for larger levels and further distances from the origin).

One may call a monster by hitting '9' or 'C'.

Use 'X' to examine other players.

One may quit or execute a sub-shell by hitting interrupt. Quitting during battle results in death for obvious reasons.

Several other options become available as the player progresses in level and magic, or to other stations in the game (valar, council of the wise, king). These are described elsewhere. In general, a control-L will force the redrawing of the screen.

Other things which may happen are more or less self-explanatory.

### Fighting Monsters
A player has several options while fighting monsters. They are as follows:

melee

Inflicts damage on the monster, based upon strength. Also decreases the monster's strength some.

skirmish

Inflicts a little less damage than melee, but decreases the monster's quickness instead.

evade

Attempt to run away. Success is based upon both the player's and the monster's brains and quickness.

spell

Several options for throwing spells (described elsewhere).

nick

Hits the monster one plus the player's sword, and gives the player 10% of the monster's experience. Decreases the monster's experience an amount proportional to the amount granted. This also increases the monster's quickness. Paralyzed monsters wake up very fast when nicked.

luckout

This is essentially a battle of wits with the monster. Success is based upon the player's and the monster's brains. The player gets credit for slaying the monster if he/she succeeds. Otherwise, nothing happens, and the chance to luckout is lost.

### Character Statistics
strength

determines how much damage a character can inflict.

quickness

determines how many chances a character gets to make decisions while fighting.

energy level

specifies how much damage a character may endure before dying.

magic level

determines which spells a character may throw, and how effective those spells will be.

brains

basically, the character's intelligence; used for various fighting options and spells.

mana

used as a power source for throwing spells.

experience

gained by fighting monsters and other characters.

level

indicative of how much experience a character has accumulated; progresses geometrically as experience increases.

poison

sickness which degrades a character's performance (affects energy level and strength).

sin

accumulated as a character does certain nasty things; used only rarely in normal play of the game.

age

of player; roughly equivalent to number of turns. As age increases, many personal statistics degenerate.

### Character Types
Character statistics are rolled randomly from the above list, according to character type. The types are as follows:

magic user

strong in magic level and brains, weak in other areas. Must rely on wits and magic to survive.

fighter

good in strength and energy level, fairly good in other areas. This adds up to a well-equipped fighter.

elf

very high quickness and above average magic level are elves selling points.

dwarf

very high strength and energy level, but with a tendency to be rather slow and not too bright.

halfling

rather quick and smart, with high energy level, but poor in magic and strength. Born with some experience.

experimento

very mediocre in all areas. However, the experimento may be placed almost anywhere within the playing grid.

The possible ranges for starting statistics are summarized in the following table.

Type

Strength

Quick

Mana

Energy

Brains

Magic

Mag. User

10-15

30-35

50-100

30-45

60-85

5-9

Fighter

40-55

30-35

30-50

45-70

25-45

3-6

Elf

35-45

32-38

45-90

30-50

40-65

4-7

Dwarf

50-70

25-30

25-45

60-100

20-40

2-5

Halfling

20-25

34

25-45

55-90

40-75

1-4

Experimento

25

27

100

35

25

2

Not only are the starting characteristics different for the different character types, the characteristics progress at different rates for the different types as the character goes up in level. Experimentoes' characteristics progress randomly as one of the other types. The progression as characters increase in level is summarized in the following table.

Type

Strength

Mana

Energy

Brains

Magic

Mag. User

2.0

75

20

6

2.75

Fighter

3.0

40

30

3.0

1.5

Elf

2.5

65

25

4.0

2.0

Dwarf

5

30

35

2.5

1

Halfling

2.0

30

30

4.5

1

The character type also determines how much gold a player may carry, how long until rings can overcome the player, and how much poison the player can withstand.

### Spells
During the course of the game, the player may exercise his/her magic powers. These cases are described below.

cloak

magic level necessary: 20 (plus level 7)

mana used: 35 plus 3 per rest period

Used during normal play. Prevents monsters from finding the character, as well as hiding the player from other players. His/her coordinates show up as '?' in the players option. Players cannot collect mana, find trading posts, or discover the grail while cloaked. Calling a monster uncloaks, as well as choosing this option while cloaked.

teleport

magic level necessary: 40 (plus level 12)

mana used: 30 per 75 moved

Used during normal play. Allows the player to move with much more freedom than with the move option, at the price of expending mana. The maximum distance possible to move is based upon level and magic level.

power blast

magic level necessary: none

mana used: 5 times level

Used during inter-terminal battle. Damage is based upon magic level and strength. Hits much harder than a normal hit.

all or nothing

magic level necessary: none

mana used: 1

Used while combating monsters. Has a 25% chance of working. If it works it hits the monster just enough to kill it. If it fails, it doesn't hit the monster, and doubles the monster's quickness and strength. Paralyzed monsters wake up much quicker as a result of this spell.

magic bolt

magic level necessary: 5

mana used: variable

Used while combating monsters. Hits the monster based upon the amount of mana expended and magic level. Guaranteed to hit at least 10 per mana.

force field

magic level necessary: 15

mana used: 30

Used during monster combat. Throws up a shield to protect from damage. The shield is added to actual energy level, and is a fixed number, based upon maximum energy. Normally, damage occurs first to the shield, and then to the players actual energy level.

transform

magic level necessary: 25

mana used: 50

Used during monster combat. Transforms the monster randomly into one of the 100 monsters from the monster file.

increase might

magic level necessary: 35

mana used: 75

Used during combat with monsters. Increases strength up to a maximum.

invisibility

magic level necessary: 45

mana used: 90

Used while fighting monsters. Makes it harder for the monster to hit, by temporarily increasing the player's quickness. This spell may be thrown several times, but a maximum level will be reached.

transport

magic level necessary: 60

mana used: 125

Used during monster combat. Transports the monster away from the player. Success is based upon player's magic and brains, and the monster's experience. If it fails the player is transported instead. 60% of the time, the monster will drop any treasure it was carrying.

paralyze

magic level necessary: 75

mana used: 150

Used during monster combat. “Freezes” the monster by putting its quickness slightly negative. The monster will slowly wake up. Success is based upon player's magic and the monster's experience. If it fails, nothing happens.

specify

magic level necessary: none

mana used: 1000

Used during monster combat only by valar or council of the wise. Allows the player to pick which monster to fight.

### Monsters
Monsters get bigger as one moves farther from the origin (0,0). Rings of distance 125 from the origin determine the size. A monster's experience, energy level, and brains are multiplied by the size. Strength is increased 50% per size over one, and quickness remains the same, regardless of size.

Also, nastier monsters are found as one progress farther out from the origin. Monsters also may flock. The percent chance of that happening is designated as flock% in the monster listing. Monsters outside the first ring may carry treasure, as determined by their treasure type. Flocking monsters, and bigger monsters increase the chances of treasure.

Certain monsters have special abilities; they are as follows:

Unicorn

can only be subdued if the player is in possession of a virgin.

Modnar

has random characteristics, including treasure type.

Mimic

will pick another name from the list of monsters in order to confuse.

Dark Lord

very nasty person. Does not like to be hit (especially nicked), and many spells do not work well (or at all) against him. One can always evade from the Dark Lord.

Leanan-Sidhe

also a very nasty person. She will permanently sap strength from someone.

Saruman

wanders around with Wormtongue, who can steal a palantir. Also, Saruman may turn a player's gems into gold pieces, or scramble her/his stats.

Thaumaturgist

can transport a player.

Balrog

inflicts damage by taking away experience, not energy.

Vortex

may take some mana.

Nazgul

may try to steal a ring or neutralize part of one's brains.

Tiamat

may take half a player's gold and gems and escape.

Kobold

may get nasty and steal one gold piece and run away.

Shelob

may bite, inflicting the equivalent of one poison.

Assorted Faeries

These are killed if attacking someone carrying holy water. These are Cluricaun, Fir Darrig, Fachan, Ghille Dhu, Bogle, Killmoulis, and Bwca.

Lamprey

may bite, inflicting 1/2 of a poison.

Shrieker

will call one of its (much bigger) buddies if picked upon.

Bonnacon

will become bored with battle, fart, and run off.

Smeagol

will try to steal a ring from a player, if given the chance.

Succubus

may inflict damage through a force field. This subtracts from energy level instead of any shield the player may have thrown up. This is a very easy way to die.

Cerberus

loves metal and will steal all the metal treasures from a player if able.

Ungoliant

can bite and poison. This inflicts five poisons, and also takes one from the player's quickness.

Jabberwock

may tire of battle, and leave after calling one of his friends (Jubjub Bird or Bandersnatch).

Morgoth

actually Modnar, but reserved for council of the wise, valar, and ex-valar. Fights with Morgoth end when either he or the player dies. His characteristics are calculated based upon the player's. The player is given the chance to ally with him. No magic, except force field works when battling Morgoth.

Troll

may regenerate its energy and strength while in battle.

Wraith

may make a player blind.

### Treasures
The various treasure types are as follows:

Type zero

none

Type one

power booster - adds mana.

druid - adds experience.

holy orb - subtracts 0.25 sin.

Type two

amulet - protects from cursed treasure.

holy water - kills assorted faeries.

hermit - reduces sin by 25% and adds some mana.

Type three

shield - adds to maximum energy level.

virgin - used to subdue a unicorn, or to give much experience (and some sin).

athelas - subtracts one poison.

Type four (scrolls)

shield - throws a bigger than normal force field.

invisible - temporarily puts the finder's quickness to one million.

ten fold strength - multiplies finder's strength by ten.

pick monster - allows finder to pick next monster to battle.

general knowledge - adds to finder's brains and magic level. All the scrolls except general knowledge automatically call a monster. These preserve any spells that were already in effect, but are only in effect while in battle.

Type five

dagger - adds to strength.

armour - same as a shield, but bigger.

tablet - adds brains.

Type six

priest - rests to maximum; adds mana, brains; and halves sin.

Robin Hood - increases shield and adds permanently to strength.

axe - like dagger, but bigger.

Type seven

charm - protects from cursed treasure (used before amulet); used in conjunction with blessing to battle Dark Lord.

Merlyn - adds brains, magic, and mana.

war hammer - like an axe, but bigger.

Type eight

healing potion - sets poison to -2, or subtracts two from poison, whichever is better.

transporter - allows finder to move anywhere.

sword - like a war hammer, but bigger.

Type nine

golden crown - allows the player to become king, by going to (0,0).

blessing - cuts sin to 1/3, adds mana, rests to maximum, kills Dark Lord with a charm, and gives bearer first hit on all monsters.

quicksilver - adds to quickness.

Type ten

elven boots - adds permanently to quickness.

Type eleven

palantir - allows one to see all the other players; used by council of the wise to seek the grail.

Type twelve/thirteen

ring - allows one to hit much harder in battle, etc.

Any treasure type 10-13 monsters may instead carry a type nine treasure.

A monster may also be carrying gold or gems. These are used at trading posts to buy things. A gem is worth 1000 gold pieces. Too much gold will slow a player down. One may carry 1000 plus 200 per level of gold. A gem weighs one half a gold piece. Monsters of treasure type 7 or higher may carry gems.

The chance of a cursed treasure is based upon treasure type. The more valuable treasures have a greater chance of being cursed. A cursed treasure knocks energy level very low, and adds 0.25 poison.

### Rings
Rings are only carried by nazguls and Dark Lords. They come in four different flavors. All rings rest the player to maximum and cause him/her to hit much harder in battle with monsters (assuming one has chosen to use the ring for battle.)

Two types of rings are cursed and come either from nazguls or Dark Lord. After a few times of using these types, the player falls under the control of the ring, and strange, random things will occur. Eventually, the player dies, and gives his/her name to a monster on the file. Dying before the ring is used up also renames the monster.

The two remaining types of rings are much more benign. The one from a nazgul is good for a limited number of battle rounds, and will save the player from death if it was being used when he/she died. The one from Dark Lord is the same, except that it never is used up. rings disappear after saving someone from death. In general, cursed rings occur much more often than normal ones. It is usually not a good idea to pick one up. The only way to get rid of a ring is to have a monster steal it.

### King
A player may become king by finding a crown and going to (0,0). Players must have a level in the range of 10 to 1000 to be able to find a crown. When a player with one or more crowns reaches level 1000, the crowns are converted to gold.

Once a player is king, he/she may do certain things while in the Lord's Chamber (0,0). These are exercised with the decree ('0') option.

transport

This is done to another player. It randomly moves the affected player about. A charm protects from transports.

curse

This is done to another player. It is analogous to cursed treasure, but worse. It inflicts two poison, knocks energy level very low, and degrades the maximum energy. It also removes a cloak. A blessing protects from king's curses.

energy void

The king may put a number of these scattered about his/her kingdom as he/she pleases. If a player hits one, he/she loses mana, energy, and gold. The energy void disappears after being hit.

bestow

This is also done to another player. The king may wish to reward one or more loyal subjects by sharing his/her riches (gold). Or it is a convenient way to dispose of some unwanted deadweight.

collect taxes

Everyone pays 7% tax on all gold and gems acquired, regardless of the existence of a king. The king collects the accrued taxes with this option.

The king may also teleport anywhere for free by using the origin as a starting place.

### Council of the Wise, Valar
A player automatically becomes a member of the council of the wise upon reaching level 3000. Members of the council cannot have rings. Members of the council have a few extra options which they can exercise. These are exercised with the intervene ('8') option. All intervene options cost 1000 mana. One intervene option is to heal another player. This is just a quick way for that player to be rested to maximum and lose a little poison. The main purpose in life for members of the council is to seek the Holy Grail. This is done with a palantir under the seek grail option. The distance cited by the seek is accurate within 10%, in order not to make it too easy to find the grail. A player must have infinitesimally small sin, or else it's all over upon finding the grail. In order to help members of the council on their quest, they may teleport with greater ease.

Upon finding the grail, the player advances to position of valar. He/she may then exercise more and niftier options under intervention. These include all of the council members' options plus the ability to move other players about, bless them, and throw monsters at them. A valar's blessing has the same effect as the treasure blessing, except that the affected player does not get his/her blessing flag set. All intervention options which affect other players age the player who uses them. Valars are essentially immortal, but are actually given five lives. If these are used up, the player is left to die, and becomes an ex-valar. A valar cannot move, teleport, or call monsters. (An exception to this is if the valar finds a transporter.) This is to allow him/her to dispose of excess gold. Any monsters which a valar encounters are based upon his/her size. Only one valar may exist at a time. The current valar is replaced when another player finds the grail. The valar is then bumped back to the council of the wise.

### Wizard
The wizard is usually the owner of the game, and the one who maintains the associated files. The wizard is granted special powers within the game, if it is invoked with the -S option. Otherwise, the wizard plays no different from other players. The wizard abilities are outlined below.

change players

When examining a player, (game invoked with -x, or use 'X' from within game), the wizard may also change the player.

intervention

The wizard may do all the intervention options. One extra option, vaporize, is added to kill any offensive players.

super character type

An extra character type is added. This character starts with the maximum possible in all statistics, selected from the other character types. A super character's statistics also progress at the maximum possible rate, selected from the other character types.

### Special Places
Certain regions of the playing grid have different names. In general, this is only to give the player some idea of his/her present location. Some special places do exist.

Trading Posts

These are located at |x| == |y| == n*n*100 for n = 1, 2, ..., 1000. Trading posts farther out have more things for sale. Be careful about cheating the merchants there, as they have short tempers. Merchants are dishonest about 5% of the time.

Lord's Chamber

This is located at (0,0). Only players with crowns may enter.

Point of No Return

This is located beyond 1.2e+6 in any direction. The only way to return from here is a transporter or to have a valar relocate the player.

Dead Marshes

This is a band located fairly distant from the origin. The first fourteen monsters (water monsters) can normally only be found here.

Valhala

This place is where the valar resides. It is associated with no particular coordinate on the playing grid.

### Miscellaneous
Once a player reaches level 5, the game will start to time out waiting for input. This is to try to keep the game a bit faster paced.

A guru will never be disgusted with your sins if they are less than one.

A medic wants half of a player's gold to be happy. Offering more than one has, or a negative amount will anger the medic, who will make the player worse (add one poison).

The Holy Grail does little for those who are not ready to behold it. Whenever anyone finds it, it moves. It is always located within 1e+6 in any compass direction of the origin.

There is a maximum amount of mana and charms a player may posses, based upon level. Quicksilver is always limited to to a maximum of 99.

Books bought at a trading post increase brains, based upon the number bought. It is unwise, however to buy more than 1/10 of one's level in books at a time.

Players over level 10000 are automatically retired.

A blindness goes away in random time.

Players with crowns are identified with a '*' before their character type.

### Inter-terminal Battle
When two player's coordinates correspond, they may engage in battle. In general, the player with the highest quickness gets the first hit. If the two players are severely mismatched, the stronger player is drastically handicapped for the battle. In order to protect from being stuck in an infinite loop, the player waiting for response may time out. Options for battle are:

fight

Inflicts damage upon other person.

run away

Escape from battle. Has a 75% chance of working.

power blast

Battle spell.

luckout

One-time chance to try to win against the foe. Has a 10% chance of working.

Sometimes waits for the other player may be excessive, because he/she may be battling a monster. Upon slaying a player in battle the winner gets the other's experience and treasures. Rings do not work for inter-terminal battle.

## AUTHORS
Edward Estes, AT&T Information Systems, Skokie, IL

## BUGS
All screen formats assume at least 24 lines by at least 80 columns. No provisions are made for when any of the data items get too big for the allotted space on the screen.


pig

package: bsd-games

title: pig(6)

summary: eformatray inputway asway Igpay Atinlay

text:
# pig(6)

## NAME
pig — eformatray inputway asway Igpay Atinlay

## SYNOPSIS
pig

## DESCRIPTION
Ethay igpay utilityway eadsray ethay andardstay inputway andway iteswray itway outway otay andardstay outputway inway Igpay Atinlay.

Usefulway orfay eneratinggay onthlymay eportsray.


pom

title: pom(6)

summary: display the phase of the moon

text:
# pom(6)

## NAME
pom — display the phase of the moon

## SYNOPSIS
pom

[[[[[[cc]yy]mm]dd]HH]]

## DESCRIPTION
The pom utility displays the current phase of the moon. Useful for selecting software completion target dates and predicting managerial behavior.

[[[[[cc]yy]mm]dd]HH]

Display the phase of the moon for a given time. The format is similar to the canonical representation used by date(1).

## SEE ALSO
date(1)

## AUTHOR
pom was written by Keith E. Brandt.

## BUGS
Times must be within range of the UNIX epoch.

This program does not allow for the difference between the TDT and UTC timescales (about one minute at the time of writing).

## ACKNOWLEDGEMENTS
This program is based on algorithms from Practical Astronomy with Your Calculator, Third Edition by Peter Duffett-Smith ⟨pjds@mrao.cam.ac.uk⟩.


primes

title: primes(6)

summary: generate primes

text:
# primes(6)

## NAME
primes — generate primes

## SYNOPSIS
primes

[start [stop]]

## DESCRIPTION
The primes utility prints primes in ascending order, one per line, starting at or above start and continuing until, but not including stop. The start value must be at least 0 and not greater than stop. The stop value must not be greater than 4294967295. The default value of stop is 4294967295.

When the primes utility is invoked with no arguments, start is read from standard input. stop is taken to be 4294967295. The start value may be preceded by a single ‘+’. The start value is terminated by a non-digit character (such as a newline). The input line must not be longer than 255 characters.

## DIAGNOSTICS
Out of range or invalid input results in an appropriate error message being written to standard error.

## BUGS
primes won't get you a world record.


quiz

title: quiz(6)

summary: random knowledge tests

text:
# quiz(6)

## NAME
quiz — random knowledge tests

## SYNOPSIS
quiz

[-t] [-i file] [question answer]

## DESCRIPTION
The quiz utility tests your knowledge of random facts. It has a database of subjects from which you can choose. With no arguments, quiz displays the list of available subjects.

The options are as follows:

-t

Use tutorial mode, in which questions are repeated later if you didn't get them right the first time, and new questions are presented less frequently to help you learn the older ones.

-i

Specify an alternative index file.

Subjects are divided into categories. You can pick any two categories from the same subject. quiz will ask questions from the first category and it expects answers from the second category. For example, the command “quiz victim killer” asks questions which are the names of victims, and expects you to answer with the cause of their untimely demise, whereas the command “quiz killer victim” works the other way around.

If you get the answer wrong, quiz lets you try again. To see the right answer, enter a blank line.

### Index and Data File Syntax
The index and data files have a similar syntax. Lines in them consist of several categories separated by colons. The categories are regular expressions formed using the following meta-characters:

pat|pat

alternative patterns

{pat}

optional pattern

[pat]

delimiters, as in pat[pat|pat]pat

In an index file, each line represents a subject. The first category in each subject is the pathname of the data file for the subject. The remaining categories are regular expressions for the titles of each category in the subject.

In data files, each line represents a question/answer set. Each category is the information for the question/answer for that category.

The backslash character (``\'') is used to quote syntactically significant characters, or at the end of a line to signify that a continuation line follows.

If either a question or its answer is empty, quiz will refrain from asking it.

## FILES
/usr/share/bsd-games//quiz

The default index and data files.

## BUGS
quiz is pretty cynical about certain subjects.


rain

title: rain(6)

summary: animated raindrops display

text:
# rain(6)

## NAME
rain — animated raindrops display

## SYNOPSIS
rain

[-d delay]

## DESCRIPTION
The output of rain is modeled after the VAX/VMS program of the same name. To obtain the proper effect, either the terminal must be set for 9600 baud or the -d option must be used to specify a delay, in milliseconds, between each update. A reasonable delay is 120; the default is 0.

## AUTHOR
Eric P. Scott


random

title: random(6)

text:
# random(6)

## NAME
random — random lines from a file or random numbers

## SYNOPSIS
random

[-er] [denominator]

## DESCRIPTION
random reads lines from the standard input and copies them to the standard output with a probability of 1/denominator. The default value for denominator is 2.

The options are as follows:

-e

If the -e option is specified, random does not read or write anything, and simply exits with a random exit value of 0 to denominator-1, inclusive.

-r

The -r option guarantees that the output is unbuffered.

## SEE ALSO
fortune(6)


robots

title: robots(6)

summary: fight off villainous robots

text:
# robots(6)

## NAME
robots — fight off villainous robots

## SYNOPSIS
robots

[-Asjtan] [scorefile]

## DESCRIPTION
robots pits you against evil robots, who are trying to kill you (which is why they are evil). Fortunately for you, even though they are evil, they are not very bright and have a habit of bumping into each other, thus destroying themselves. In order to survive, you must get them to kill each other off, since you have no offensive weaponry.

Since you are stuck without offensive weaponry, you are endowed with one piece of defensive weaponry: a teleportation device. When two robots run into each other or a junk pile, they die. If a robot runs into you, you die. When a robot dies, you get 10 points, and when all the robots die, you start on the next field. This keeps up until they finally get you.

Robots are represented on the screen by a ‘+’, the junk heaps from their collisions by a ‘∗’, and you (the good guy) by a ‘@’.

The commands are:

h

move one square left

l

move one square right

k

move one square up

j

move one square down

y

move one square up and left

u

move one square up and right

b

move one square down and left

n

move one square down and right

.

(also space) do nothing for one turn

HJKLBNYU

run as far as possible in the given direction

>

do nothing for as long as possible

t

teleport to a random location

w

wait until you die or they all do

q

quit

^L

redraw the screen

All commands can be preceded by a count.

If you use the ‘w’ command and survive to the next level, you will get a bonus of 10% for each robot which died after you decided to wait. If you die, however, you get nothing. For all other commands, the program will save you from typos by stopping short of being eaten. However, with ‘w’ you take the risk of dying by miscalculation.

Only five scores are allowed per user on the score file. If you make it into the score file, you will be shown the list at the end of the game. If an alternative score file is specified, that will be used instead of the standard file for scores.

The options are

-s

Don't play, just show the score file.

-j

Jump, i.e., when you run, don't show any intermediate positions; only show things at the end. This is useful on slow terminals.

-t

Teleport automatically when you have no other option. This is a little disconcerting until you get used to it, and then it is very nice.

-a

Advance into the higher levels directly, skipping the lower, easier levels.

-A

Auto-bot mode. Lets the game play itself.

-n

Increase the number of games played by one.

## AUTHOR
Ken Arnold Christos Zoulas (autobot mode)

## FILES
/var/games//robots_roll

the score file

## BUGS
Bugs? You crazy, man?!?


sail

title: sail(6)

summary: multi-user wooden ships and iron men

text:
# sail(6)

## NAME
sail - multi-user wooden ships and iron men

## SYNOPSIS
sail [ -s [ -l ] ] [ -x ] [ -b ] [ num ]

## DESCRIPTION
Sail is a computer version of Avalon Hill's game of fighting sail originally developed by S. Craig Taylor.

Players of Sail take command of an old fashioned Man of War and fight other players or the computer. They may re-enact one of the many historical sea battles recorded in the game, or they can choose a fictional battle.

As a sea captain in the Sail Navy, the player has complete control over the workings of his ship. He must order every maneuver, change the set of his sails, and judge the right moment to let loose the terrible destruction of his broadsides. In addition to fighting the enemy, he must harness the powers of the wind and sea to make them work for him. The outcome of many battles during the age of sail was decided by the ability of one captain to hold the `weather gage.'

The flags are:

-s

Print the names and ships of the top ten sailors.

-l

Show the login name. Only effective with -s.

-x

Play the first available ship instead of prompting for a choice.

-b

No bells.

## IMPLEMENTATION
Sail is really two programs in one. Each player starts up a process which runs his own ship. In addition, a driver process is forked (by the first player) to run the computer ships and take care of global bookkeeping.

Because the driver must calculate moves for each ship it controls, the more ships the computer is playing, the slower the game will appear.

If a player joins a game in progress, he will synchronize with the other players (a rather slow process for everyone), and then he may play along with the rest.

To implement a multi-user game in Version 7 UNIX, which was the operating system Sail was first written under, the communicating processes must use a common temporary file as a place to read and write messages. In addition, a locking mechanism must be provided to ensure exclusive access to the shared file. For example, Sail uses a temporary file named /tmp/#sailsink.21 for scenario 21, and corresponding file names for the other scenarios. To provide exclusive access to the temporary file, Sail uses a technique stolen from an old game called "pubcaves" by Jeff Cohen. Processes do a busy wait in the loop

for (n = 0; link(sync_file, sync_lock) < 0 && n < 30; n++)

sleep(2);

until they are able to create a link to a file named "/tmp/#saillock.??". The "??" correspond to the scenario number of the game. Since UNIX guarantees that a link will point to only one file, the process that succeeds in linking will have exclusive access to the temporary file.

Whether or not this really works is open to speculation. When ucbmiro was rebooted after a crash, the file system check program found 3 links between the Sail temporary file and its link file.

## CONSEQUENCES OF SEPARATE PLAYER AND DRIVER PROCESSES
When players do something of global interest, such as moving or firing, the driver must coordinate the action with the other ships in the game. For example, if a player wants to move in a certain direction, he writes a message into the temporary file requesting the driver to move his ship. Each ``turn,'' the driver reads all the messages sent from the players and decides what happened. It then writes back into the temporary file new values of variables, etc.

The most noticeable effect this communication has on the game is the delay in moving. Suppose a player types a move for his ship and hits return. What happens then? The player process saves up messages to be written to the temporary file in a buffer. Every 7 seconds or so, the player process gets exclusive access to the temporary file and writes out its buffer to the file. The driver, running asynchronously, must read in the movement command, process it, and write out the results. This takes two exclusive accesses to the temporary file. Finally, when the player process gets around to doing another 7 second update, the results of the move are displayed on the screen. Hence, every movement requires four exclusive accesses to the temporary file (anywhere from 7 to 21 seconds depending upon asynchrony) before the player sees the results of his moves.

In practice, the delays are not as annoying as they would appear. There is room for "pipelining" in the movement. After the player writes out a first movement message, a second movement command can then be issued. The first message will be in the temporary file waiting for the driver, and the second will be in the file buffer waiting to be written to the file. Thus, by always typing moves a turn ahead of the time, the player can sail around quite quickly.

If the player types several movement commands between two 7 second updates, only the last movement command typed will be seen by the driver. Movement commands within the same update "overwrite" each other, in a sense.

## THE HISTORY OF SAIL
I wrote the first version of Sail on a PDP-11/70 in the fall of 1980. Needless to say, the code was horrendous, not portable in any sense of the word, and didn't work. The program was not very modular and had fseeks() and fwrites() every few lines. After a tremendous rewrite from the top down, I got the first working version up by 1981. There were several annoying bugs concerning firing broadsides and finding angles. Sail uses no floating point, by the way, so the direction routines are rather tricky. Ed Wang rewrote my angle() routine in 1981 to be more correct (although it still doesn't work perfectly), and he added code to let a player select which ship he wanted at the start of the game (instead of the first one available).

Captain Happy (Craig Leres) is responsible for making Sail portable for the first time. This was no easy task, by the way. Constants like 2 and 10 were very frequent in the code. I also became famous for using "Riggle Memorial Structures" in Sail. Many of my structure references are so long that they run off the line printer page. Here is an example, if you promise not to laugh.

specs[scene[flog.fgamenum].ship[flog.fshipnum].shipnum].pts

Sail received its fourth and most thorough rewrite in the summer and fall of 1983. Ed Wang rewrote and modularized the code (a monumental feat) almost from scratch. Although he introduced many new bugs, the final result was very much cleaner and (?) faster. He added window movement commands and find ship commands.

## HISTORICAL INFO
Old Square Riggers were very maneuverable ships capable of intricate sailing. Their only disadvantage was an inability to sail very close to the wind. The design of a wooden ship allowed only for the guns to bear to the left and right sides. A few guns of small aspect (usually 6 or 9 pounders) could point forward, but their effect was small compared to a 68 gun broadside of 24 or 32 pounders. The guns bear approximately like so:

```
       \

        b----------------

    ---0

        \

         \

          \     up to a range of ten (for round shot)

           \

            \

             \
```

An interesting phenomenon occurred when a broadside was fired down the length of an enemy ship. The shot tended to bounce along the deck and did several times more damage. This phenomenon was called a rake. Because the bows of a ship are very strong and present a smaller target than the stern, a stern rake (firing from the stern to the bow) causes more damage than a bow rake.

```
                        b

                       00   ----  Stern rake!

                         a
```

Most ships were equipped with carronades, which were very large, close range cannons. American ships from the revolution until the War of 1812 were almost entirely armed with carronades.

The period of history covered in Sail is approximately from the 1770's until the end of Napoleonic France in 1815. There are many excellent books about the age of sail. My favorite author is Captain Frederick Marryat. More contemporary authors include C.S. Forester and Alexander Kent.

Fighting ships came in several sizes classed by armament. The mainstays of any fleet were its "Ships of the Line", or "Line of Battle Ships". They were so named because these ships fought together in great lines. They were close enough for mutual support, yet every ship could fire both its broadsides. We get the modern words "ocean liner," or "liner," and "battleship" from "ship of the line." The most common size was the 74 gun two decked ship of the line. The two gun decks usually mounted 18 and 24 pounder guns.

The pride of the fleet were the first rates. These were huge three decked ships of the line mounting 80 to 136 guns. The guns in the three tiers were usually 18, 24, and 32 pounders in that order from top to bottom.

Various other ships came next. They were almost all "razees," or ships of the line with one deck sawed off. They mounted 40-64 guns and were a poor cross between a frigate and a line of battle ship. They neither had the speed of the former nor the firepower of the latter.

Next came the "eyes of the fleet." Frigates came in many sizes mounting anywhere from 32 to 44 guns. They were very handy vessels. They could outsail anything bigger and outshoot anything smaller. Frigates didn't fight in lines of battle as the much bigger 74's did. Instead, they harassed the enemy's rear or captured crippled ships. They were much more useful in missions away from the fleet, such as cutting out expeditions or boat actions. They could hit hard and get away fast.

Lastly, there were the corvettes, sloops, and brigs. These were smaller ships mounting typically fewer than 20 guns. A corvette was only slightly smaller than a frigate, so one might have up to 30 guns. Sloops were used for carrying dispatches or passengers. Brigs were something you built for land-locked lakes.

## SAIL PARTICULARS
Ships in Sail are represented by two characters. One character represents the bow of the ship, and the other represents the stern. Ships have nationalities and numbers. The first ship of a nationality is number 0, the second number 1, etc. Therefore, the first British ship in a game would be printed as "b0". The second Brit would be "b1", and the fifth Don would be "s4".

Ships can set normal sails, called Battle Sails, or bend on extra canvas called Full Sails. A ship under full sail is a beautiful sight indeed, and it can move much faster than a ship under Battle Sails. The only trouble is, with full sails set, there is so much tension on sail and rigging that a well aimed round shot can burst a sail into ribbons where it would only cause a little hole in a loose sail. For this reason, rigging damage is doubled on a ship with full sails set. Don't let that discourage you from using full sails. I like to keep them up right into the heat of battle. A ship with full sails set has a capital letter for its nationality. E.g., a Frog, "f0", with full sails set would be printed as "F0".

When a ship is battered into a listing hulk, the last man aboard "strikes the colors." This ceremony is the ship's formal surrender. The nationality character of a surrendered ship is printed as "!". E.g., the Frog of our last example would soon be "!0".

A ship has a random chance of catching fire or sinking when it reaches the stage of listing hulk. A sinking ship has a "~" printed for its nationality, and a ship on fire and about to explode has a "#" printed.

Captured ships become the nationality of the prize crew. Therefore, if an American ship captures a British ship, the British ship will have an "a" printed for its nationality. In addition, the ship number is changed to "&","'", "(", ,")", "*", or "+" depending upon the original number, be it 0,1,2,3,4, or 5. E.g., the "b0" captured by an American becomes the "a&". The "s4" captured by a Frog becomes the "f*".

The ultimate example is, of course, an exploding Brit captured by an American: "#&".

## MOVEMENT
Movement is the most confusing part of Sail to many. Ships can head in 8 directions:

```
                                 0      0      0

        b       b       b0      b       b       b       0b      b

        0        0                                             0
```

The stern of a ship moves when it turns. The bow remains stationary. Ships can always turn, regardless of the wind (unless they are becalmed). All ships drift when they lose headway. If a ship doesn't move forward at all for two turns, it will begin to drift. If a ship has begun to drift, then it must move forward before it turns, if it plans to do more than make a right or left turn, which is always possible.

Movement commands to Sail are a string of forward moves and turns. An example is "l3". It will turn a ship left and then move it ahead 3 spaces. In the drawing above, the "b0" made 7 successive left turns. When Sail prompts you for a move, it prints three characters of import. E.g.,

```
	move (7, 4):
```

The first number is the maximum number of moves you can make, including turns. The second number is the maximum number of turns you can make. Between the numbers is sometimes printed a quote "'". If the quote is present, it means that your ship has been drifting, and you must move ahead to regain headway before you turn (see note above). Some of the possible moves for the example above are as follows:

```
	move (7, 4): 7
	move (7, 4): 1
	move (7, 4): d		/* drift, or do nothing */
	move (7, 4): 6r
	move (7, 4): 5r1
	move (7, 4): 4r1r
	move (7, 4): l1r1r2
	move (7, 4): 1r1r1r1
```

Because square riggers performed so poorly sailing into the wind, if at any point in a movement command you turn into the wind, the movement stops there. E.g.,

```
	move (7, 4): l1l4
	Movement Error;
	Helm: l1l
```

Moreover, whenever you make a turn, your movement allowance drops to min(what's left, what you would have at the new attitude). In short, if you turn closer to the wind, you most likely won't be able to sail the full allowance printed in the "move" prompt. Old sailing captains had to keep an eye constantly on the wind. Captains in Sail are no different. A ship's ability to move depends on its attitude to the wind. The best angle possible is to have the wind off your quarter, that is, just off the stern. The direction rose on the side of the screen gives the possible movements for your ship at all positions to the wind. Battle sail speeds are given first, and full sail speeds are given in parenthesis.

```
				 0 1(2)
				\|/
				-^-3(6)
				/|\
				 | 4(7)
				3(6)
```

Pretend the bow of your ship (the "^") is pointing upward and the wind is blowing from the bottom to the top of the page. The numbers at the bottom "3(6)" will be your speed under battle or full sails in such a situation. If the wind is off your quarter, then you can move "4(7)". If the wind is off your beam, "3(6)". If the wind is off your bow, then you can only move "1(2)". Facing into the wind, you can't move at all. Ships facing into the wind were said to be "in irons".

## WINDSPEED AND DIRECTION
The windspeed and direction is displayed as a little weather vane on the side of the screen. The number in the middle of the vane indicates the wind speed, and the + to - indicates the wind direction. The wind blows from the + sign (high pressure) to the - sign (low pressure). E.g.,

```
				|
				3
				+
```

The wind speeds are 0 = becalmed, 1 = light breeze, 2 = moderate breeze, 3 = fresh breeze, 4 = strong breeze, 5 = gale, 6 = full gale, 7 = hurricane. If a hurricane shows up, all ships are destroyed.

## GRAPPLING AND FOULING
If two ships collide, they run the risk of becoming tangled together. This is called "fouling." Fouled ships are stuck together, and neither can move. They can unfoul each other if they want to. Boarding parties can only be sent across to ships when the antagonists are either fouled or grappled.

Ships can grapple each other by throwing grapnels into the rigging of the other.

The number of fouls and grapples you have are displayed on the upper right of the screen.

## BOARDING
Boarding was a very costly venture in terms of human life. Boarding parties may be formed in Sail to either board an enemy ship or to defend your own ship against attack. Men organized as Defensive Boarding Parties fight twice as hard to save their ship as men left unorganized.

The boarding strength of a crew depends upon its quality and upon the number of men sent.

## CREW QUALITY
The British seaman was world renowned for his sailing abilities. American sailors, however, were actually the best seamen in the world. Because the American Navy offered twice the wages of the Royal Navy, British seamen who liked the sea defected to America by the thousands.

In Sail, crew quality is quantized into 5 energy levels. "Elite" crews can outshoot and outfight all other sailors. "Crack" crews are next. "Mundane" crews are average, and "Green" and "Mutinous" crews are below average. A good rule of thumb is that "Crack" or "Elite" crews get one extra hit per broadside compared to "Mundane" crews. Don't expect too much from "Green" crews.

## BROADSIDES
Your two broadsides may be loaded with four kinds of shot: grape, chain, round, and double. You have guns and carronades in both the port and starboard batteries. Carronades only have a range of two, so you have to get in close to be able to fire them. You have the choice of firing at the hull or rigging of another ship. If the range of the ship is greater than 6, then you may only shoot at the rigging.

The types of shot and their advantages are:

## ROUND
Range of 10. Good for hull or rigging hits.

## DOUBLE
Range of 1. Extra good for hull or rigging hits. Double takes two turns to load.

## CHAIN
Range of 3. Excellent for tearing down rigging. Cannot damage hull or guns, though.

## GRAPE
Range of 1. Sometimes devastating against enemy crews.

On the side of the screen is displayed some vital information about your ship:

```
			Load  D! R!
			Hull  9
			Crew  4  4  2
			Guns  4  4
			Carr  2  2
			Rigg  5 5 5 5
```

"Load" shows what your port (left) and starboard (right) broadsides are loaded with. A "!" after the type of shot indicates that it is an initial broadside. Initial broadside were loaded with care before battle and before the decks ran red with blood. As a consequence, initial broadsides are a little more effective than broadsides loaded later. A "*" after the type of shot indicates that the gun crews are still loading it, and you cannot fire yet. "Hull" shows how much hull you have left. "Crew" shows your three sections of crew. As your crew dies off, your ability to fire decreases. "Guns" and "Carr" show your port and starboard guns. As you lose guns, your ability to fire decreases. "Rigg" shows how much rigging you have on your 3 or 4 masts. As rigging is shot away, you lose mobility.

## EFFECTIVENESS OF FIRE
It is very dramatic when a ship fires its thunderous broadsides, but the mere opportunity to fire them does not guarantee any hits. Many factors influence the destructive force of a broadside. First of all, and the chief factor, is distance. It is harder to hit a ship at range ten than it is to hit one sloshing alongside. Next is raking. Raking fire, as mentioned before, can sometimes dismast a ship at range ten. Next, crew size and quality affects the damage done by a broadside. The number of guns firing also bears on the point, so to speak. Lastly, weather affects the accuracy of a broadside. If the seas are high (5 or 6), then the lower gunports of ships of the line can't even be opened to run out the guns. This gives frigates and other flush decked vessels an advantage in a storm. The scenario Pellew vs. The Droits de L'Homme takes advantage of this peculiar circumstance.

## REPAIRS
Repairs may be made to your Hull, Guns, and Rigging at the slow rate of two points per three turns. The message "Repairs Completed" will be printed if no more repairs can be made.

## PECULIARITIES OF COMPUTER SHIPS
Computer ships in Sail follow all the rules above with a few exceptions. Computer ships never repair damage. If they did, the players could never beat them. They play well enough as it is. As a consolation, the computer ships can fire double shot every turn. That fluke is a good reason to keep your distance. The Driver figures out the moves of the computer ships. It computes them with a typical A.I. distance function and a depth first search to find the maximum "score." It seems to work fairly well, although I'll be the first to admit it isn't perfect.

## HOW TO PLAY
Commands are given to Sail by typing a single character. You will then be prompted for further input. A brief summary of the commands follows.

## COMMAND SUMMARY

```
    'f'  Fire broadsides if they bear

    'l'  Reload

    'L'  Unload broadsides (to change ammo)

    'm'  Move

    'i'  Print the closest ship

    'I'  Print all ships

    'F'  Find a particular ship or ships (e.g. "a?" for all Americans)

    's'  Send a message around the fleet

    'b'  Attempt to board an enemy ship

    'B'  Recall boarding parties

    'c'  Change set of sail

    'r'  Repair

    'u'  Attempt to unfoul

    'g'  Grapple/ungrapple

    'v'  Print version number of game

   '^L'  Redraw screen

    'Q'  Quit

    'C'      Center your ship in the window

    'U'	     Move window up

    'D','N'  Move window down

    'H'	     Move window left

    'J'	     Move window right

    'S'      Toggle window to follow your ship or stay where it is
```

## SCENARIOS
Here is a summary of the scenarios in Sail:

## Ranger vs. Drake:

```
Wind from the N, blowing a fresh breeze.
(a) Ranger            19 gun Sloop (crack crew) (7 pts)
(b) Drake             17 gun Sloop (crack crew) (6 pts)
```

## The Battle of Flamborough Head:

```
Wind from the S, blowing a fresh breeze.
```

This is John Paul Jones' first famous battle. Aboard the Bonhomme Richard, he was able to overcome the Serapis's greater firepower by quickly boarding her.

```
(a) Bonhomme Rich     42 gun Corvette (crack crew) (11 pts)
(b) Serapis           44 gun Frigate (crack crew) (12 pts)
```

## Arbuthnot and Des Touches:

```
Wind from the N, blowing a gale.
(b) America           64 gun Ship of the Line (crack crew) (20 pts)
(b) Befford           74 gun Ship of the Line (crack crew) (26 pts)
(b) Adamant           50 gun Ship of the Line (crack crew) (17 pts)
(b) London            98 gun 3 Decker SOL (crack crew) (28 pts)
(b) Royal Oak         74 gun Ship of the Line (crack crew) (26 pts)
(f) Neptune           74 gun Ship of the Line (average crew) (24 pts)
(f) Duc de Bourgogne  80 gun 3 Decker SOL (average crew) (27 pts)
(f) Conquerant        74 gun Ship of the Line (average crew) (24 pts)
(f) Provence          64 gun Ship of the Line (average crew) (18 pts)
(f) Romulus           44 gun Ship of the Line (average crew) (10 pts)
```

## Suffren and Hughes:

```
Wind from the S, blowing a fresh breeze.
(b) Monmouth          74 gun Ship of the Line (average crew) (24 pts)
(b) Hero              74 gun Ship of the Line (crack crew) (26 pts)
(b) Isis              50 gun Ship of the Line (crack crew) (17 pts)
(b) Superb            74 gun Ship of the Line (crack crew) (27 pts)
(b) Burford           74 gun Ship of the Line (average crew) (24 pts)
(f) Flamband          50 gun Ship of the Line (average crew) (14 pts)
(f) Annibal           74 gun Ship of the Line (average crew) (24 pts)
(f) Severe            64 gun Ship of the Line (average crew) (18 pts)
(f) Brilliant         80 gun Ship of the Line (crack crew) (31 pts)
(f) Sphinx            80 gun Ship of the Line (average crew) (27 pts)
```

## Nymphe vs. Cleopatre:

```
Wind from the S, blowing a fresh breeze.
(b) Nymphe            36 gun Frigate (crack crew) (11 pts)
(f) Cleopatre         36 gun Frigate (average crew) (10 pts)
```

## Mars vs. Hercule:
Wind from the S, blowing a fresh breeze.

```
(b) Mars              74 gun Ship of the Line (crack crew) (26 pts)
(f) Hercule           74 gun Ship of the Line (average crew) (23 pts)
```

## Ambuscade vs. Baionnaise:

```
Wind from the N, blowing a fresh breeze.
(b) Ambuscade         32 gun Frigate (average crew) (9 pts)
(f) Baionnaise        24 gun Corvette (average crew) (9 pts)
```

## Constellation vs. Insurgent:

```
Wind from the S, blowing a gale.
(a) Constellation     38 gun Corvette (elite crew) (17 pts)
(f) Insurgent         36 gun Corvette (average crew) (11 pts)
```

## Constellation vs. Vengeance:

```
Wind from the S, blowing a fresh breeze.
(a) Constellation     38 gun Corvette (elite crew) (17 pts)
(f) Vengeance         40 gun Frigate (average crew) (15 pts)
```

## The Battle of Lissa:

```
Wind from the S, blowing a fresh breeze.
(b) Amphion           32 gun Frigate (elite crew) (13 pts)
(b) Active            38 gun Frigate (elite crew) (18 pts)
(b) Volage            22 gun Frigate (elite crew) (11 pts)
(b) Cerberus          32 gun Frigate (elite crew) (13 pts)
(f) Favorite          40 gun Frigate (average crew) (15 pts)
(f) Flore             40 gun Frigate (average crew) (15 pts)
(f) Danae             40 gun Frigate (crack crew) (17 pts)
(f) Bellona           32 gun Frigate (green crew) (9 pts)
(f) Corona            40 gun Frigate (green crew) (12 pts)
(f) Carolina          32 gun Frigate (green crew) (7 pts)
```

## Constitution vs. Guerriere:

```
Wind from the SW, blowing a gale.
(a) Constitution      44 gun Corvette (elite crew) (24 pts)
(b) Guerriere         38 gun Frigate (crack crew) (15 pts)
```

## United States vs. Macedonian:

```
Wind from the S, blowing a fresh breeze.
(a) United States     44 gun Frigate (elite crew) (24 pts)
(b) Macedonian        38 gun Frigate (crack crew) (16 pts)
```

## Constitution vs. Java:

```
Wind from the S, blowing a fresh breeze.
(a) Constitution      44 gun Corvette (elite crew) (24 pts)
(b) Java              38 gun Corvette (crack crew) (19 pts)
```

## Chesapeake vs. Shannon:

```
Wind from the S, blowing a fresh breeze.
(a) Chesapeake        38 gun Frigate (average crew) (14 pts)
(b) Shannon           38 gun Frigate (elite crew) (17 pts)
```

## The Battle of Lake Erie:

```
Wind from the S, blowing a light breeze.
(a) Lawrence          20 gun Sloop (crack crew) (9 pts)
(a) Niagara           20 gun Sloop (elite crew) (12 pts)
(b) Lady Prevost      13 gun Brig (crack crew) (5 pts)
(b) Detroit           19 gun Sloop (crack crew) (7 pts)
(b) Q. Charlotte      17 gun Sloop (crack crew) (6 pts)
```

## Wasp vs. Reindeer:

```
Wind from the S, blowing a light breeze.
(a) Wasp              20 gun Sloop (elite crew) (12 pts)
(b) Reindeer          18 gun Sloop (elite crew) (9 pts)
```

## Constitution vs. Cyane and Levant:
Wind from the S, blowing a moderate breeze.

(a) Constitution 44 gun Corvette (elite crew) (24 pts) (b) Cyane 24 gun Sloop (crack crew) (11 pts) (b) Levant 20 gun Sloop (crack crew) (10 pts)

## Pellew vs. Droits de L'Homme:

```
Wind from the N, blowing a gale.
(b) Indefatigable     44 gun Frigate (elite crew) (14 pts)
(b) Amazon            36 gun Frigate (crack crew) (14 pts)
(f) Droits L'Hom      74 gun Ship of the Line (average crew) (24 pts)
```

## Algeciras:

```
Wind from the SW, blowing a moderate breeze.
(b) Caesar            80 gun Ship of the Line (crack crew) (31 pts)
(b) Pompee            74 gun Ship of the Line (crack crew) (27 pts)
(b) Spencer           74 gun Ship of the Line (crack crew) (26 pts)
(b) Hannibal          98 gun 3 Decker SOL (crack crew) (28 pts)
(s) Real-Carlos       112 gun 3 Decker SOL (green crew) (27 pts)
(s) San Fernando      96 gun 3 Decker SOL (green crew) (24 pts)
(s) Argonauta         80 gun Ship of the Line (green crew) (23 pts)
(s) San Augustine     74 gun Ship of the Line (green crew) (20 pts)
(f) Indomptable       80 gun Ship of the Line (average crew) (27 pts)
(f) Desaix            74 gun Ship of the Line (average crew) (24 pts)
```

## Lake Champlain:

```
Wind from the N, blowing a fresh breeze.
(a) Saratoga          26 gun Sloop (crack crew) (12 pts)
(a) Eagle             20 gun Sloop (crack crew) (11 pts)
(a) Ticonderoga       17 gun Sloop (crack crew) (9 pts)
(a) Preble            7 gun Brig (crack crew) (4 pts)
(b) Confiance         37 gun Frigate (crack crew) (14 pts)
(b) Linnet            16 gun Sloop (elite crew) (10 pts)
(b) Chubb             11 gun Brig (crack crew) (5 pts)
```

## Last Voyage of the USS President:

```
Wind from the N, blowing a fresh breeze.
(a) President         44 gun Frigate (elite crew) (24 pts)
(b) Endymion          40 gun Frigate (crack crew) (17 pts)
(b) Pomone            44 gun Frigate (crack crew) (20 pts)
(b) Tenedos           38 gun Frigate (crack crew) (15 pts)
```

## Hornblower and the Natividad:

```
Wind from the E, blowing a gale.
```

A scenario for you Horny fans. Remember, he sank the Natividad against heavy odds and winds. Hint: don't try to board the Natividad, her crew is much bigger, albeit green.

```
(b) Lydia             36 gun Frigate (elite crew) (13 pts)
(s) Natividad         50 gun Ship of the Line (green crew) (14 pts)
```

## Curse of the Flying Dutchman:

```
Wind from the S, blowing a fresh breeze.
Just for fun, take the Piece of cake.
(s) Piece of Cake     24 gun Corvette (average crew) (9 pts)
(f) Flying Dutchy     120 gun 3 Decker SOL (elite crew) (43 pts)
```

## The South Pacific:

```
Wind from the S, blowing a strong breeze.
(a) USS Scurvy        136 gun 3 Decker SOL (mutinous crew) (27 pts)
(b) HMS Tahiti        120 gun 3 Decker SOL (elite crew) (43 pts)
(s) Australian        32 gun Frigate (average crew) (9 pts)
(f) Bikini Atoll      7 gun Brig (crack crew) (4 pts)
```

## Hornblower and the battle of Rosas bay:

```
Wind from the E, blowing a fresh breeze.
```

The only battle Hornblower ever lost. He was able to dismast one ship and stern rake the others though. See if you can do as well.

```
(b) Sutherland        74 gun Ship of the Line (crack crew) (26 pts)
(f) Turenne           80 gun 3 Decker SOL (average crew) (27 pts)
(f) Nightmare         74 gun Ship of the Line (average crew) (24 pts)
(f) Paris             112 gun 3 Decker SOL (green crew) (27 pts)
(f) Napoleon          74 gun Ship of the Line (green crew) (20 pts)
```

## Cape Horn:

```
Wind from the NE, blowing a strong breeze.
(a) Concord           80 gun Ship of the Line (average crew) (27 pts)
(a) Berkeley          98 gun 3 Decker SOL (crack crew) (28 pts)
(b) Thames            120 gun 3 Decker SOL (elite crew) (43 pts)
(s) Madrid            112 gun 3 Decker SOL (green crew) (27 pts)
(f) Musket            80 gun 3 Decker SOL (average crew) (27 pts)
```

## New Orleans:

```
Wind from the SE, blowing a fresh breeze.
Watch that little Cypress go!
(a) Alligator         120 gun 3 Decker SOL (elite crew) (43 pts)
(b) Firefly           74 gun Ship of the Line (crack crew) (27 pts)
(b) Cypress           44 gun Frigate (elite crew) (14 pts)
```

## Botany Bay:

```
Wind from the N, blowing a fresh breeze.
(b) Shark             64 gun Ship of the Line (average crew) (18 pts)
(f) Coral Snake       44 gun Corvette (elite crew) (24 pts)
(f) Sea Lion          44 gun Frigate (elite crew) (24 pts)
```

## Voyage to the Bottom of the Sea:

```
Wind from the NW, blowing a fresh breeze.
This one is dedicated to Richard Basehart and David Hedison.
(a) Seaview           120 gun 3 Decker SOL (elite crew) (43 pts)
(a) Flying Sub        40 gun Frigate (crack crew) (17 pts)
(b) Mermaid           136 gun 3 Decker SOL (mutinous crew) (27 pts)
(s) Giant Squid       112 gun 3 Decker SOL (green crew) (27 pts)
```

## Frigate Action:

```
Wind from the E, blowing a fresh breeze.
(a) Killdeer          40 gun Frigate (average crew) (15 pts)
(b) Sandpiper         40 gun Frigate (average crew) (15 pts)
(s) Curlew            38 gun Frigate (crack crew) (16 pts)
```

## The Battle of Midway:

```
Wind from the E, blowing a moderate breeze.
(a) Enterprise        80 gun Ship of the Line (crack crew) (31 pts)
(a) Yorktown          80 gun Ship of the Line (average crew) (27 pts)
(a) Hornet            74 gun Ship of the Line (average crew) (24 pts)
(j) Akagi             112 gun 3 Decker SOL (green crew) (27 pts)
(j) Kaga              96 gun 3 Decker SOL (green crew) (24 pts)
(j) Soryu             80 gun Ship of the Line (green crew) (23 pts)
```

## Star Trek:

```
Wind from the S, blowing a fresh breeze.
(a) Enterprise        450 gun Ship of the Line (elite crew) (75 pts)
(a) Yorktown          450 gun Ship of the Line (elite crew) (75 pts)
(a) Reliant           450 gun Ship of the Line (elite crew) (75 pts)
(a) Galileo           450 gun Ship of the Line (elite crew) (75 pts)
(k) Kobayashi Maru    450 gun Ship of the Line (elite crew) (75 pts)
(k) Klingon II        450 gun Ship of the Line (elite crew) (75 pts)
(o) Red Orion         450 gun Ship of the Line (elite crew) (75 pts)
(o) Blue Orion        450 gun Ship of the Line (elite crew) (75 pts)
```

## CONCLUSION
Sail has been a group effort.

## AUTHOR
Dave Riggle

## CO-AUTHOR
Ed Wang

## REFITTING
Craig Leres

## CONSULTANTS

```
Chris Guthrie
Captain Happy
Horatio Nelson
	and many valiant others...
```

## REFERENCES

```
Wooden Ships & Iron Men, by Avalon Hill
Captain Horatio Hornblower Novels, (13 of them) by C.S. Forester
Captain Richard Bolitho Novels, (12 of them) by Alexander Kent
The Complete Works of Captain Frederick Marryat, (about 20) especially

Mr. Midshipman Easy
Peter Simple
Jacob Faithful
Japhet in Search of a Father
Snarleyyow, or The Dog Fiend
Frank Mildmay, or The Naval Officer
```

## BUGS
Probably a few, and please report them to "riggle@ernie.berkeley.edu" and "edward@ucbarpa.berkeley.edu"


snake

title: snake(6)

summary: display chase game

text:
# snake(6)

## NAME
snake, snscore — display chase game

## SYNOPSIS
snake

[-w width] [-l length] [-t]

snscore

## DESCRIPTION
snake is a display-based game which must be played on a CRT terminal. The object of the game is to make as much money as possible without getting eaten by the snake. The -l and -w options allow you to specify the length and width of the field. By default the entire screen is used. The -t option makes the game assume you are on a slow terminal.

You are represented on the screen by an I. The snake is 6 squares long and is represented by s's with an S at its head. The money is $, and an exit is #. Your score is posted in the upper left hand corner.

You can move around using the same conventions as vi(1), the h, j, k, and l keys work, as do the arrow keys. Other possibilities include:

sefc

These keys are like hjkl but form a directed pad around the d key.

HJKL

These keys move you all the way in the indicated direction to the same row or column as the money. This does not let you jump away from the snake, but rather saves you from having to type a key repeatedly. The snake still gets all his turns.

SEFC

Likewise for the upper case versions on the left.

ATPB

These keys move you to the four edges of the screen. Their position on the keyboard is the mnemonic, e.g. P is at the far right of the keyboard.

x

This lets you quit the game at any time.

p

Points in a direction you might want to go.

w

Space warp to get out of tight squeezes, at a price.

To earn money, move to the same square the money is on. A new $ will appear when you earn the current one. As you get richer, the snake gets hungrier. To leave the game, move to the exit (#).

A record is kept of the personal best score of each player. Scores are only counted if you leave at the exit, getting eaten by the snake is worth nothing.

As in pinball, matching the last digit of your score to the number which appears after the game is worth a bonus.

To see who wastes time playing snake, run snscore.

## FILES
/var/games//snakerawscores

database of personal bests

/var/games//snake.log

log of games played

## BUGS
When playing on a small screen, it's hard to tell when you hit the edge of the screen.

The scoring function takes into account the size of the screen. A perfect function to do this equitably has not been devised.


trek

title: trek(6)

summary: trekkie game

text:
# trek(6)

## NAME
trek — trekkie game

## SYNOPSIS
trek

[[-a] file]

## DESCRIPTION
trek is a game of space glory and war. Below is a summary of commands. For complete documentation, see Trek by Eric Allman.

If a filename is given, a log of the game is written onto that file. If the -a flag is given before the filename, that file is appended to, not truncated.

The game will ask you what length game you would like. Valid responses are “short”, “medium”, and “long”. You may also type “restart”, which restarts a previously saved game. You will then be prompted for the skill, to which you must respond “novice”, “fair”, “good”, “expert”, “commodore”, or “impossible”. You should normally start out with a novice and work up.

In general, throughout the game, if you forget what is appropriate the game will tell you what it expects if you just type in a question mark.

## AUTHOR
Eric Allman

## SEE ALSO
/usr/share/doc/trek.me

## COMMAND SUMMARY

- abandon

- capture

- cloak up/down

- computer request; ...

- damages

- destruct

- dock

- help

- impulse course distance

- lrscan

- move course distance

- phasers automatic amount

- phasers manual amt1 course1 spread1 ...

- torpedo course [yes] angle/no

- ram course distance

- rest time

- shell

- shields up/down

- srscan [yes/ no]

- status

- terminate yes/no

- undock

- visual course

- warp warp_factor


vert-banner

title: vert-banner(6)

summary: print large banner on printer

text:
# vert-banner(6)

## NAME
vert-banner — print large banner on printer

## SYNOPSIS
vert-banner

[-w width] message ...

## DESCRIPTION
vert-banner prints a large, high quality banner on the standard output. If the message is omitted, it prompts for and reads one line of its standard input. If -w is given, the output is scrunched down from a width of 132 to width, suitable for a narrow terminal.

The output should be printed on paper of the appropriate width, with no breaks between the pages.

## BUGS
Several ASCII characters are not defined, notably <, >, [, ], \, ^, _, {, }, |, and ~. Also, the characters ", ', and & are funny looking (but in a useful way.)

The -w option is implemented by skipping some rows and columns. The smaller it gets, the grainier the output. Sometimes it runs letters together.

## AUTHOR
Mark Horton


worm

title: worm(6)

summary: Play the growing worm game

text:
# worm(6)

## NAME
worm — Play the growing worm game

## SYNOPSIS
worm

[size]

## DESCRIPTION
In worm, you are a little worm, your body is the "o"'s on the screen and your head is the "@". You move with the hjkl keys and the arrow keys (as in the game snake). If you don't press any keys, you continue in the direction you last moved. The upper case HJKL keys move you as if you had pressed several (9 for HL and 5 for JK) of the corresponding lower case key (unless you run into a digit, then it stops).

On the screen you will see a digit, if your worm eats the digit is will grow longer, the actual amount longer depends on which digit it was that you ate. The object of the game is to see how long you can make the worm grow.

The game ends when the worm runs into either the sides of the screen, or itself. The current score (how much the worm has grown) is kept in the upper right corner of the screen.

The optional argument, if present, is the initial length of the worm.


worms

title: worms(6)

summary: animate worms on a display terminal

text:
# worms(6)

## NAME
worms — animate worms on a display terminal

## SYNOPSIS
worms

[-ft] [-d delay] [-l length] [-n number]

## DESCRIPTION
A UNIX version of the DEC-2136 program “worms”.

The options are as follows:

-f

Makes a “field” for the worm(s) to eat.

-t

Makes each worm leave a trail behind it.

-d

Specifies a delay, in milliseconds, between each update. This is useful for fast terminals. Reasonable values are around 20-200. The default is 0.

-l

Specifies a length for each worm; the default is 16.

-n

Specifies the number of worms; the default is 3.


wtf

title: wtf(6)

summary: look up terms

text:
# wtf(6)

## NAME
wtf — look up terms

## SYNOPSIS
wtf

[-f dbfile] [-o] [is] term ...

## DESCRIPTION
The wtf utility looks up the meaning of one or more term operands specified on the command line.

term will first be searched for as an acronym in the acronym databases, which are expected to be in the format “acronym[tab]meaning”. If no match has been found, wtf will check to see if the term is known by whatis(1), pkg_info(1), or, when called from within a pkgsrc package directory, pkgsrc's internal help facility, “make help topic=XXX”.

The optional is operand will be ignored, allowing the fairly natural “wtf is WTF” usage.

The following option is available:

-f dbfile

Overrides the default list of acronym databases, bypassing the value of the ACRONYMDB variable. Unlike this variable the -f option only accepts one file name as an argument, but it may be given multiple times to specify more than one file to use.

-o

Include acronyms that could be considered offensive to some. Please consult fortune(6) for more information about the -o flag.

## ENVIRONMENT
ACRONYMDB

The default list of acronym databases may be overridden by setting the environment variable ACRONYMDB to the name of one or more space-separated file names of acronym databases.

## FILES
/usr/share/misc/acronyms

default acronym database.

/usr/share/misc/acronyms-o

default offensive acronym database.

/usr/share/misc/acronyms.comp

default computer-related acronym database.

## SEE ALSO
make(1), pkg_info(1), whatis(1), fortune(6)

## HISTORY
wtf first appeared in NetBSD 1.5. Initially it only translated acronyms; functionality to look up the meaning of terms in other sources was added later.


wump

title: wump(6)

summary: hunt the wumpus in an underground cave

text:
# wump(6)

## NAME
wump — hunt the wumpus in an underground cave

## SYNOPSIS
wump

[-h] [-a arrows] [-b bats] [-p pits] [-r rooms] [-t tunnels]

## DESCRIPTION
The game wump is based on a fantasy game first presented in the pages of People's Computer Company in 1973. In Hunt the Wumpus you are placed in a cave built of many different rooms, all interconnected by tunnels. Your quest is to find and shoot the evil Wumpus that resides elsewhere in the cave without running into any pits or using up your limited supply of arrows.

The options are as follows:

-a

Specifies the number of magic arrows the adventurer gets. The default is five.

-b

Specifies the number of rooms in the cave which contain bats. The default is three.

-h

Play the hard version -- more pits, more bats, and a generally more dangerous cave.

-p

Specifies the number of rooms in the cave which contain bottomless pits. The default is three.

-r

Specifies the number of rooms in the cave. The default cave size is twenty-five rooms.

-t

Specifies the number of tunnels connecting each room in the cave to another room. Beware, too many tunnels in a small cave can easily cause it to collapse! The default cave room has three tunnels to other rooms.

While wandering through the cave you'll notice that, while there are tunnels everywhere, there are some mysterious quirks to the cave topology, including some tunnels that go from one room to another, but not necessarily back! Also, most pesky of all are the rooms that are home to large numbers of bats, which, upon being disturbed, will en masse grab you and move you to another portion of the cave (including those housing bottomless pits, sure death for unwary explorers).

Fortunately, you're not going into the cave without any weapons or tools, and in fact your biggest aids are your senses; you can often smell the rather odiferous Wumpus up to two rooms away, and you can always feel the drafts created by the occasional bottomless pit and hear the rustle of the bats in caves they might be sleeping within.

To kill the wumpus, you'll need to shoot it with one of your magic arrows. Fortunately, you don't have to be in the same room as the creature, and can instead shoot the arrow from as far as three or four rooms away!

When you shoot an arrow, you do so by typing in a list of rooms that you'd like it to travel to. If at any point in its travels it cannot find a tunnel to the room you specify from the room it's in, it will instead randomly fly down one of the tunnels, possibly, if you're real unlucky, even flying back into the room you're in and hitting you!


bsp

package: bsp

title: bsp(6)

summary: node builder for WAD files

text:
# bsp(6)

## NAME
bsp - node builder for WAD files

## SYNOPSIS
bsp [ -blockmap {old|comp} ] [ -factor n ] [ -noreject ] [ -o file ] [ -picknode {traditional|visplane} ] [ -q ] file

## DESCRIPTION
BSP builds the nodes and blockmap resources for all the levels in a WAD file. Levels created with level editors won't run without these resources.

## OPTIONS
-blockmap {old|comp}

This selects the algorithm used for generating the blockmap resource. The old algorithm (currently the default, but this might change in future) produces a complete blockmap which contains some redundancy. The comp algorithm generates an equivalent blockmap, but which eliminates this redundancy, making a smaller resulting WAD file.

-factor n

Changes the cost assigned to seg splits. Factor n can be any positive integer, and the larger the factor, the more costly seg splits are. A factor of 17 is the default and behaves just like earlier versions of BSP. Most people do not need or want to change the default. Changing the factor can sometimes prevent visplane overflows in WAD's; but then again, some WAD's have just too many visplane overflows, experiment with the -factor option before giving up.

-noreject

Normally, BSP creates a zero-ed reject map, which is sub-optimal but sufficient for Doom to play the level. Other tools are available to build an optimal reject map. If a level already has an optimised reject map, this option should be used to stop BSP replacing it.

-picknode {traditional|visplane}

In traditional mode (the default), BSP aims to produce a balanced node tree that minimises the number of lines that must be split in this process. visplane mode causes the node line picker to choose node lines in a way that is empirically known to reduce or eliminate visplane overflows. This is an old bug that affected the original Doom engine but does not affect newer engines - if you don't know what this option is and have no problems without it, you do not need it.

-o file

Sets the name of the WAD file for output. Should not be the same as the input! As with the input filename, it can be a - to indicate that standard input/output should be used. Without this option, output is written to tmp.wad.

-q

Does not show program banners or progress, for usage from other programs.

## SPECIAL EFFECTS
BSP has some special effect features:

If a linedef has a sector tag ≥ 900, then it is treated as "precious" and will not be split unless absolutely necessary. This is good to use around borders of deep water, invisible stairs, etc.

Furthermore, just for a grin, if the lindef's tag is 999, then the sidedef's x-offset sets an angle adjustment in degrees to be applied — you can look straight at a wall, but it might come right at you on both sides and "stretch".

BSP supports HOM-free transparent doors. Simply make the sector referenced by the doortracks have a sector tag of ≥ 900. The doortracks must the lowest numbered of all the linedefs that form the door. No need to remember sector numbers and type them in on a command line — just use any sector tag ≥ 900 to permanently mark the sector special. The special tag is not strictly necessary; it just prevents a flash of HOM at the top of the door when it opens or closes. See test-wads/transdor.wad for an example.

## SUPPORTED GAMES
Doom, Ultimate Doom, Doom ][, Final Doom, Heretic and Strife.

## EXIT STATUS
0 OK

>0 Errors occurred

## BUGS/LIMITATIONS
This program will not build a good reject map, it will (unless -noreject is used) build a zero-ed one, where every sector is visible from any other sector. For the final release of a level, a reject map should be built using a suitable tool, such as RMB.

The Hexen level format is not supported.

## AUTHORS
BSP was written by Colin Reed and Lee Killough (killough@rsn.hp.com), based on an algorithm by Raphaël Quinet.

Contributors include Simon "fraggle" Howard (compressed blockmap code), Oliver Kraus (endianness fixes), André Majorel (Unix port, man page) and Udo Munk (Unix port, man page, assorted hacks).

BSP is currently maintained by Colin Phipps <cph@moria.org.uk>.

## SEE ALSO
idbsp(6), warm(6), wreject(6), zennode(6).