* New upstream release, whivh includes hack, back fron bsdgames-nonfree.

* Conflict and replace with old versions of bsdgames-nonfree that include
     hack.
   * Add hack to package description and menu file.
   * Add in hack's two READ_ME files to binay package.
   * Patched hack config.h as it is patched in bsdgames-nonfree.
   * Unlike bsdgames-nonfree, put the help, hh, rumors, and data files in
     /usr/share/games/bsdgames/hack, as the patched config.h makes it look
     there.
   * postinst moves over hack state files to new directory
   * Patched phantasia to use strerror and not segfault if it cannot open the
     var files. Closes: #187251 (patch sent upstream)


git-svn-id: file:///srv/svn/joey/bsdgames-trunk@5206 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
joey
2003-04-03 02:10:44 +00:00
parent 0e204a0ae1
commit e5b45776e7
42 changed files with 504 additions and 2553 deletions

View File

@@ -1,4 +1,4 @@
.\" $NetBSD: hunt.6,v 1.4 2001/04/04 11:41:01 wiz Exp $
.\" $NetBSD: hunt.6,v 1.9 2003/02/25 10:34:46 wiz Exp $
.\"
.\" hunt
.\" Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
@@ -31,8 +31,7 @@ walls and players.
The more players you kill before you die, the better your score is.
If the
.Fl m
flag is given,
you enter the game as a monitor
flag is given, you enter the game as a monitor
(you can see the action but you cannot play).
.Pp
.Nm
@@ -44,8 +43,7 @@ argument.
This presupposes that a hunt game is already running on that host, see
.Xr huntd 6
for details on how to setup a game on a specific host.
If more than one game if found,
you may pick which game to play in.
If more than one game if found, you may pick which game to play in.
.Pp
If the
.Fl q
@@ -53,8 +51,9 @@ flag is given,
.Nm
queries the local network (or specific host)
and reports on all active games found.
This is useful for shell startup scripts, e.g.\&
.Xr csh 1 Ns 's No .login .
This is useful for shell startup scripts, e.g.,
.Xr csh 1 Ns 's
.Pa .login .
.Pp
The player name may be specified on the command line by using the
.Fl n
@@ -107,23 +106,18 @@ mailing list (see
.Xr huntd 6 ) .
.Sh PLAYING HINTS
.Nm
only works on crt (vdt) terminals with at least 24 lines, 80 columns, and
only works on CRT (vdt) terminals with at least 24 lines, 80 columns, and
cursor addressing.
The screen is divided in to 3 areas.
On the right hand side is the status area.
It shows damage sustained,
charges remaining,
who's in the game,
It shows damage sustained, charges remaining, who's in the game,
who's scanning (the
.Dq *
in front of the name),
who's cloaked (the
in front of the name), who's cloaked (the
.Dq +
in front of the name),
and other players' scores.
in front of the name), and other players' scores.
The rest of the screen is taken up by your map of the maze.
The 24th line
is used for longer messages that don't fit in the status area.
The 24th line is used for longer messages that don't fit in the status area.
.Pp
.Nm
uses the same keys to move as
@@ -205,7 +199,7 @@ bomb
small slime
.It $
big slime
.It ><^v
.It \*[Gt]\*[Lt]^v
you facing right, left, up, or down
.It }{i!
other players facing right, left, up, or down
@@ -226,8 +220,7 @@ You can only fire three shots in a row, then the gun must cool off.
.It
Shots move 5 times faster than you do.
.It
To stab someone,
you face that player and move at them.
To stab someone, you face that player and move at them.
.It
Stabbing does 2 points worth of damage and shooting does 5 points.
.It
@@ -246,8 +239,7 @@ The number of squares is equal to the number of charges used.
.It
One small mine and one large mine is placed in the maze for every new player.
A mine has a 2% probability of tripping when you walk forward on to it;
50% when going sideways;
95% when backing up.
50% when going sideways; 95% when backing up.
Tripping a mine costs you 5 points or 10 points respectively.
Defusing a mine is worth 1 charge or 9 charges respectively.
.It
@@ -280,17 +272,16 @@ Slime goes around walls, not through them.
Walls regenerate, reappearing in the order they were destroyed.
One percent of the regenerated walls will be diagonal walls or doors.
When a wall is generated directly beneath a player, he is thrown in
a random direction for a random period of time. When he lands, he
sustains damage (up to 20 percent of the amount of damage already
sustained); i.e.,
the less damage he had, the more nimble he is and
therefore less likely to hurt himself on landing.
a random direction for a random period of time.
When he lands, he sustains damage (up to 20 percent of the amount of
damage already sustained); i.e., the less damage he had, the more nimble
he is and therefore less likely to hurt himself on landing.
.\"MP
.\"There is a volcano close to the center of the maze which goes off
.\"close to every 30 deaths.
.It
Every 30 deaths or so, a
.Dq ?
.Dq \&?
will appear.
It is a wandering bomb which will explode when it hits someone, or
when it is slimed.
@@ -306,10 +297,8 @@ will ask you what name you want to play under.
If you wish to set other options than just your name,
you can enumerate the options as follows:
.Dl setenv HUNT "name=Sneaky,team=1,cloak,mapkey=zoFfGg1f2g3F4G"
sets the player name to Sneaky,
sets the team to one,
sets the enter game attribute to cloaked,
and the maps
sets the player name to Sneaky, sets the team to one,
sets the enter game attribute to cloaked, and the maps
.Ic z
to
.Ic o , F
@@ -333,8 +322,8 @@ option must be last.
Other options are:
.Ar scan , fly , nobeep , port=string , host=string ,
and
.Ar message=string
\(em which correspond to the command line options.
.Ar message=string ,
which correspond to the command line options.
String options cannot contain commas since commas
are used to separate options.
.It
@@ -396,7 +385,6 @@ We thank Don Kneller,
John Thomason, Eric Pettersen, Mark Day,
and Scott Weiner for providing
endless hours of play-testing to improve the character of the game.
We hope their significant others will forgive them;
we certainly don't.
We hope their significant others will forgive them; we certainly don't.
.Sh BUGS
To keep up the pace, not everything is as realistic as possible.

View File

@@ -1,4 +1,4 @@
/* $NetBSD: hunt.c,v 1.12 2001/02/05 00:40:45 christos Exp $ */
/* $NetBSD: hunt.c,v 1.16 2002/12/06 01:50:56 thorpej Exp $ */
/*
* Hunt
* Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
@@ -7,12 +7,13 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: hunt.c,v 1.12 2001/02/05 00:40:45 christos Exp $");
__RCSID("$NetBSD: hunt.c,v 1.16 2002/12/06 01:50:56 thorpej Exp $");
#endif /* not lint */
# include <sys/param.h>
# include <sys/stat.h>
# include <sys/time.h>
# include <sys/poll.h>
# include <ctype.h>
# include <err.h>
# include <errno.h>
@@ -48,10 +49,6 @@ static struct termios saved_tty;
# define put_str addstr
# endif
#if !defined(BSD_RELEASE) || BSD_RELEASE < 44
extern int _putchar();
#endif
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 256
#endif
@@ -411,8 +408,7 @@ list_drivers()
static SOCKET *listv;
static unsigned int listmax;
unsigned int listc;
fd_set mask;
struct timeval wait;
struct pollfd set[1];
if (initial) { /* do one time initialization */
# ifndef BROADCAST
@@ -465,13 +461,7 @@ list_drivers()
# ifdef BROADCAST
if (initial)
brdc = broadcast_vec(test_socket, (struct sockaddr **) &brdv);
if (brdc <= 0) {
initial = FALSE;
test.sin_addr = local_address;
goto test_one_host;
}
brdc = broadcast_vec(test_socket, (void *) &brdv);
# ifdef SO_BROADCAST
/* Sun's will broadcast even though this option can't be set */
@@ -495,6 +485,13 @@ list_drivers()
/* NOTREACHED */
}
}
test.sin_addr = local_address;
if (sendto(test_socket, (char *) &msg, sizeof msg, 0,
(struct sockaddr *) &test, DAEMON_SIZE) < 0) {
warn("sendto");
leave(1, "sendto");
/* NOTREACHED */
}
# else /* !BROADCAST */
/* loop thru all hosts on local net and send msg to them. */
msg = htons(C_TESTMSG());
@@ -512,9 +509,9 @@ list_drivers()
get_response:
namelen = DAEMON_SIZE;
errno = 0;
set[0].fd = test_socket;
set[0].events = POLLIN;
for (;;) {
wait.tv_sec = 1;
wait.tv_usec = 0;
if (listc + 1 >= listmax) {
listmax += 20;
listv = (SOCKET *) realloc((char *) listv,
@@ -523,9 +520,7 @@ get_response:
leave(1, "Out of memory!");
}
FD_ZERO(&mask);
FD_SET(test_socket, &mask);
if (select(test_socket + 1, &mask, NULL, NULL, &wait) == 1 &&
if (poll(set, 1, 1000) == 1 &&
recvfrom(test_socket, (char *) &port_num, sizeof(port_num),
0, (struct sockaddr *) &listv[listc], &namelen) > 0) {
/*
@@ -543,8 +538,8 @@ get_response:
}
if (errno != 0 && errno != EINTR) {
warn("select/recvfrom");
leave(1, "select/recvfrom");
warn("poll/recvfrom");
leave(1, "poll/recvfrom");
/* NOTREACHED */
}