xref: /openbsd-src/games/hack/hack.6 (revision f2da64fbbbf1b03f09f390ab01267c93dfd77c4c)
1.\"	$OpenBSD: hack.6,v 1.20 2016/09/09 15:32:28 tb Exp $
2.\"	$NetBSD: hack.6,v 1.5 1995/07/03 19:44:30 jtc Exp $
3.\"
4.\" Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
5.\" Amsterdam
6.\" All rights reserved.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions are
10.\" met:
11.\"
12.\" - Redistributions of source code must retain the above copyright notice,
13.\" this list of conditions and the following disclaimer.
14.\"
15.\" - Redistributions in binary form must reproduce the above copyright
16.\" notice, this list of conditions and the following disclaimer in the
17.\" documentation and/or other materials provided with the distribution.
18.\"
19.\" - Neither the name of the Stichting Centrum voor Wiskunde en
20.\" Informatica, nor the names of its contributors may be used to endorse or
21.\" promote products derived from this software without specific prior
22.\" written permission.
23.\"
24.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
25.\" IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
27.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
28.\" OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29.\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31.\" PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33.\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34.\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\"
36.\"
37.\" Copyright (c) 1982 Jay Fenlason <hack@gnu.org>
38.\" All rights reserved.
39.\"
40.\" Redistribution and use in source and binary forms, with or without
41.\" modification, are permitted provided that the following conditions
42.\" are met:
43.\" 1. Redistributions of source code must retain the above copyright
44.\"    notice, this list of conditions and the following disclaimer.
45.\" 2. Redistributions in binary form must reproduce the above copyright
46.\"    notice, this list of conditions and the following disclaimer in the
47.\"    documentation and/or other materials provided with the distribution.
48.\" 3. The name of the author may not be used to endorse or promote products
49.\"    derived from this software without specific prior written permission.
50.\"
51.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
52.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
53.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
54.\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
55.\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
56.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
57.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
58.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
59.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
60.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61.\"
62.Dd $Mdocdate: September 9 2016 $
63.Dt HACK 6
64.Os
65.Sh NAME
66.Nm hack
67.Nd Exploring The Dungeons of Doom
68.Sh SYNOPSIS
69.Nm hack
70.Op Fl n
71.Op Fl d Ar directory
72.Op Fl u Ar playername
73.Nm hack
74.Op Fl sX
75.Op Fl d Ar directory
76.Op Ar playername ...
77.Sh DESCRIPTION
78.Bf -symbolic
79.Nm
80is currently unusable because it relies on
81.Xr setgid 2
82to allow multiple users read and write access to the same files.
83.Ef
84.Pp
85.Nm
86is a display oriented dungeons & dragons - like game.
87Both display and command structure resemble rogue.
88(For a game with the same structure but entirely different display -
89a real cave instead of dull rectangles - try Quest.)
90.Pp
91To get started you really only need to know two commands.
92The command
93.Ic ?\&
94will give you a list of the available commands and the command
95.Ic /
96will identify the things you see on the screen.
97.Pp
98To win the game (as opposed to merely playing to beat other people's high
99scores) you must locate the Amulet of Yendor which is somewhere below
100the 20th level of the dungeon and get it out.
101Nobody has achieved this yet and if somebody does,
102he will probably go down in history as a hero among heroes.
103.Pp
104When the game ends, either by your death, when you quit, or if you escape
105from the caves,
106.Nm
107will give you (a fragment of) the list of top scorers.
108The scoring is based on many aspects of your behavior but a rough estimate is
109obtained by taking the amount of gold you've found in the cave plus four
110times your (real) experience.
111Precious stones may be worth a lot of gold when brought to the exit.
112There is a 10% penalty for getting yourself killed.
113.Pp
114The administration of the game is kept in the directory specified with the
115.Fl d
116option or, if no such option is given, in the directory specified by
117the environment variable
118.Ev HACKDIR ,
119or, if no such variable exists, in the current directory.
120This same directory contains several auxiliary files such as lockfiles and
121the list of topscorers and a subdirectory
122.Pa save
123where games are saved.
124The game administrator may however choose to install hack with a fixed
125playing ground, usually
126.Pa /var/games/hackdir .
127.Pp
128The
129.Fl n
130option suppresses printing of the news.
131.Pp
132The
133.Fl u
134.Ar playername
135option supplies the answer to the question "Who are you?".
136When
137.Ar playername
138has as suffix one of
139.Em -T ,
140.Em -S ,
141.Em -K ,
142.Em -F ,
143.Em -C ,
144or
145.Em -W ,
146then this supplies the answer to the question "What kind of character ... ?".
147.Pp
148The
149.Fl s
150option will print out the list of your scores.
151It may be followed by arguments
152.Fl X
153where X is one of the letters C, F, K, S, T, W to print the scores of
154Cavemen, Fighters, Knights, Speleologists, Tourists or Wizards.
155It may also be followed by one or more player names to print the scores of the
156players mentioned.
157.Sh ENVIRONMENT
158.Bl -tag -width 24n -compact
159.It Ev USER No or Ev LOGNAME
160Your login name.
161.It Ev HOME
162Your home directory.
163.It Ev SHELL
164Your shell.
165.It Ev TERM
166The type of your terminal.
167.It Ev HACKPAGER, PAGER
168Pager used instead of default pager.
169.It Ev MAIL
170Mailbox file.
171.It Ev MAILREADER
172Reader used instead of default (probably /usr/bin/mail).
173.It Ev HACKDIR
174Playground.
175.It Ev HACKOPTIONS
176String predefining several hack options (see help file).
177.El
178.Pp
179Several other environment variables are used in debugging (wizard) mode,
180like
181.Ev GENOCIDED ,
182.Ev INVENT ,
183.Ev MAGIC
184and
185.Ev SHOPTYPE .
186.Sh FILES
187.Bl -tag -width 24n -compact
188.It Pa hack
189The hack program.
190.It Pa data , rumors
191Data files used by hack.
192.It Pa help , hh
193Help data files.
194.It Pa record
195The list of topscorers.
196.It Pa save
197A subdirectory containing the saved games.
198.It Pa bones_dd
199Descriptions of the ghost and belongings of a deceased adventurer.
200.It Pa xlock.dd
201Description of a dungeon level.
202.It Pa safelock
203Lock file for xlock.
204.It Pa record_lock
205Lock file for record.
206.El
207.Sh AUTHORS
208.An -nosplit
209.An Jay Fenlason
210.Po +
211.An Kenny Woodland ,
212.An Mike Thome
213and
214.An Jon Payne
215.Pc
216wrote the original hack, very much like rogue (but full of bugs).
217.Pp
218.An Andries Brouwer
219continuously deformed their sources into the current
220version \(en in fact an entirely different game.
221