Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource into paxed-new_lev_comp
Conflicts: src/trap.c sys/winnt/Makefile.msc
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
*.[ch] filter=NHtext merge=NHsubst
|
||||
*.sh filter=NHtext merge=NHsubst
|
||||
*.[ch] NHSUBST
|
||||
*.sh NHSUBST
|
||||
* text=auto
|
||||
*.hqx -text
|
||||
*.sln -text
|
||||
|
||||
@@ -32,6 +32,8 @@ core
|
||||
Makefile
|
||||
|
||||
# Win32-specific ignores
|
||||
Debug/
|
||||
Release/
|
||||
binary/
|
||||
build/
|
||||
ipch/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Developer.txt filter=NHtext merge=NHsubst
|
||||
nhgitset.pl filter=NHtext merge=NHsubst
|
||||
hookdir/* filter=NHtext merge=NHsubst
|
||||
Developer.txt NHSUBST
|
||||
nhgitset.pl NHSUBST
|
||||
hooksdir/* NHSUBST
|
||||
* text=auto
|
||||
|
||||
+4
-4
@@ -136,9 +136,9 @@ B. Enabling variable expansion
|
||||
Variable expansion is controlled by the .gitattributes file.
|
||||
|
||||
To enable variable expansion:
|
||||
pattern filter=NHtext merge=NHsubst
|
||||
pattern NHSUBST
|
||||
To disable variable expansion:
|
||||
pattern -filter
|
||||
pattern -NHSUBST
|
||||
|
||||
More information: "git help gitattributes"
|
||||
|
||||
@@ -147,8 +147,8 @@ C. Oddities
|
||||
instead of "git add" or "git commit." Nothing terrible will happen if you
|
||||
use the wrong one, but the values will not be updated.
|
||||
|
||||
Due to the way this abuses git filters, the updated values are not visible
|
||||
in your working tree.
|
||||
Variable expansion modifies the files in the work tree - your editor or
|
||||
IDE may or may not be happy with this.
|
||||
|
||||
D. Using your own hooks
|
||||
You can use your own hooks - put them in .git/hooks as usual BUT name them
|
||||
|
||||
+12
-4
@@ -32,15 +32,22 @@ you specify:
|
||||
-pretty=one: format output as a single line for each entry
|
||||
(branch): show the commits from (branch) instead of the current one
|
||||
|
||||
[*] git log --pretty=one --decorate --graph --all
|
||||
|
||||
(This is best explained by executing and looking at the output.)
|
||||
|
||||
|
||||
[*] git add (filename)
|
||||
[*] git nhadd (filename)
|
||||
|
||||
Adds the changes you've made in (filename) to the pre-commit staging area.
|
||||
(also referred to as the 'index')
|
||||
OR
|
||||
Make a new file be tracked by git.
|
||||
|
||||
"nhadd" is the preferred syntax and will automatically update the source file
|
||||
headers with the latest date, branch, and version.
|
||||
headers with the latest date, branch, and version. See Developer.txt for
|
||||
details.
|
||||
|
||||
|
||||
[*] git commit [-a] [-m "text"]
|
||||
@@ -53,7 +60,8 @@ Including -m will use "text" as the commit message instead of opening an
|
||||
editor window for you to create one.
|
||||
|
||||
"nhcommit" is the preferred syntax and will automatically update the source file
|
||||
headers with the latest date, branch, and version.
|
||||
headers with the latest date, branch, and version. See Developer.txt for
|
||||
details.
|
||||
|
||||
|
||||
[*] git push [--all] [-u origin (branch)]
|
||||
@@ -101,10 +109,10 @@ the prior commit.
|
||||
[/end area-of-concern]
|
||||
|
||||
|
||||
[*] git fetch [-a]
|
||||
[*] git fetch [--all]
|
||||
|
||||
Retrieve commits from the remote repository to your machine.
|
||||
Including -a will get commits for all branches.
|
||||
Including --all will get commits for all branches.
|
||||
Does NOT merge them into your local repository.
|
||||
|
||||
|
||||
|
||||
Executable → Regular
+7
-2
@@ -1,14 +1,19 @@
|
||||
#!/usr/bin/perl
|
||||
# wrapper for nhadd and nhcommit aliases
|
||||
# $NHDT-Date$
|
||||
# $NHDT-Date: 1427408239 2015/03/26 22:17:19 $
|
||||
|
||||
%ok = map { $_ => 1 } ('add', 'commit');
|
||||
|
||||
die "Bad subcommand '$ARGV[0]'" unless $ok{$ARGV[0]};
|
||||
|
||||
# we won't fail on a failure, so just system()
|
||||
$rv = system('.git/hooks/nhsub',"--$ARGV[0]",@ARGV[1..$#ARGV]);
|
||||
if($rv){
|
||||
print "warning: nhsub failed: $rv $!\n";
|
||||
}
|
||||
|
||||
if(length $ENV{GIT_PREFIX}){
|
||||
chdir($ENV{GIT_PREFIX}) or die "Can't chdir $ENV{GIT_PREFIX}: $!";
|
||||
}
|
||||
|
||||
$ENV{NHMODE} = 1;
|
||||
exec "git", @ARGV or die "Can't exec git: $!";
|
||||
|
||||
+35
-4
@@ -13,7 +13,8 @@ my $rawin = 0; # feed diff to stdin for testing (do NOT set $debug=1)
|
||||
# this first block because it's expensive and dumpfile() hangs with $rawin.
|
||||
my $sink = ($^O eq "MSWin32") ? "NUL" : "/dev/null";
|
||||
my $dbgfile = ($^O eq "MSWin32") ? "$ENV{TEMP}.$$" : "/tmp/trace.$$";
|
||||
open TRACE, ">>", ($debug==0)? $sink : $dbgfile;
|
||||
open TRACE, ">>", $rawin?"/dev/tty":(($debug==0)? $sink : $dbgfile);
|
||||
print TRACE "TEST TRACE\n";
|
||||
if($debug){
|
||||
print TRACE "START CLIENT ARGV:\n";
|
||||
print TRACE "[0] $0\n";
|
||||
@@ -233,7 +234,7 @@ sub merge_one_line_maybe {
|
||||
$theirval = $1;
|
||||
}
|
||||
}
|
||||
|
||||
print TRACE "MID: $ourstype/$oursval $theirtype/$theirval\n";
|
||||
# are we done?
|
||||
if(pos($ours)==length $ours && pos($theirs) == length $theirs){
|
||||
$more = 0;
|
||||
@@ -245,6 +246,12 @@ sub merge_one_line_maybe {
|
||||
# now see if ours and their match or can be resolved
|
||||
# text
|
||||
if($ourstype == 3 && $theirtype == 3){
|
||||
#mismatch is \s vs \s\s - where is this coming from?
|
||||
# HACK - hopefully temporary
|
||||
if($oursval =~ m/^\s+$/ && $theirval =~ m/^\s+$/){
|
||||
$out .= $oursval;
|
||||
next;
|
||||
}
|
||||
if($oursval eq $theirval){
|
||||
$out .= $oursval;
|
||||
next;
|
||||
@@ -273,6 +280,7 @@ sub merge_one_line_maybe {
|
||||
# return undef if we can't merge the values; $NAME: VALUE $ or $NAME$ (as appropriate) if we can.
|
||||
sub merge_one_var_maybe {
|
||||
my($varname, $oursval, $theirval) = @_;
|
||||
print TRACE "MVM: -$varname-$oursval-$theirval-\n";
|
||||
my $resolvedas;
|
||||
{
|
||||
no strict;
|
||||
@@ -309,12 +317,28 @@ sub Date {
|
||||
|
||||
sub Branch {
|
||||
my($PREFIX, $varname, $mine, $theirs) = @_;
|
||||
return "\$$PREFIX-$varname: $mine \$";
|
||||
$mine =~ s/^\s+//; $mine =~ s/\s+$//;
|
||||
$theirs =~ s/^\s+//; $theirs =~ s/\s+$//;
|
||||
return "\$$PREFIX-$varname: $mine \$" if(length $mine);
|
||||
return "\$$PREFIX-$varname: $theirs \$" if(length $theirs);
|
||||
return "\$$PREFIX-$varname\$" if(length $theirs);
|
||||
}
|
||||
|
||||
sub Revision {
|
||||
my($PREFIX, $varname, $mine, $theirs) = @_;
|
||||
return "\$$PREFIX-$varname: $mine \$";
|
||||
my($m) = ($mine =~ m/1.(\d+)/);
|
||||
my($t) = ($theirs =~ m/1.(\d+)/);
|
||||
if($m > 0 && $t > 0){
|
||||
my $q = ($m > $t) ? $m : $t;
|
||||
return "\$$PREFIX-$varname: 1.$q \$";
|
||||
}
|
||||
if($m > 0){
|
||||
return "\$$PREFIX-$varname: 1.$m \$";
|
||||
}
|
||||
if($t > 0){
|
||||
return "\$$PREFIX-$varname: 1.$t \$";
|
||||
}
|
||||
return "\$$PREFIX-$varname\$";
|
||||
}
|
||||
__END__
|
||||
|
||||
@@ -364,3 +388,10 @@ $TEST-Branch: mine $
|
||||
===
|
||||
$TEST-Branch: theirs $
|
||||
>>> d3
|
||||
|
||||
TEST 8:
|
||||
<<< d1
|
||||
/* NetHack 3.5 objnam.c $TEST-Date$ $TEST-Branch$:$TEST-Revision$ */
|
||||
===
|
||||
/* NetHack 3.5 objnam.c $TEST-Date: 1426977394 2015/03/21 22:36:34 $ $TEST-Branch: master $:$TEST-Revision: 1.108 $ */
|
||||
>>> d3
|
||||
|
||||
@@ -0,0 +1,376 @@
|
||||
#!/usr/bin/perl
|
||||
# nhsub
|
||||
# $NHDT-Date: 1427408239 2015/03/26 22:17:19 $
|
||||
|
||||
# Note: was originally called nhdate; the rename is not reflected in the code.
|
||||
|
||||
use strict;
|
||||
my %opt; #cmd v n f F (other single char, but we don't care)
|
||||
my $mode; # a c d f (add, commit, date, date -f)
|
||||
|
||||
#SO how do we know if a file has changed?
|
||||
#(git status: git status --porcelain --ignored -- FILES.
|
||||
#maybe + -z but it's a question of rename operations - probably doesn't
|
||||
# matter, but need to experiment.
|
||||
|
||||
# key: [dacf] first character of opt{cmd} (f if nhsub -f or add -f)
|
||||
# first 2 chars of "git status --porcelain --ignored"
|
||||
# (see "git help status" for table)
|
||||
# No default. Undef means something unexpected happened.
|
||||
my %codes = (
|
||||
'f M'=>1, 'f D'=>1, # [MD] not updated
|
||||
'a M'=>0, 'a D'=>0,
|
||||
'd M'=>0, 'd D'=>0,
|
||||
'c M'=>0, 'c D'=>0,
|
||||
|
||||
# M [ MD] updated in index
|
||||
|
||||
'dA '=>1, 'dAM'=>1, 'dAD'=>1,
|
||||
'aA '=>1, 'aAM'=>1, 'aAD'=>1,
|
||||
'cA '=>1, 'cAM'=>1, 'cAD'=>1,
|
||||
'fA '=>1, 'fAM'=>1, 'fAD'=>1,
|
||||
# A [ MD] added to index
|
||||
|
||||
'dD '=>0, 'dDM'=>0,
|
||||
'aD '=>1, 'aDM'=>1,
|
||||
'cD '=>0, 'cDM'=>0,
|
||||
'fD '=>1, 'fDM'=>1,
|
||||
# D [ M] deleted from index
|
||||
|
||||
# R [ MD] renamed in index
|
||||
|
||||
# C [ MD] copied in index
|
||||
|
||||
'aM '=>1, 'aA '=>1, 'aR '=>1, 'aC '=>1,
|
||||
'fM '=>1, 'fA '=>1, 'fR '=>1, 'fC '=>1,
|
||||
# [MARC] index and work tree matches
|
||||
|
||||
'd M'=>1, 'dMM'=>1, 'dAM'=>1, 'dRM'=>1, 'dCM'=>1,
|
||||
'a M'=>1, 'aMM'=>1, 'aAM'=>1, 'aRM'=>1, 'aCM'=>1,
|
||||
'c M'=>1, 'cMM'=>1, 'cAM'=>1, 'cRM'=>1, 'cCM'=>1,
|
||||
'f M'=>1, 'fMM'=>1, 'fAM'=>1, 'fRM'=>1, 'fCM'=>1,
|
||||
# [ MARC] M work tree changed since index
|
||||
|
||||
'd D'=>0, 'dMD'=>0, 'dAD'=>0, 'dRD'=>0, 'dCD'=>0,
|
||||
'a D'=>0, 'aMD'=>0, 'aAD'=>0, 'aRD'=>0, 'aCD'=>0,
|
||||
'c D'=>0, 'cMD'=>0, 'cAD'=>0, 'cRD'=>0, 'cCD'=>0,
|
||||
'f D'=>0, 'fMD'=>0, 'fAD'=>0, 'fRD'=>0, 'fCD'=>0,
|
||||
# [ MARC] D deleted in work tree
|
||||
|
||||
# -------------------------------------------------
|
||||
# DD unmerged, both deleted
|
||||
# AU unmerged, added by us
|
||||
# UD unmerged, deleted by them
|
||||
# UA unmerged, added by them
|
||||
# DU unmerged, deleted by us
|
||||
# AA unmerged, both added
|
||||
# UU unmerged, both modified
|
||||
# -------------------------------------------------
|
||||
'a??'=>1, 'f??'=>1, # ?? untracked
|
||||
'd??'=>0, 'c??'=>0,
|
||||
|
||||
'f!!'=>1, # !! ignored
|
||||
'a!!'=>0, 'd!!'=>0, 'c!!'=>0
|
||||
);
|
||||
|
||||
# OS hackery
|
||||
my $PDS = '/';
|
||||
if ($^O eq "MSWin32")
|
||||
{
|
||||
$PDS = '\\';
|
||||
}
|
||||
|
||||
# pick up the prefix for substitutions in this repo
|
||||
my $PREFIX = &git_config('nethack','substprefix');
|
||||
print "PREFIX: '$PREFIX'\n" if($opt{v});
|
||||
|
||||
my @rawlist = &cmdparse(@ARGV);
|
||||
push(@rawlist,'.') if($#rawlist == -1);
|
||||
|
||||
while(@rawlist){
|
||||
my $raw = shift @rawlist;
|
||||
if(-f $raw){
|
||||
&schedule_work($raw);
|
||||
next;
|
||||
}
|
||||
if(-d $raw){
|
||||
if($raw =~ m!$PDS.git$!o){
|
||||
print "SKIP $raw\n" if($opt{v}>=2);
|
||||
next;
|
||||
}
|
||||
opendir RDIR,$raw or die "Can't opendir: $raw";
|
||||
local($_); # needed until perl 5.11.2
|
||||
while($_ = readdir RDIR){
|
||||
next if(m/^\.\.?$/);
|
||||
if(m/^\./ && $opt{f}){
|
||||
print " IGNORE-f: $raw$PDS$_\n" if($opt{v}>=2);
|
||||
next;
|
||||
}
|
||||
push(@rawlist, $raw.$PDS.$_);
|
||||
}
|
||||
closedir RDIR;
|
||||
}
|
||||
# ignore other file types
|
||||
}
|
||||
|
||||
# XXX could batch things up - later
|
||||
|
||||
sub schedule_work {
|
||||
my($file) = @_;
|
||||
print "CHECK: '$file'\n" if($opt{v}>=2);
|
||||
local($_) = `git status --porcelain --ignored -- $file`;
|
||||
my $key = $mode . join('',(m/^(.)(.)/));
|
||||
if(length $key == 1){
|
||||
# Hack. An unmodified, tracked file produces no output from
|
||||
# git status. Treat as ignored.
|
||||
$key .= '!!';
|
||||
}
|
||||
$key =~ s/-/ /g; # for Keni's locally mod'ed git
|
||||
if(!exists $codes{$key}){
|
||||
die "I'm lost.\nK='$key' F=$file\nST=$_";
|
||||
}
|
||||
if($codes{$key}==0){
|
||||
if($opt{v}>=2){
|
||||
print " IGNORE: $_" if(length);
|
||||
print " IGNORE: !! $file\n" if(!length);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if($opt{F}){
|
||||
my $ign = `git check-ignore $file`;
|
||||
if($ign !~ m/^\s*$/){
|
||||
print " IGNORE-F: $ign" if($opt{v}>=2);
|
||||
return;
|
||||
}
|
||||
}
|
||||
# FALLTHROUGH and continue
|
||||
#print "ACCEPT TEST\n"; # XXXXXXXXXX TEST
|
||||
#return;
|
||||
|
||||
my $attr = `git check-attr NHSUBST -- $file`;
|
||||
if($attr =~ m/NHSUBST:\s+(.*)/){
|
||||
# XXX this is a bug in git. What if the value of an attribute is the
|
||||
# string "unset"? Sigh.
|
||||
if(! $opt{F}){
|
||||
if($1 eq "unset" || $1 eq "unspecified"){
|
||||
print " NOATTR: $attr" if($opt{v}>=2);
|
||||
return;
|
||||
}
|
||||
}
|
||||
&process_file($file);
|
||||
return;
|
||||
}
|
||||
die "Can't parse check-attr return: $attr\n";
|
||||
}
|
||||
|
||||
sub process_file {
|
||||
my($file) = @_;
|
||||
print "DOFIL: $file\n" if($opt{v}>=1);
|
||||
|
||||
# For speed we read in the entire file then do the substitutions.
|
||||
local($_) = '';
|
||||
my $len;
|
||||
open INFILE, "<", $file or die "Can't open $file: $!";
|
||||
while(1){
|
||||
# On at least some systems we only get 64K.
|
||||
my $len = sysread(INFILE, $_, 999999, length($_));
|
||||
last if($len == 0);
|
||||
die "read failed: $!" unless defined($len);
|
||||
}
|
||||
close INFILE;
|
||||
|
||||
local $::current_file = $file; # used under handlevar
|
||||
# $1 - var and value (including trailing space but not $)
|
||||
# $2 - var
|
||||
# $4 - value or undef
|
||||
#s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\N{DOLLAR SIGN}]+))?)\$/&handlevar($2,$4)/eg;
|
||||
my $count = s/\$$PREFIX-(([A-Za-z][A-Za-z0-9_]*)(: ([^\x24]+))?)\$/&handlevar($2,$4)/eg;
|
||||
# XXX had o modifier, why?
|
||||
return unless($count>0);
|
||||
return if($opt{n});
|
||||
|
||||
my $ofile = $file . ".nht";
|
||||
open(TOUT, ">", $ofile) or die "Can't open $ofile";
|
||||
die "write failed: $!" unless defined syswrite(TOUT, $_);
|
||||
close TOUT or die "Can't close $ofile";
|
||||
rename $ofile, $file or die "Can't rename $ofile to $file";
|
||||
}
|
||||
|
||||
sub cmdparse {
|
||||
my(@in) = @_;
|
||||
|
||||
# What are we doing?
|
||||
$opt{cmd} = 'date'; # really nhsub
|
||||
if($in[0] eq '--add'){
|
||||
$opt{cmd} = 'add';
|
||||
shift @in;
|
||||
}
|
||||
if($in[0] eq '--commit'){
|
||||
$opt{cmd} = 'commit';
|
||||
shift @in;
|
||||
}
|
||||
|
||||
# add: -n -v
|
||||
# commit: --dry-run -v
|
||||
# nhsub: -n -v
|
||||
while($in[0] =~ m/^-/){
|
||||
local($_) = $in[0];
|
||||
if($_ eq '--'){
|
||||
shift @in;
|
||||
last;
|
||||
}
|
||||
if(m/^--/){
|
||||
if($opt{cmd} eq 'commit' && $_ eq '--dry-run'){
|
||||
$opt{'n'} = 1;
|
||||
}
|
||||
shift @in;
|
||||
next;
|
||||
}
|
||||
if(m/^-(.*)/){
|
||||
foreach my $single ( split(//,$1) ){
|
||||
# don't do -v here from add/commit
|
||||
if($single ne 'v'){
|
||||
$opt{$single}++;
|
||||
} elsif($opt{cmd} eq 'date'){
|
||||
$opt{$single}++;
|
||||
}
|
||||
}
|
||||
}
|
||||
shift @in;
|
||||
}
|
||||
|
||||
($mode) = ($opt{cmd} =~ m/^(.)/);
|
||||
$mode = 'f' if($opt{cmd} eq 'date' && ($opt{f}||$opt{F}));
|
||||
$mode = 'f' if($opt{cmd} eq 'add' && $opt{f});
|
||||
|
||||
return @in; # this is our file list
|
||||
}
|
||||
|
||||
sub git_config {
|
||||
my($section, $var) = @_;
|
||||
my $raw = `git config --local --get $section.$var`;
|
||||
$raw =~ s/[\r\n]*$//g;
|
||||
return $raw if(length $raw);
|
||||
die "Missing config var: [$section] $var\n";
|
||||
}
|
||||
|
||||
sub handlevar {
|
||||
my($var, $val) = @_;
|
||||
# print "HIT '$var' '$val'\n" if($debug2);
|
||||
|
||||
my $subname = "PREFIX::$var";
|
||||
if(defined &$subname){
|
||||
no strict;
|
||||
print " SUBIN: $var '$val'\n" if($opt{v}>=3);
|
||||
$val =~ s/\s+$//;
|
||||
$val = &$subname($val);
|
||||
print " SUBOT: $var '$val'\n" if($opt{v}>=3);
|
||||
} else {
|
||||
warn "No handler for \$$PREFIX-$var\n";
|
||||
}
|
||||
|
||||
if(length $val){
|
||||
return "\$$PREFIX-$var: $val \$";
|
||||
} else {
|
||||
return "\$$PREFIX-$var\$";
|
||||
}
|
||||
}
|
||||
|
||||
package PREFIX;
|
||||
use POSIX qw(strftime);
|
||||
|
||||
# On push, put in the current date because we changed the file.
|
||||
# On pull, keep the current value so we can see the last change date.
|
||||
sub Date {
|
||||
my($val) = @_;
|
||||
# we add this to make merge easier for now XXX
|
||||
my $now = time; # not %s below - may not be portable
|
||||
# YYYY/MM/DD HH:MM:SS
|
||||
$val = "$now " . strftime("%Y/%m/%d %H:%M:%S", gmtime($now));
|
||||
return $val;
|
||||
}
|
||||
|
||||
#sub Header {
|
||||
#}
|
||||
#sub Author {
|
||||
#}
|
||||
|
||||
# NB: the standard-ish Revision line isn't enough - you need Branch:Revision -
|
||||
# but we split it into 2 so we can use the standard processing code on Revision
|
||||
# and just slip Branch in.
|
||||
sub Branch {
|
||||
my($val) = @_;
|
||||
$val = `git symbolic-ref -q --short HEAD`;
|
||||
$val =~ s/[\n\r]*$//;
|
||||
$val =~ s/^\*\s*//;
|
||||
$val = "(unknown)" unless($val =~ m/^[[:print:]]+$/);
|
||||
return $val;
|
||||
}
|
||||
|
||||
sub Revision {
|
||||
my($val) = @_;
|
||||
my @val = `git log --follow --oneline $::current_file`;
|
||||
my $ver = 0+$#val;
|
||||
$ver = 0 if($ver < 0);
|
||||
$val = "1.$ver";
|
||||
return $val;
|
||||
}
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
C<nhsub> - NetHack git command for substitution variables
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
C<git nhsub [-v[v[v]] [-n] [-f|-F] [--] [file...]>
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
C<nhsub> rewrites the specified files by doing variable substitution for
|
||||
variables starting with the prefix specified in the repository's
|
||||
C<nethack.substprefix> configuration variable. C<nhsub> is also invoked
|
||||
internally from the implementation of the C<nhadd> and C<nhcommit>
|
||||
commands.
|
||||
|
||||
The program re-writes those files listed on the command line; if the file
|
||||
is actually a directory, the program recurses into that directory tree.
|
||||
Not all files found are re-written; some are ignored and those with no
|
||||
substitution variables are not re-written. Unless changed by the options,
|
||||
files that have not changed are not affected.
|
||||
|
||||
If no files are listed on the command line, the current directory is
|
||||
checked as if specified as C<.>.
|
||||
Files listed directly on the command line are always checked.
|
||||
The C<.git> directory is never processed.
|
||||
|
||||
The following command line options are available:
|
||||
|
||||
=over
|
||||
|
||||
=item C<-v[v[v]]>
|
||||
|
||||
Verbose output; may be (usefully) specified up to 3 times. Not available
|
||||
when invoked as part of C<nhadd> or C<nhcommit>.
|
||||
|
||||
=item C<-n>
|
||||
|
||||
Do not write any files.
|
||||
|
||||
=item C<-f>
|
||||
|
||||
Force, version 1:
|
||||
Perform substitution even if the file has not changed,
|
||||
except no dot files are processed unless listed directly on the command line.
|
||||
This prevents accidents with editor temprorary files while recursing. Note
|
||||
that this overloads the C<-f> option of C<git add> and C<git commit>.
|
||||
|
||||
=item C<-F>
|
||||
|
||||
Force, version 2:
|
||||
Perform substitution even if the file has not changed,
|
||||
even if the NHSUBST attribute is not set for the
|
||||
file, and only if the file is not ignored by git. Not available
|
||||
when invoked as part of C<nhadd> or C<nhcommit>.
|
||||
|
||||
=back
|
||||
+20
-7
@@ -3,7 +3,7 @@
|
||||
|
||||
# value of nethack.setupversion we will end up with when this is done
|
||||
# version 1 is reserved for repos checked out before versioning was added
|
||||
my $version_new = 2;
|
||||
my $version_new = 3;
|
||||
my $version_old = 0; # current version, if any (0 is no entry ergo new repo)
|
||||
|
||||
use Cwd;
|
||||
@@ -100,16 +100,29 @@ print STDERR "Installing aliases\n" if($opt_v);
|
||||
$addpath = catfile(curdir(),'.git','hooks','NHadd');
|
||||
&add_alias('nhadd', "!$addpath add");
|
||||
&add_alias('nhcommit', "!$addpath commit");
|
||||
my $nhsub = catfile(curdir(),'.git','hooks','nhsub');
|
||||
&add_alias('nhsub', "!$nhsub");
|
||||
|
||||
print STDERR "Installing filter/merge\n" if($opt_v);
|
||||
|
||||
if($^O eq "MSWin32"){
|
||||
$cmd = '.git\\\\hooks\\\\NHtext';
|
||||
} else {
|
||||
$cmd = catfile(curdir(),'.git','hooks','NHtext');
|
||||
# XXXX need it in NHadd to find nhsub???
|
||||
# removed at version 3
|
||||
#if($^O eq "MSWin32"){
|
||||
# $cmd = '.git\\\\hooks\\\\NHtext';
|
||||
#} else {
|
||||
# $cmd = catfile(curdir(),'.git','hooks','NHtext');
|
||||
#}
|
||||
#&add_config('filter.NHtext.clean', "$cmd --clean %f");
|
||||
#&add_config('filter.NHtext.smudge', "$cmd --smudge %f");
|
||||
if($version_old == 1 or $version_old == 2){
|
||||
print STDERR "Removing filter.NHtext\n" if($opt_v);
|
||||
system('git','config','--unset','filter.NHtext.clean') unless($opt_n);
|
||||
system('git','config','--unset','filter.NHtext.smudge') unless($opt_n);
|
||||
system('git','config','--remove-section','filter.NHtext') unless($opt_n);
|
||||
|
||||
print STDERR "Removing NHtext\n" if($opt_v);
|
||||
unlink catfile(curdir(),'.git','hooks','NHtext') unless($opt_n);
|
||||
}
|
||||
&add_config('filter.NHtext.clean', "$cmd --clean %f");
|
||||
&add_config('filter.NHtext.smudge', "$cmd --smudge %f");
|
||||
|
||||
$cmd = catfile(curdir(),'.git','hooks','NHsubst');
|
||||
&add_config('merge.NHsubst.name', 'NetHack Keyword Substitution');
|
||||
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
*.def filter=NHtext merge=NHsubst
|
||||
*.des filter=NHtext merge=NHsubst
|
||||
*.txt filter=NHtext merge=NHsubst
|
||||
*.def NHSUBST
|
||||
*.des NHSUBST
|
||||
*.txt NHSUBST
|
||||
|
||||
@@ -20,3 +20,4 @@ nhdat
|
||||
dlb.lst
|
||||
guioptions
|
||||
porthelp
|
||||
NetHack.ad
|
||||
|
||||
@@ -245,6 +245,9 @@ flying pig
|
||||
hippocampus
|
||||
hippogriff
|
||||
kelpie
|
||||
catoblepas
|
||||
phoenix
|
||||
amphisbaena
|
||||
|
||||
# Unusually animate body parts
|
||||
bouncing eye
|
||||
|
||||
@@ -5321,6 +5321,22 @@ web
|
||||
Oh what a tangled web we weave,
|
||||
When first we practise to deceive!
|
||||
[ Marmion, by Sir Walter Scott ]
|
||||
whistle
|
||||
There were legends both on the front and on the back of the
|
||||
whistle. The one read thus:
|
||||
|
||||
FLA FUR BIS FLE The other: QUIS EST ISTE QUI VENIT
|
||||
'I ought to be able to make it out,' he thought;
|
||||
'but I suppose I am a little rusty in my Latin.
|
||||
When I come to think of it, I don't believe I even
|
||||
know the word for a whistle. The long one does seem
|
||||
simple enough. It ought to mean, "Who is this who is coming?"
|
||||
|
||||
Well, the best way to find out is evidently to whistle
|
||||
for him.'
|
||||
|
||||
[Ghost Stories of an Antiquary, by Montague Rhodes James
|
||||
'Oh, Whistle, and I'll Come to You My Lad']
|
||||
# werecritter -- see "lycanthrope"
|
||||
*wight
|
||||
When he came to himself again, for a moment he could recall
|
||||
|
||||
+20
-20
@@ -139,26 +139,26 @@ GEOMETRY:center,center
|
||||
# This map has no visible outer boundary, and
|
||||
# is all "air".
|
||||
MAP
|
||||
AAAAAAAAAAAAAAAAAAAAAAAACCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAACCCCCCAAAAAAAACCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAACCAACCCCCAAAAAACCCCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAACCACCCCCCCAAAAACCCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAACCCCCCCCCCAAAAACCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAACCCCAAACCAAACCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAACCCCAAAAAACCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAACCCCCCCAAAACCACCCCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAACCCCAAAAAAACCACAACCCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCAACCCCCCCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAACCCCAAACCCCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACACCCCCAAACCCCCCCAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAACAACCCCCCCAAAACCCCCCCAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACCCCCCCCAAACCCCCCCCAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCCCCCCCCCAACCCCCCCCAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAACACCCCCCCCCCACCCCCCCCAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAACAACCCCCCCCCCCCCCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAACCCCCCAAACCCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAACCAAAAAACCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
ENDMAP
|
||||
# Use up and down regions to partition the level into three parts;
|
||||
# teleportation can't cross from one part into another.
|
||||
|
||||
+38
-36
@@ -128,20 +128,20 @@ just before the release of NetHack 3.4.0 in March 2002.
|
||||
As with version 3.3, various people contributed to the game as a whole as
|
||||
well as supporting ports on the different platforms that NetHack runs on:
|
||||
|
||||
Pat Rankin maintained 3.5 for VMS.
|
||||
Pat Rankin maintained 3.4 for VMS.
|
||||
|
||||
Michael Allison maintained NetHack 3.5 for the MS-DOS platform.
|
||||
Michael Allison maintained NetHack 3.4 for the MS-DOS platform.
|
||||
Paul Winner and Yitzhak Sapir provided encouragement.
|
||||
|
||||
Dean Luick, Mark Modrall, and Kevin Hugo maintained and enhanced the
|
||||
Macintosh port of 3.4.
|
||||
|
||||
Michael Allison, David Cohrs, Alex Kompel, Dion Nicolaas, and Yitzhak Sapir
|
||||
maintained and enhanced 3.5 for the Microsoft Windows platform. Alex Kompel
|
||||
maintained and enhanced 3.4 for the Microsoft Windows platform. Alex Kompel
|
||||
contributed a new graphical interface for the Windows port. Alex Kompel also
|
||||
contributed a Windows CE port for 3.4.1.
|
||||
|
||||
Ron Van Iwaarden maintained 3.5 for OS/2.
|
||||
Ron Van Iwaarden maintained 3.4 for OS/2.
|
||||
|
||||
Janne Salmijarvi and Teemu Suikki maintained and enhanced the
|
||||
Amiga port of 3.5 after Janne Salmijarvi resurrected it for 3.3.1.
|
||||
@@ -174,7 +174,6 @@ At the beginning of development for what would eventually get released
|
||||
as 3.6.0, the development team consisted of Michael Allison,
|
||||
Warwick Allison, Ken Arromdee, David Cohrs, Jessie Collet, Ken Lorber,
|
||||
Dean Luick, Pat Rankin, Mike Stephenson, Janet Walz, and Paul Winner.
|
||||
|
||||
Leading up to the release of 3.6.0 in early 2015, new members Sean Hunt,
|
||||
Pasi Kallinen, and Derek S. Ray joined the NetHack development team.
|
||||
|
||||
@@ -211,7 +210,9 @@ people primarily responsible for the public NetHack servers available for
|
||||
playing the game at nethack.alt.org and devnull.net. In addition to providing
|
||||
a way for the public to play a game of NetHack from almost anywhere, they
|
||||
have hosted annual NetHack tournaments for many, many years.
|
||||
<FIXME> write up something for Robin, M. Drew Streib, Pasi Kallinen
|
||||
|
||||
On behalf of the NetHack community, thank you very much to
|
||||
M. Drew Streib, Pasi Kallinen and Robin Bandy.
|
||||
|
||||
- - - - - - - - - -
|
||||
|
||||
@@ -220,11 +221,11 @@ particularly intriguing modification to help out with the game. The Gods of
|
||||
the Dungeon sometimes make note of the names of the worst of these miscreants
|
||||
in this, the list of Dungeoneers:
|
||||
|
||||
Adam Aronow Izchak Miller Mike Stephenson
|
||||
Alex Kompel J. Ali Harlow Norm Meluch
|
||||
Andreas Dorn Janet Walz Olaf Seibert
|
||||
Andy Church Janne Salmijarvi Pasi Kallinen
|
||||
Andy Swanson Jean-Christophe Collet Pat Rankin
|
||||
Adam Aronow J. Ali Harlow Mike Stephenson
|
||||
Alex Kompel Janet Walz Norm Meluch
|
||||
Andreas Dorn Janne Salmijarvi Olaf Seibert
|
||||
Andy Church Jean-Christophe Collet Pasi Kallinen
|
||||
Andy Swanson Jeff Bailey Pat Rankin
|
||||
Ari Huttunen Jochen Erwied Paul Winner
|
||||
Barton House John Kallen Pierre Martineau
|
||||
Benson I. Margulies John Rupley Ralf Brown
|
||||
@@ -233,29 +234,30 @@ in this, the list of Dungeoneers:
|
||||
Bruce Cox Jon W{tte Richard Beigel
|
||||
Bruce Holloway Jonathan Handler Richard P. Hughey
|
||||
Bruce Mewborne Joshua Delahunty Rob Menke
|
||||
Carl Schelin Keizo Yamamoto Robin Johnson
|
||||
Chris Russo Ken Arnold Roderick Schertler
|
||||
David Cohrs Ken Arromdee Roland McGrath
|
||||
David Damerell Ken Lorber Ron Van Iwaarden
|
||||
David Gentzel Ken Washikita Ronnen Miller
|
||||
David Hairston Kevin Darcy Ross Brown
|
||||
Dean Luick Kevin Hugo Sascha Wostmann
|
||||
Del Lamb Kevin Sitze Scott Bigham
|
||||
Derek S. Ray Kevin Smolkowski Scott R. Turner
|
||||
Deron Meranda Kevin Sweet Sean Hunt
|
||||
Dion Nicolaas Lars Huttar Stephen Spackman
|
||||
Dylan O'Donnell Leon Arnott Stephen White
|
||||
Eric Backus Malcolm Ryan Steve Creps
|
||||
Eric Hendrickson Mark Gooderum Steve Linhart
|
||||
Eric R. Smith Mark Modrall Steve VanDevender
|
||||
Eric S. Raymond Marvin Bressler Teemu Suikki
|
||||
Erik Andersen Matthew Day Tim Lennan
|
||||
Frederick Roeber Merlyn LeRoy Timo Hakulinen
|
||||
Gil Neiger Michael Allison Tom Almy
|
||||
Greg Laskin Michael Feir Tom West
|
||||
Greg Olson Michael Hamel Warren Cheung
|
||||
Gregg Wonderly Michael Sokolov Warwick Allison
|
||||
Hao-yang Wang Mike Engber Yitzhak Sapir
|
||||
Helge Hafting Mike Gallop
|
||||
Irina Rempt-Drijfhout Mike Passaretti
|
||||
Carl Schelin Keizo Yamamoto Robin Bandy
|
||||
Chris Russo Ken Arnold Robin Johnson
|
||||
David Cohrs Ken Arromdee Roderick Schertler
|
||||
David Damerell Ken Lorber Roland McGrath
|
||||
David Gentzel Ken Washikita Ron Van Iwaarden
|
||||
David Hairston Kevin Darcy Ronnen Miller
|
||||
Dean Luick Kevin Hugo Ross Brown
|
||||
Del Lamb Kevin Sitze Sascha Wostmann
|
||||
Derek S. Ray Kevin Smolkowski Scott Bigham
|
||||
Deron Meranda Kevin Sweet Scott R. Turner
|
||||
Dion Nicolaas Lars Huttar Sean Hunt
|
||||
Dylan O'Donnell Leon Arnott Stephen Spackman
|
||||
Eric Backus M. Drew Streib Stephen White
|
||||
Eric Hendrickson Malcolm Ryan Steve Creps
|
||||
Eric R. Smith Mark Gooderum Steve Linhart
|
||||
Eric S. Raymond Mark Modrall Steve VanDevender
|
||||
Erik Andersen Marvin Bressler Teemu Suikki
|
||||
Frederick Roeber Matthew Day Tim Lennan
|
||||
Gil Neiger Merlyn LeRoy Timo Hakulinen
|
||||
Greg Laskin Michael Allison Tom Almy
|
||||
Greg Olson Michael Feir Tom West
|
||||
Gregg Wonderly Michael Hamel Warren Cheung
|
||||
Hao-yang Wang Michael Sokolov Warwick Allison
|
||||
Helge Hafting Mike Engber Yitzhak Sapir
|
||||
Irina Rempt-Drijfhout Mike Gallop
|
||||
Izchak Miller Mike Passaretti
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ tombstone print tombstone when you die [TRUE]
|
||||
toptenwin print topten in a window rather than stdout [FALSE]
|
||||
travel enable the command to travel to a map location via [TRUE]
|
||||
a shortest-path algorithm, usually invoked by '_'.
|
||||
use_darkgray use bold black instead of blue for black glyphs. [TRUE]
|
||||
use_inverse display detected monsters in highlighted manner [FALSE]
|
||||
verbose print more commentary during the game [TRUE]
|
||||
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
*.mn filter=NHtext merge=NHsubst
|
||||
*.6 filter=NHtext merge=NHsubst
|
||||
fixes.* filter=NHtext merge=NHsubst
|
||||
window.doc filter=NHtext merge=NHsubst
|
||||
*.mn NHSUBST
|
||||
*.6 NHSUBST
|
||||
fixes.* NHSUBST
|
||||
window.doc NHSUBST
|
||||
|
||||
|
||||
+123
-49
@@ -1,12 +1,12 @@
|
||||
.\" $NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$
|
||||
.\" $Revision: 1.130 $ $Date: 2012/05/02 00:38:30 $
|
||||
.\" $Revision: 1.130 $ $Date: 2015/03/27 00:38:30 $
|
||||
.ds h0 "NetHack Guidebook
|
||||
.ds h1
|
||||
.ds h2 %
|
||||
.ds vr "NetHack 3.6
|
||||
.ds f0 "\*(vr
|
||||
.ds f1
|
||||
.ds f2 "March 16, 2015
|
||||
.ds f2 "March 27, 2015
|
||||
.\" labeled paragraph start (should be part of tmac.n, but I don't want to
|
||||
.\" make changes to that file)
|
||||
.\" .PS word
|
||||
@@ -710,12 +710,6 @@ the exchange still takes place.
|
||||
.lp X
|
||||
Toggle two-weapon combat, if your character can do it. Also available
|
||||
via the ``#twoweapon'' extended command
|
||||
.lp ""
|
||||
Since using this command by accident would be troublesome, you are asked
|
||||
to confirm your intent before switching to explore mode. By default
|
||||
the response 'y' acknowledges that intent. You can set the
|
||||
.op paraniod_confirmation
|
||||
option to require a response of "yes" instead.
|
||||
.lp ^X
|
||||
Display basic information about your character.
|
||||
.lp ""
|
||||
@@ -848,7 +842,7 @@ You probably shouldn't start off a new game by praying right away.)
|
||||
Since using this command by accident can cause trouble, there is an
|
||||
option to make you confirm your intent before praying. It is enabled
|
||||
by default, and you can reset the
|
||||
.op paraniod_confirmation
|
||||
.op paranoid_confirmation
|
||||
option to disable it.
|
||||
.lp #quit
|
||||
Quit the program without saving your game.
|
||||
@@ -856,7 +850,7 @@ Quit the program without saving your game.
|
||||
Since using this command by accident would throw away the current game,
|
||||
you are asked to confirm your intent before quitting. By default a
|
||||
response of 'y' acknowledges that intent. You can set the
|
||||
.op paraniod_confirmation
|
||||
.op paranoid_confirmation
|
||||
option to require a response of "yes" instead.
|
||||
.lp #ride
|
||||
Ride (or stop riding) a monster.
|
||||
@@ -1138,7 +1132,7 @@ In most circumstances, if you attempt to attack a peaceful monster by
|
||||
moving into its location, you'll be asked to confirm your intent. By
|
||||
default an answer of 'y' acknowledges that intent,
|
||||
which can be error prone if you're using 'y' to move. You can set the
|
||||
.op paraniod_confirmation
|
||||
.op paranoid_confirmation
|
||||
option to require a response of "yes" instead.
|
||||
.pg
|
||||
If you can't see a monster (if it is invisible, or if you are blinded),
|
||||
@@ -1927,6 +1921,8 @@ quality of the weapon; you are free to manually fill your quiver or quiver sack
|
||||
or make ready
|
||||
with the `Q' command instead. If no weapon is found or the option is
|
||||
false, the `t' (throw) command is executed instead. (default false)
|
||||
.lp blind
|
||||
Start the character permanently blind. (default false)
|
||||
.lp bones
|
||||
Allow saving and loading bones files. (default true)
|
||||
.lp boulder
|
||||
@@ -2053,6 +2049,8 @@ Enable mail delivery during the game (default on).
|
||||
.lp "male "
|
||||
An obsolete synonym for ``gender:male''.
|
||||
Cannot be set with the `O' command.
|
||||
.lp mention_walls
|
||||
Give feedback when walking against a wall (default off).
|
||||
.lp menustyle
|
||||
Controls the interface used when you need to choose various objects (in
|
||||
response to the Drop command, for instance). The value specified should
|
||||
@@ -2098,6 +2096,9 @@ Default '|'.
|
||||
Menu character accelerator to goto the next menu page.
|
||||
Implemented by the Amiga, Gem and tty ports.
|
||||
Default '>'.
|
||||
.lp menu_objsyms
|
||||
Show object symbols in menu headings in menus where
|
||||
the object symbols act as menu accelerators (default off).
|
||||
.lp menu_previous_page
|
||||
Menu character accelerator to goto the previous menu page.
|
||||
Implemented by the Amiga, Gem and tty ports.
|
||||
@@ -2144,6 +2145,8 @@ Cannot be set with the `O' command.
|
||||
Read the NetHack news file, if present (default on).
|
||||
Since the news is shown at the beginning of the game, there's no point
|
||||
in setting this with the `O' command.
|
||||
.lp nudist
|
||||
Start the character with no armor (default false).
|
||||
.lp "null "
|
||||
Send padding nulls to the terminal (default on).
|
||||
.lp number_pad
|
||||
@@ -2170,7 +2173,7 @@ is the same as specifying 0.
|
||||
(Settings 2 and 4 are for compatibility with MSDOS or old PC Hack;
|
||||
in addition to the different behavior for `5', `Alt-5' acts as `G'
|
||||
and `Alt-0' acts as `I'.
|
||||
Setting -1 is to accomodate some German keyboards which have the
|
||||
Setting -1 is to accommodate some German keyboards which have the
|
||||
location of the `y' and `z' keys swapped.)
|
||||
When moving by numbers, to enter a count prefix for those commands
|
||||
which accept one (such as ``12s'' to search twelve times), precede it
|
||||
@@ -2454,6 +2457,8 @@ Specify the name of an alternative tile file to override the default.
|
||||
Specify the preferred height of each tile in a tile capable port.
|
||||
.lp tile_width
|
||||
Specify the preferred width of each tile in a tile capable port
|
||||
.lp use_darkgray
|
||||
Use bold black instead of blue for black glyphs (TTY only).
|
||||
.lp use_inverse
|
||||
NetHack should display inverse when the game specifies it.
|
||||
.lp vary_msgcount
|
||||
@@ -2917,6 +2922,10 @@ SHELLERS
|
||||
A list of users who are allowed to use the shell escape command (!). The
|
||||
syntax is the same as WIZARDS.
|
||||
.lp
|
||||
EXPLORERS
|
||||
A list of users who are allowed to use the explore mode. The
|
||||
syntax is the same as WIZARDS.
|
||||
.lp
|
||||
MAXPLAYERS
|
||||
Limit the maximum number of games that can be running at the same time.
|
||||
.lp
|
||||
@@ -2989,7 +2998,7 @@ command-line switch or with the
|
||||
.op playmode:explore
|
||||
option. The other is to issue the ``#exploremode'' extended command while
|
||||
already playing the game. Starting a new game in explore mode provides your
|
||||
character with a wand of wishing in initial inventory; switching via `X'
|
||||
character with a wand of wishing in initial inventory; switching
|
||||
during play does not. The other benefits of explore mode are left for
|
||||
the trepid reader to discover.
|
||||
.pg
|
||||
@@ -3157,7 +3166,7 @@ available web-site listing all the bugs that had been discovered. Despite
|
||||
that constantly growing bug list, 3.3 proved stable enough to last for
|
||||
more than a year and a half.
|
||||
.pg
|
||||
The 3.5 development team initially consisted of
|
||||
The 3.4 development team initially consisted of
|
||||
\fBMichael Allison\fP, \fBKen Arromdee\fP,
|
||||
\fBDavid Cohrs\fP, \fBJessie Collet\fP, \fBKevin Hugo\fP, \fBKen Lorber\fP,
|
||||
\fBDean Luick\fP, \fBPat Rankin\fP, \fBMike Stephenson\fP,
|
||||
@@ -3167,16 +3176,16 @@ just before the release of NetHack 3.4.0 in March 2002.
|
||||
As with version 3.3, various people contributed to the game as a whole as
|
||||
well as supporting ports on the different platforms that NetHack runs on:
|
||||
.pg
|
||||
\fBPat Rankin\fP maintained 3.5 for VMS.
|
||||
\fBPat Rankin\fP maintained 3.4 for VMS.
|
||||
.pg
|
||||
\fBMichael Allison\fP maintained NetHack 3.5 for the MS-DOS platform. \fBPaul Winner\fP
|
||||
\fBMichael Allison\fP maintained NetHack 3.4 for the MS-DOS platform. \fBPaul Winner\fP
|
||||
and \fBYitzhak Sapir\fP provided encouragement.
|
||||
.pg
|
||||
\fBDean Luick\fP, \fBMark Modrall\fP, and \fBKevin Hugo\fP maintained and enhanced the
|
||||
Macintosh port of 3.4.
|
||||
.pg
|
||||
\fBMichael Allison\fP, \fBDavid Cohrs\fP, \fBAlex Kompel\fP, \fBDion Nicolaas\fP, and
|
||||
\fBYitzhak Sapir\fP maintained and enhanced 3.5 for the Microsoft Windows platform.
|
||||
\fBYitzhak Sapir\fP maintained and enhanced 3.4 for the Microsoft Windows platform.
|
||||
\fBAlex Kompel\fP contributed a new graphical interface for the Windows port.
|
||||
\fBAlex Kompel\fP also contributed a Windows CE port for 3.4.1.
|
||||
.pg
|
||||
@@ -3186,13 +3195,77 @@ early 2006. A great many thanks to Ron for keeping NetHack alive on OS/2
|
||||
all these years.
|
||||
.pg
|
||||
\fBJanne Salmijarvi\fP and \fBTeemu Suikki\fP maintained and
|
||||
enhanced the Amiga port of 3.5 after \fBJanne Salmijarvi\fP resurrected
|
||||
enhanced the Amiga port of 3.4 after \fBJanne Salmijarvi\fP resurrected
|
||||
it for 3.3.1.
|
||||
.pg
|
||||
\fBChristian ``Marvin'' Bressler\fP maintained 3.5 for the Atari after he
|
||||
\fBChristian ``Marvin'' Bressler\fP maintained 3.4 for the Atari after he
|
||||
resurrected it for 3.3.1.
|
||||
.pg
|
||||
The release of NetHack 3.4.3 in December 2003 marked the beginning of a
|
||||
long release hiatus. 3.4.3 proved to be a remarkably stable version that
|
||||
provided continued enjoyment by the community for more than a decade. The
|
||||
devteam slowly and quietly continued to work on the game behind the scenes
|
||||
during the tenure of 3.4.3. It was during that same period that several new
|
||||
variants emerged within the NetHack community. Notably sporkhack by
|
||||
\fBDerek S. Ray\fP, unnethack by \fBPatric Mueller\fP, nitrohack and its
|
||||
successors originally by \fBDaniel Thaler\fP and then by \fBAlex Smith\fP,
|
||||
and Dynahack by \fBTung Nguyen\fP. Some of those variants continue to be
|
||||
developed, maintained, and enjoyed by the community to this day.
|
||||
.pg
|
||||
In September 2014, an interim snapshot of the code under development was
|
||||
released publicly by other parties. Since that code was a work-in-progress
|
||||
and had not gone through a period of debugging, it was decided that the
|
||||
version numbers present on that code snapshot would be retired and never
|
||||
used in an official NetHack release. An announcement was posted on the
|
||||
devteam's official nethack.org website to that effect, stating that there
|
||||
would never be a 3.4.4, 3.5, or 3.5.0 official release version.
|
||||
.pg
|
||||
In January 2015, preparation began for the release of NetHack 3.6
|
||||
.pg
|
||||
At the beginning of development for what would eventually get released
|
||||
as 3.6.0, the development team consisted of \fBWarwick Allison\fP,
|
||||
\fBMichael Allison\fP, \fBKen Arromdee\fP,
|
||||
\fBDavid Cohrs\fP, \fBJessie Collet\fP,
|
||||
\fBKen Lorber\fP, \fBDean Luick\fP, \fBPat Rankin\fP,
|
||||
\fBMike Stephenson\fP, \fBJanet Walz\fP, and \fBPaul Winner\fP.
|
||||
Leading up to the release of 3.6.0 in early 2015, new members
|
||||
\fBSean Hunt\fP, \fBPasi Kallinen\fP, and \fBDerek S. Ray\fP
|
||||
joined the NetHack development team,
|
||||
.pg
|
||||
\fB3.6.0 TODO insert apprpriate description of 3.6.0 here
|
||||
.pg
|
||||
\fBThe development team, as well as \fBSteve VanDevender\fP and
|
||||
\fBKevin Smolkowski\fP ensured that NetHack 3.6.0 continued to operate on
|
||||
various Unix flavors as well as maintaining the X11 interface.
|
||||
.pg
|
||||
\fBKen Lorber\fP, \fBHaoyang Wang\fP, \fBPat Rankin\fP, and \fBDean Luick\fP
|
||||
maintained the port of NetHack 3.6.0 for Mac.
|
||||
.pg
|
||||
\fBMichael Allison\fP, \fBDerek S. Ray\fP, \fBYitzhak Sapir\fP,
|
||||
\fBAlex Kompel\fP, and \fBDavid Cohrs\fP maintained the port of
|
||||
NetHack 3.6.0 for Microsoft Windows.
|
||||
.pg
|
||||
\fBJeff Bailey\fP created and maintained a port of NetHack 3.6.0 for Chrome.
|
||||
.pg
|
||||
TODO \fBAlex Kompel\fP maintained a port of NetHack 3.6.0 to Windows Phone.
|
||||
.pg
|
||||
\fBThis version of the game is special in a particular way. Near the end of
|
||||
the development of 3.6, one of the significant inspirations for many of the
|
||||
humorous and fun features found in the game, author \fBTerry Pratchett\fP,
|
||||
passed away. This version of the game is dedicated to him.
|
||||
.pg
|
||||
The official NetHack web site is maintained by \fBKen Lorber\fP at http://www.nethack.org/.
|
||||
.pg
|
||||
SHOUT-OUTS
|
||||
.pg
|
||||
The devteam would like to give a special "shout-out" to thank the generous
|
||||
people primarily responsible for the public NetHack servers available for
|
||||
playing the game at nethack.alt.org and devnull.net. In addition to providing
|
||||
a way for the public to play a game of NetHack from almost anywhere, they
|
||||
have hosted annual NetHack tournaments for many, many years.
|
||||
.pg
|
||||
On behalf of the NetHack community, thank you very much to
|
||||
\fBM. Drew Streib\fP, \fBPasi Kallinen\fP and \fBRobin Bandy\fP.
|
||||
.pg
|
||||
- - - - - - - - - -
|
||||
.pg
|
||||
@@ -3205,11 +3278,11 @@ in this, the list of Dungeoneers:
|
||||
center;
|
||||
c c c.
|
||||
.\"TABLE_START
|
||||
Adam Aronow Izchak Miller Mike Stephenson
|
||||
Alex Kompel J. Ali Harlow Norm Meluch
|
||||
Andreas Dorn Janet Walz Olaf Seibert
|
||||
Andy Church Janne Salmijarvi Pasi Kallinen
|
||||
Andy Swanson Jean-Christophe Collet Pat Rankin
|
||||
Adam Aronow J. Ali Harlow Mike Stephenson
|
||||
Alex Kompel Janet Walz Norm Meluch
|
||||
Andreas Dorn Janne Salmijarvi Olaf Seibert
|
||||
Andy Church Jean-Christophe Collet Pasi Kallinen
|
||||
Andy Swanson Jeff Bailey Pat Rankin
|
||||
Ari Huttunen Jochen Erwied Paul Winner
|
||||
Barton House John Kallen Pierre Martineau
|
||||
Benson I. Margulies John Rupley Ralf Brown
|
||||
@@ -3218,31 +3291,32 @@ Boudewijn Waijers Johnny Lee Richard Addison
|
||||
Bruce Cox Jon W{tte Richard Beigel
|
||||
Bruce Holloway Jonathan Handler Richard P. Hughey
|
||||
Bruce Mewborne Joshua Delahunty Rob Menke
|
||||
Carl Schelin Keizo Yamamoto Robin Johnson
|
||||
Chris Russo Ken Arnold Roderick Schertler
|
||||
David Cohrs Ken Arromdee Roland McGrath
|
||||
David Damerell Ken Lorber Ron Van Iwaarden
|
||||
David Gentzel Ken Washikita Ronnen Miller
|
||||
David Hairston Kevin Darcy Ross Brown
|
||||
Dean Luick Kevin Hugo Sascha Wostmann
|
||||
Del Lamb Kevin Sitze Scott Bigham
|
||||
Derek S. Ray Kevin Smolkowski Scott R. Turner
|
||||
Deron Meranda Kevin Sweet Sean Hunt
|
||||
Dion Nicolaas Lars Huttar Stephen Spackman
|
||||
Dylan O'Donnell Leon Arnott Stephen White
|
||||
Eric Backus Malcolm Ryan Steve Creps
|
||||
Eric Hendrickson Mark Gooderum Steve Linhart
|
||||
Eric R. Smith Mark Modrall Steve VanDevender
|
||||
Eric S. Raymond Marvin Bressler Teemu Suikki
|
||||
Erik Andersen Matthew Day Tim Lennan
|
||||
Frederick Roeber Merlyn LeRoy Timo Hakulinen
|
||||
Gil Neiger Michael Allison Tom Almy
|
||||
Greg Laskin Michael Feir Tom West
|
||||
Greg Olson Michael Hamel Warren Cheung
|
||||
Gregg Wonderly Michael Sokolov Warwick Allison
|
||||
Hao-yang Wang Mike Engber Yitzhak Sapir
|
||||
Helge Hafting Mike Gallop
|
||||
Irina Rempt-Drijfhout Mike Passaretti
|
||||
Carl Schelin Keizo Yamamoto Robin Bandy
|
||||
Chris Russo Ken Arnold Robin Johnson
|
||||
David Cohrs Ken Arromdee Roderick Schertler
|
||||
David Damerell Ken Lorber Roland McGrath
|
||||
David Gentzel Ken Washikita Ron Van Iwaarden
|
||||
David Hairston Kevin Darcy Ronnen Miller
|
||||
Dean Luick Kevin Hugo Ross Brown
|
||||
Del Lamb Kevin Sitze Sascha Wostmann
|
||||
Derek S. Ray Kevin Smolkowski Scott Bigham
|
||||
Deron Meranda Kevin Sweet Scott R. Turner
|
||||
Dion Nicolaas Lars Huttar Sean Hunt
|
||||
Dylan O'Donnell Leon Arnott Stephen Spackman
|
||||
Eric Backus M. Drew Streib Stephen White
|
||||
Eric Hendrickson Malcolm Ryan Steve Creps
|
||||
Eric R. Smith Mark Gooderum Steve Linhart
|
||||
Eric S. Raymond Mark Modrall Steve VanDevender
|
||||
Erik Andersen Marvin Bressler Teemu Suikki
|
||||
Frederick Roeber Matthew Day Tim Lennan
|
||||
Gil Neiger Merlyn LeRoy Timo Hakulinen
|
||||
Greg Laskin Michael Allison Tom Almy
|
||||
Greg Olson Michael Feir Tom West
|
||||
Gregg Wonderly Michael Hamel Warren Cheung
|
||||
Hao-yang Wang Michael Sokolov Warwick Allison
|
||||
Helge Hafting Mike Engber Yitzhak Sapir
|
||||
Irina Rempt-Drijfhout Mike Gallop
|
||||
Izchak Miller Mike Passaretti
|
||||
.\"TABLE_END Do not delete this line.
|
||||
.TE
|
||||
|
||||
|
||||
+221
-62
@@ -33,7 +33,7 @@
|
||||
\begin{document}
|
||||
%
|
||||
% input file: guidebook.mn
|
||||
% $Revision: 1.122 $ $Date: 2015/03/16 06:00:00 $
|
||||
% $Revision: 1.122 $ $Date: 2015/03/27 06:00:00 $
|
||||
%
|
||||
%.ds h0 "
|
||||
%.ds h1 %.ds h2 \%
|
||||
@@ -46,7 +46,7 @@
|
||||
%.au
|
||||
\author{Eric S. Raymond\\
|
||||
(Edited and expanded for 3.6)}
|
||||
\date{March 16, 2015}
|
||||
\date{March 27, 2015}
|
||||
|
||||
\maketitle
|
||||
|
||||
@@ -862,13 +862,8 @@ two-weapon combat. Note that if one of these slots is empty,
|
||||
the exchange still takes place.
|
||||
%.lp
|
||||
\item[\tb{X}]
|
||||
Enter explore (discovery) mode, explained in its own section later.\\
|
||||
%.lp ""
|
||||
Since using this command by accident would be troublesome, you are asked
|
||||
to confirm your intent before switching to explore mode. By default
|
||||
the response `{\tt y}' acknowledges that intent. You can set the
|
||||
{\it paranoid\_confirmation\/}
|
||||
option to require a response of ``yes'' instead.
|
||||
Toggle two-weapon combat, if your character can do it. Also available
|
||||
via the ``{\tt \#twoweapon}'' extended command
|
||||
%.lp
|
||||
\item[\tb{\^{}X}]
|
||||
Display basic information about your character.\\
|
||||
@@ -2224,7 +2219,8 @@ command allows you to view all options and change most of them.
|
||||
You can also set options automatically by placing them in the
|
||||
``NETHACKOPTIONS'' environment variable or in a configuration file.
|
||||
Some versions of {\it NetHack\/} also have front-end programs that allow
|
||||
you to set options before starting the game.
|
||||
you to set options before starting the game or a global configuration
|
||||
for system administrators.
|
||||
|
||||
%.hn 2
|
||||
\subsection*{Using the NETHACKOPTIONS environment variable}
|
||||
@@ -2275,8 +2271,7 @@ each entry. Such a sequence can be continued to multiple lines by putting a
|
||||
`{\tt \verb+\+}' at the end of each line to be continued.
|
||||
|
||||
%.pg
|
||||
If your copy of the game included the compile time AUTOPICKUP\_EXCEPTIONS
|
||||
option, then any line starting with ``{\tt AUTOPICKUP\_EXCEPTION=}''
|
||||
Any line starting with ``{\tt AUTOPICKUP\_EXCEPTION=}''
|
||||
is taken as defining an exception to the ``{\tt pickup\_types}'' option.
|
||||
There is a section of this Guidebook that discusses that.
|
||||
|
||||
@@ -2327,6 +2322,12 @@ or make ready
|
||||
with the `Q' command instead. If no weapon is found or the option is
|
||||
false, the `t' (throw) command is executed instead. (default false)
|
||||
%.lp
|
||||
\item[\ib{blind}]
|
||||
Start the character permanently blind. (default false)
|
||||
%.lp
|
||||
\item[\ib{bones}]
|
||||
Allow saving and loading bones files. (default true)
|
||||
%.lp
|
||||
\item[\ib{boulder}]
|
||||
Set the character used to display boulders (default is rock class symbol).
|
||||
%.lp
|
||||
@@ -2475,6 +2476,9 @@ Enable mail delivery during the game (default on).
|
||||
An obsolete synonym for ``{\tt gender:male}''. Cannot be set with the
|
||||
`{\tt O}' command.
|
||||
%.lp
|
||||
\item[\ib{mention\_walls}]
|
||||
Give feedback when walking against a wall (default off).
|
||||
%.lp
|
||||
\item[\ib{menustyle}]
|
||||
Controls the interface used when you need to choose various objects (in
|
||||
response to the Drop command, for instance). The value specified should
|
||||
@@ -2520,13 +2524,16 @@ Default `\verb+|+'.
|
||||
Menu character accelerator to goto the next menu page.
|
||||
Implemented by the Amiga, Gem and tty ports.
|
||||
Default `\verb+>+'.
|
||||
\item[\ib{menu\_objsyms}]
|
||||
Show object symbols in menu headings in menus where
|
||||
the object symbols act as menu accelerators (default off).
|
||||
\item[\ib{menu\_previous\_page}]
|
||||
Menu character accelerator to goto the previous menu page.
|
||||
Implemented by the Amiga, Gem and tty ports.
|
||||
Default `\verb+<+'.
|
||||
\item[\ib{menu\_search}]
|
||||
Menu character accelerator to search for a menu item.
|
||||
Implemented by the Amiga, Gem and X11 ports.
|
||||
Implemented by the Amiga, Gem, X11 and tty ports.
|
||||
Default `:'.
|
||||
\item[\ib{menu\_select\_all}]
|
||||
Menu character accelerator to select all items in a menu.
|
||||
@@ -2572,6 +2579,9 @@ Read the {\it NetHack\/} news file, if present (default on).
|
||||
Since the news is shown at the beginning of the game, there's no point
|
||||
in setting this with the `{\tt O}' command.
|
||||
%.lp
|
||||
\item[\ib{nudist}]
|
||||
Start the character with no armor (default false).
|
||||
%.lp
|
||||
\item[\ib{null}]
|
||||
Send padding nulls to the terminal (default on).
|
||||
%.lp
|
||||
@@ -2600,7 +2610,7 @@ is the same as specifying {\tt 0}.
|
||||
(Settings {\tt 2} and {\tt 4} are for compatibility with MSDOS or old PC Hack;
|
||||
in addition to the different behavior for `{\tt 5}', `{\tt Alt-5}' acts as `{\tt G}'
|
||||
and `{\tt Alt-0}' acts as `{\tt I}'.
|
||||
Setting {\tt -1} is to accomodate some German keyboards which have the
|
||||
Setting {\tt -1} is to accommodate some German keyboards which have the
|
||||
location of the `{\tt y}' and `{\tt z}' keys swapped.)
|
||||
When moving by numbers, to enter a count prefix for those commands
|
||||
which accept one (such as ``{\tt 12s}'' to search twelve times), precede it
|
||||
@@ -2678,10 +2688,8 @@ match an autopickup exception. Default is on.
|
||||
%.lp
|
||||
\item[\ib{pickup\_types}]
|
||||
Specify the object types to be picked up when ``{\it autopickup\/}''
|
||||
is on. Default is all types. If your copy of the game has the
|
||||
compile time option AUTOPICKUP\_EXCEPTIONS included,
|
||||
you may be able to use ``{\it autopickup\_exception\/}'' configuration
|
||||
file lines to further refine ``{\it autopickup\/}'' behavior.
|
||||
is on. Default is all types. You can use ``{\it autopickup\_exception\/}''
|
||||
configuration file lines to further refine ``{\it autopickup\/}'' behavior.
|
||||
%.lp
|
||||
\item[\ib{pile\_limit}]
|
||||
When walking across a pile of objects on the floor, threshold at which
|
||||
@@ -2962,6 +2970,9 @@ Specify the preferred height of each tile in a tile capable port.
|
||||
\item[\ib{tile\_width}]
|
||||
Specify the preferred width of each tile in a tile capable port
|
||||
%.lp
|
||||
\item[\ib{use\_darkgray}]
|
||||
Use bold black instead of blue for black glyphs (TTY only).
|
||||
%.lp
|
||||
\item[\ib{use\_inverse}]
|
||||
NetHack should display inverse when the game specifies it.
|
||||
%.lp
|
||||
@@ -3074,10 +3085,8 @@ Cannot be set with the `{\tt O}' command.
|
||||
\subsection*{Configuring autopickup exceptions}
|
||||
|
||||
%.pg
|
||||
There is a compile time option called AUTOPICKUP_EXCEPTIONS.
|
||||
If your copy of the game was built with that option defined, you can
|
||||
further refine the behavior of the ``{\tt autopickup}'' option beyond
|
||||
what is available through the ``{\tt pickup\_types}'' option.
|
||||
You can further refine the behavior of the ``{\tt autopickup}'' option
|
||||
beyond what is available through the ``{\tt pickup\_types}'' option.
|
||||
|
||||
%.pg
|
||||
By placing ``{\tt autopickup\_exception}'' lines in your configuration
|
||||
@@ -3459,6 +3468,69 @@ If this is the case, disable the number\_pad option and use the traditional
|
||||
Rogue-like commands.
|
||||
\elist
|
||||
|
||||
%.hn2
|
||||
\subsection*{Global Configuration for System Administrators}
|
||||
|
||||
%.pg
|
||||
If NetHack is compiled with the SYSCF option, a system administrator
|
||||
should set up a global configuration; this is a file in the
|
||||
same format as the traditional per-user configuration file (see above).
|
||||
|
||||
This file should be named sysconf and placed in the same directory as
|
||||
the other NetHack support files.
|
||||
The options recognized in this file are listed below. Any option not
|
||||
set uses a compiled-in default (which may not be appropriate for your
|
||||
system).
|
||||
|
||||
%.pg
|
||||
\blist{}
|
||||
%.lp
|
||||
\item[\ib{WIZARDS}]
|
||||
A space-separated list of user name who are allowed to play in wizard
|
||||
mode (the debugging mode, not the magic-useing role). A value of a single
|
||||
asterisk (*) allows anyone to start a game in wizard mode.
|
||||
%.lp
|
||||
\item[\ib{SHELLERS}]
|
||||
A list of users who are allowed to use the shell escape command (!).
|
||||
The syntax is the same as WIZARDS.
|
||||
%.lp
|
||||
\item[\ib{EXPLORERS}]
|
||||
A list of users who are allowed to use the explore mode.
|
||||
The syntax is the same as WIZARDS.
|
||||
%.lp
|
||||
\item[\ib{MAXPLAYERS}]
|
||||
Limit the maximum number of games taht can be running at the same time.
|
||||
%.lp
|
||||
\item[\ib{SUPPORT}]
|
||||
A string explainign how to get local support (no default value).
|
||||
%.lp
|
||||
\item[\ib{RECOVER}]
|
||||
A string explaining how to recover a game on this system (no default value).
|
||||
%.lp
|
||||
\item[\ib{SEDUCE}]
|
||||
0 or 1 to disable or enable, respectively, the SEDUCE option (see the source)
|
||||
for details on this function.
|
||||
\elist
|
||||
|
||||
%.pg
|
||||
The following options affect the score file:
|
||||
\blist {}
|
||||
%.pg
|
||||
%.lp
|
||||
\item[\ib{PERSMAX}]
|
||||
Maximum number of entries for one person
|
||||
%.lp
|
||||
\item[\ib{ENTRYMAX}]
|
||||
Maximum number of entries in the score file
|
||||
%.lp
|
||||
\item[\ib{POINTSMIN}]
|
||||
Minimum number of points to get an entry in the score file.
|
||||
%.lp
|
||||
\item[\ib{PERS_IS_UID}]
|
||||
0 or 1 to use user names or numeric userids, respectively, to identify
|
||||
unique people for the score file
|
||||
\elist
|
||||
|
||||
%.hn 1
|
||||
\section{Scoring}
|
||||
|
||||
@@ -3505,9 +3577,9 @@ There are two ways of enabling explore mode. One is to start the game
|
||||
with the {\tt -X}
|
||||
command-line switch or with the
|
||||
{\it playmode:explore\/}
|
||||
option. The other is to issue the `{\tt X}' command while already
|
||||
playing the game. Starting a new game in explore mode provides your
|
||||
character with a wand of wishing in initial inventory; switching via `X'
|
||||
option. The other is to issue the `{\tt \#exploremode}' extended command while
|
||||
already playing the game. Starting a new game in explore mode provides your
|
||||
character with a wand of wishing in initial inventory; switching
|
||||
during play does not. The other benefits of explore mode are left for
|
||||
the trepid reader to discover.
|
||||
|
||||
@@ -3728,7 +3800,7 @@ more than a year and a half.
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
The 3.5 development team initially consisted of
|
||||
The 3.4 development team initially consisted of
|
||||
{\it Michael Allison}, {\it Ken Arromdee},
|
||||
{\it David Cohrs}, {\it Jessie Collet}, {\it Kevin Hugo}, {\it Ken Lorber},
|
||||
{\it Dean Luick}, {\it Pat Rankin}, {\it Mike Stephenson},
|
||||
@@ -3743,11 +3815,11 @@ runs on:
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
\nd{\it Pat Rankin} maintained 3.5 for VMS.
|
||||
\nd{\it Pat Rankin} maintained 3.4 for VMS.
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
\nd {\it Michael Allison} maintained NetHack 3.5 for the MS-DOS platform.
|
||||
\nd {\it Michael Allison} maintained NetHack 3.4 for the MS-DOS platform.
|
||||
{\it Paul Winner} and {\it Yitzhak Sapir} provided encouragement.
|
||||
|
||||
%.pg
|
||||
@@ -3758,7 +3830,7 @@ enhanced the Macintosh port of 3.4.
|
||||
%.pg
|
||||
\medskip
|
||||
\nd {\it Michael Allison}, {\it David Cohrs}, {\it Alex Kompel}, {\it Dion Nicolaas}, and
|
||||
{\it Yitzhak Sapir} maintained and enhanced 3.5 for the Microsoft Windows platform.
|
||||
{\it Yitzhak Sapir} maintained and enhanced 3.4 for the Microsoft Windows platform.
|
||||
{\it Alex Kompel} contributed a new graphical interface for the Windows port.
|
||||
{\it Alex Kompel} also contributed a Windows CE port for 3.4.1.
|
||||
|
||||
@@ -3772,23 +3844,109 @@ all these years.
|
||||
%.pg
|
||||
\medskip
|
||||
\nd {\it Janne Salmij\"{a}rvi} and {\it Teemu Suikki} maintained
|
||||
and enhanced the Amiga port of 3.5 after {\it Janne Salmij\"{a}rvi} resurrected
|
||||
and enhanced the Amiga port of 3.4 after {\it Janne Salmij\"{a}rvi} resurrected
|
||||
it for 3.3.1.
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
\nd {\it Christian ``Marvin'' Bressler} maintained 3.5 for the Atari after he
|
||||
\nd {\it Christian ``Marvin'' Bressler} maintained 3.4 for the Atari after he
|
||||
resurrected it for 3.3.1.
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
\nd There is a NetHack web site maintained by {\it Ken Lorber} at
|
||||
The release of NetHack 3.4.3 in December 2003 marked the beginning of a
|
||||
long release hiatus. 3.4.3 proved to be a remarkably stable version that
|
||||
provided continued enjoyment by the community for more than a decade. The
|
||||
devteam slowly and quietly continued to work on the game behind the scenes
|
||||
during the tenure of 3.4.3. It was during that same period that several new
|
||||
variants emerged within the NetHack community. Notably sporkhack by
|
||||
Derek S. Ray, unnethack by Patric Mueller, nitrohack and its successors
|
||||
originally by Daniel Thaler and then by Alex Smith, and
|
||||
Dynahack by Tung Nguyen. Some of those variants continue to be developed,
|
||||
maintained, and enjoyed by the community to this day.
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
In September 2014, an interim snapshot of the code under development was
|
||||
released publicly by other parties. Since that code was a work-in-progress
|
||||
and had not gone through a period of debugging, it was decided that the
|
||||
version numbers present on that code snapshot would be retired and never
|
||||
used in an official NetHack release. An announcement was posted on the
|
||||
devteam's official nethack.org website to that effect, stating that there
|
||||
would never be a 3.4.4, 3.5, or 3.5.0 official release version.
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
In January 2015, preparation began for the release of NetHack 3.6
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
At the beginning of development for what would eventually get released
|
||||
as 3.6.0, the development team consisted of {\it Warwick Allison},
|
||||
{\it Michael Allison}, {\it Ken Arromdee},
|
||||
{\it David Cohrs}, {\it Jessie Collet},
|
||||
{\it Ken Lorber}, {\it Dean Luick}, {\it Pat Rankin},
|
||||
{\it Mike Stephenson}, {\it Janet Walz}, and {\it Paul Winner}.
|
||||
Leading up to the release of 3.6.0 in early 2015, new members
|
||||
{\it Sean Hunt}, {\it Pasi Kallinen}, and {\it Derek S. Ray}
|
||||
joined the NetHack development team,
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
3.6.0 TODO insert apprpriate description of 3.6.0 here
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
The development team, as well as {\it Steve VanDevender} and
|
||||
{\it Kevin Smolkowski} ensured that NetHack 3.6.0 continued to operate on
|
||||
various Unix flavors as well as maintaining the X11 interface.
|
||||
|
||||
{\it Ken Lorber}, {\it Haoyang Wang}, {\it Pat Rankin}, and {\it Dean Luick}
|
||||
maintained the port of NetHack 3.6.0 for Mac.
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
{\it Michael Allison}, {\it Derek S. Ray}, {\it Yitzhak Sapir},
|
||||
{\it Alex Kompel}, and {\it David Cohrs} maintained the port of
|
||||
NetHack 3.6.0 for Microsoft Windows.
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
{\it Jeff Bailey} created and maintained a port of NetHack 3.6.0 for Chrome.
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
{\it Alex Kompel} maintained a port of NetHack 3.6.0 to Windows Phone. <FIXME>?
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
This version of the game is special in a particular way. Near the end of
|
||||
the development of 3.6, one of the significant inspirations for many of the
|
||||
humorous and fun features found in the game, author {\it Terry Pratchett},
|
||||
passed away. This version of the game is dedicated to him.
|
||||
|
||||
%.pg
|
||||
\medskip
|
||||
\nd The official NetHack web site is maintained by {\it Ken Lorber} at
|
||||
{\catcode`\#=11
|
||||
\special{html:<a href="http://www.nethack.org/">}}
|
||||
http:{\tt /}{\tt /}www.nethack.org{\tt /}.
|
||||
{\catcode`\#=11
|
||||
\special{html:</a>}}
|
||||
|
||||
%.pg
|
||||
%.hn 2
|
||||
\subsection*{Shout Outs}
|
||||
\nd The devteam would like to give a special "shout-out" to thank the generous
|
||||
people primarily responsible for the public NetHack servers available for
|
||||
playing the game at nethack.alt.org and devnull.net. In addition to providing
|
||||
a way for the public to play a game of NetHack from almost anywhere, they
|
||||
have hosted annual NetHack tournaments for many, many years.
|
||||
%.pg
|
||||
\nd On behalf of the NetHack community, thank you very much to
|
||||
{\it M. Drew Streib}, {\it Pasi Kallinen} and {\it Robin Bandy}.
|
||||
|
||||
%.pg
|
||||
%.hn 3
|
||||
\subsection*{Dungeoneers}
|
||||
\bigskip
|
||||
@@ -3801,11 +3959,11 @@ in this, the list of Dungeoneers:
|
||||
\begin{center}
|
||||
\begin{tabular}{lll}
|
||||
%TABLE_START
|
||||
Adam Aronow & Izchak Miller & Mike Stephenson\\
|
||||
Alex Kompel & J. Ali Harlow & Norm Meluch\\
|
||||
Andreas Dorn & Janet Walz & Olaf Seibert\\
|
||||
Andy Church & Janne Salmij\"{a}rvi & Pasi Kallinen\\
|
||||
Andy Swanson & Jean-Christophe Collet & Pat Rankin\\
|
||||
Adam Aronow & J. Ali Harlow & Mike Stephenson\\
|
||||
Alex Kompel & Janet Walz & Norm Meluch\\
|
||||
Andreas Dorn & Janne Salmij\"{a}rvi & Olaf Seibert\\
|
||||
Andy Church & Jean-Christophe Collet & Pasi Kallinen\\
|
||||
Andy Swanson & Jeff Bailey & Pat Rankin\\
|
||||
Ari Huttunen & Jochen Erwied & Paul Winner\\
|
||||
Barton House & John Kallen & Pierre Martineau\\
|
||||
Benson I. Margulies & John Rupley & Ralf Brown\\
|
||||
@@ -3814,31 +3972,32 @@ Boudewijn Waijers & Johnny Lee & Richard Addison\\
|
||||
Bruce Cox & Jon W\{tte & Richard Beigel\\
|
||||
Bruce Holloway & Jonathan Handler & Richard P. Hughey\\
|
||||
Bruce Mewborne & Joshua Delahunty & Rob Menke\\
|
||||
Carl Schelin & Keizo Yamamoto & Robin Johnson\\
|
||||
Chris Russo & Ken Arnold & Roderick Schertler\\
|
||||
David Cohrs & Ken Arromdee & Roland McGrath\\
|
||||
David Damerell & Ken Lorber & Ron Van Iwaarden\\
|
||||
David Gentzel & Ken Washikita & Ronnen Miller\\
|
||||
David Hairston & Kevin Darcy & Ross Brown\\
|
||||
Dean Luick & Kevin Hugo & Sascha Wostmann\\
|
||||
Del Lamb & Kevin Sitze & Scott Bigham\\
|
||||
Derek S. Ray & Kevin Smolkowski & Scott R. Turner\\
|
||||
Deron Meranda & Kevin Sweet & Sean Hunt\\
|
||||
Dion Nicolaas & Lars Huttar & Stephen Spackman\\
|
||||
Dylan O'Donnell & Leon Arnott & Stephen White\\
|
||||
Eric Backus & Malcolm Ryan & Steve Creps\\
|
||||
Eric Hendrickson & Mark Gooderum & Steve Linhart\\
|
||||
Eric R. Smith & Mark Modrall & Steve VanDevender\\
|
||||
Eric S. Raymond & Marvin Bressler & Teemu Suikki\\
|
||||
Erik Andersen & Matthew Day & Tim Lennan\\
|
||||
Frederick Roeber & Merlyn LeRoy & Timo Hakulinen\\
|
||||
Gil Neiger & Michael Allison & Tom Almy\\
|
||||
Greg Laskin & Michael Feir & Tom West\\
|
||||
Greg Olson & Michael Hamel & Warren Cheung\\
|
||||
Gregg Wonderly & Michael Sokolov & Warwick Allison\\
|
||||
Hao-yang Wang & Mike Engber & Yitzhak Sapir\\
|
||||
Helge Hafting & Mike Gallop\\
|
||||
Irina Rempt-Drijfhout & Mike Passaretti
|
||||
Carl Schelin & Keizo Yamamoto & Robin Bandy\\
|
||||
Chris Russo & Ken Arnold & Robin Johnson\\
|
||||
David Cohrs & Ken Arromdee & Roderick Schertler\\
|
||||
David Damerell & Ken Lorber & Roland McGrath\\
|
||||
David Gentzel & Ken Washikita & Ron Van Iwaarden\\
|
||||
David Hairston & Kevin Darcy & Ronnen Miller\\
|
||||
Dean Luick & Kevin Hugo & Ross Brown\\
|
||||
Del Lamb & Kevin Sitze & Sascha Wostmann\\
|
||||
Derek S. Ray & Kevin Smolkowski & Scott Bigham\\
|
||||
Deron Meranda & Kevin Sweet & Scott R. Turner\\
|
||||
Dion Nicolaas & Lars Huttar & Sean Hunt\\
|
||||
Dylan O'Donnell & Leon Arnott & Stephen Spackman\\
|
||||
Eric Backus & M. Drew Streib & Stephen White\\
|
||||
Eric Hendrickson & Malcolm Ryan & Steve Creps\\
|
||||
Eric R. Smith & Mark Gooderum & Steve Linhart\\
|
||||
Eric S. Raymond & Mark Modrall & Steve VanDevender\\
|
||||
Erik Andersen & Marvin Bressler & Teemu Suikki\\
|
||||
Frederick Roeber & Matthew Day & Tim Lennan\\
|
||||
Gil Neiger & Merlyn LeRoy & Timo Hakulinen\\
|
||||
Greg Laskin & Michael Allison & Tom Almy\\
|
||||
Greg Olson & Michael Feir & Tom West\\
|
||||
Gregg Wonderly & Michael Hamel & Warren Cheung\\
|
||||
Hao-yang Wang & Michael Sokolov & Warwick Allison\\
|
||||
Helge Hafting & Mike Engber & Yitzhak Sapir\\
|
||||
Irina Rempt-Drijfhout & Mike Gallop\\
|
||||
Izchak Miller & Mike Passaretti
|
||||
%TABLE_END Do not delete this line.
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
||||
+2313
-1851
File diff suppressed because it is too large
Load Diff
+40
-17
@@ -63,7 +63,7 @@ wizard mode: avoid division by 0 crash for level teleport in the endgame if
|
||||
don't #sit on an object in a pit if you're only on the precipice
|
||||
fix message when pushing a boulder into a pool while riding
|
||||
plural of "Nazgul" is "Nazgul" not "Nazguls"
|
||||
trap messages referring to named steed were ackwardly worded when hallucination
|
||||
trap messages referring to named steed were awkwardly worded when hallucination
|
||||
overrode use of the name
|
||||
some actions such as eating corpses off the floor didn't check whether hero
|
||||
could reach the bottom of a pit
|
||||
@@ -117,7 +117,7 @@ shopkeeper removal of trap from shop doorway yields an open door instead of
|
||||
a closed one if an intact open door is present
|
||||
guarantee that hostile djinn released from bottles really are hostile
|
||||
handle lava when removing or losing water walking boots
|
||||
fix incomplete sentence occuring when unique monster's corpse fell down stairs
|
||||
fix incomplete sentence occurring when unique monster's corpse fell down stairs
|
||||
fractured boulders or statues produced inconsistent object settings on the
|
||||
resulting rocks
|
||||
really fix rolling boulder bug C340-18, the previous "fix" reversed the test
|
||||
@@ -165,7 +165,7 @@ clean up messages when you stop levitation while riding a flying steed
|
||||
monsters evading a kick on noteleport levels would cause a "teleports" message
|
||||
interrupt current activity during certain stages of petrification or vomiting
|
||||
warning about bad food didn't recognize tin of Medusa meat
|
||||
eating tainted Medusa corpse caused food poisioning instead of petrification
|
||||
eating tainted Medusa corpse caused food poisoning instead of petrification
|
||||
avoid potential stale pointer use after magic bag explosion
|
||||
nymphs and monkeys can't steal rings worn under gloves
|
||||
monkeys can't steal rings worn under cursed weapon
|
||||
@@ -237,7 +237,7 @@ when there were multiple boulders at a location, moving one of them sometimes
|
||||
resulted in line-of-sight anomalies
|
||||
unicorn can't catch gems if it is asleep or paralyzed
|
||||
fix grammar when choking on gold
|
||||
prevent lose-level+regain-level cycle from arbritrarily boosting HP and Pw
|
||||
prevent lose-level+regain-level cycle from arbitrarily boosting HP and Pw
|
||||
prevent polymorphing into "new man" at low level from magnifying HP and Pw
|
||||
some messages which referred to "mirror" ought to have used "looking glass"
|
||||
incubi react to mirrors
|
||||
@@ -360,8 +360,8 @@ code handling a monster's use of potion or food to cure stoning or confusion
|
||||
properly handle destruction of equipment carried by monsters hit by
|
||||
disintegration breath; life-saving retained conferred properties of
|
||||
formerly worn items (loss of steed's saddle caused much confusion)
|
||||
don't exercize or abuse wisdom when rumors get used for random graffiti
|
||||
don't exercize wisdom twice for each minor oracle consultation
|
||||
don't exercise or abuse wisdom when rumors get used for random graffiti
|
||||
don't exercise wisdom twice for each minor oracle consultation
|
||||
don't welcome the hero to Delphi if the Oracle was angered before first entry
|
||||
create_object() created lizard corpses without timers and troll corpses with
|
||||
their revive timers, then changed the corpsenm field
|
||||
@@ -383,7 +383,7 @@ specifying role and/or race along with an invalid alignment for it/them in
|
||||
temple donation can recover protection previously stolen by attrcurse attack
|
||||
even when protection amount is so big that no increment would be given
|
||||
meditating monsters stop meditating when affected by something which wakes
|
||||
sleeping mosnters
|
||||
sleeping monsters
|
||||
monsters capable of hiding can't do so when trapped or while holding you
|
||||
limit recursive calls to spoteffects (poly'd hero fell into water, reverted
|
||||
to human because of it, fell into same water, then crawled out twice)
|
||||
@@ -474,7 +474,7 @@ suppress corpse from bones data if death is due to being dissolved in lava
|
||||
suppress "you rise from the dead" if game ends due to be turned into slime
|
||||
hero poly'd into stone golem and wielding cockatrice corpse casts stone-to-
|
||||
flesh at self to become flesh golem will revert to stone if no gloves
|
||||
don't give erroneous "<mon> disppears" message for hero poly'd into quantum
|
||||
don't give erroneous "<mon> disappears" message for hero poly'd into quantum
|
||||
mechanic who hits engulfer while swallowed and blinded
|
||||
demon lords/princes can't be summoned to the elemental or Astral planes
|
||||
feedback from casting spell of protection was wrong in some situations
|
||||
@@ -496,7 +496,7 @@ can't eat an artifact you're unable to touch
|
||||
attempting to kick beyond map edge performed an out of array bounds memory
|
||||
access; symptom seen was "show_glyph: bad pos" warning when blind
|
||||
attempting to engrave with an empty wand should always use a turn
|
||||
don't access freed memory after engraving "wrests one last charnge" from wand
|
||||
don't access freed memory after engraving "wrests one last charge" from wand
|
||||
a magic portal could be rendered inactive for the hero if a successful
|
||||
hangup save took place during level change; leaving the level by any
|
||||
means other than triggering the portal would reactivate it
|
||||
@@ -645,7 +645,7 @@ secret door detection's trap finding is no longer blocked by water or clouds
|
||||
potion thrown by monster which hit a long worm's tail gave feedback about
|
||||
hitting its head
|
||||
implement energy vortex's previously unused energy drain attack
|
||||
changing alignment type resets alignment record to 0 (nomimally aligned)
|
||||
changing alignment type resets alignment record to 0 (nominally aligned)
|
||||
jellyfish do not technically have a head
|
||||
while polymorphed, suppress attribute gain/lose earned by pre-poly exercise
|
||||
wizard mode #monpolycontrol prompting asked about "it" when monster was unseen
|
||||
@@ -670,7 +670,7 @@ if polymorph causes a monster to drop items, they won't be used up via
|
||||
monsters who ate green slime corpses weren't turned into green slime
|
||||
"hand slip" while naming an object would never pick 'z' as a substitute letter
|
||||
hero would "gladly take off <armor>" for nymph or succubus even while asleep
|
||||
concealed mimic wasn't revealed if kicking attmpt yielded a clumsy miss
|
||||
concealed mimic wasn't revealed if kicking attempt yielded a clumsy miss
|
||||
too accurate feedback given to a blinded hero when a monster summons insects
|
||||
if life-saved steed became untame, repeated "placing steed onto map?" warnings
|
||||
would be given as long as the hero remained mounted
|
||||
@@ -730,7 +730,7 @@ shouldn't have been able write scrolls by guessing type name when they're
|
||||
scrolls given names can be written by assigned name as well as by description
|
||||
fix writing feedback "the spellbook warps strangely, then turns parchment"
|
||||
make stone artifacts usually resist stone-to-flesh
|
||||
when reading an unknown scroll and learning it, discovery of teleporation was
|
||||
when reading an unknown scroll and learning it, discovery of teleportation was
|
||||
too late if hero happened to land on another scroll of teleportation
|
||||
using an unlocking tool on a closed door which was actually a mimic reported
|
||||
that there was no door to unlock instead of exposing the mimic
|
||||
@@ -760,7 +760,7 @@ for number_pad:2 (MSDOS compatibility), M-5 (Alt+5, or Shift+keypad5 using
|
||||
MSDOS/Windows keystroke hackery) didn't function as G movement prefix
|
||||
if an angry shopkeeper chased the hero to a different level and then got paid
|
||||
off, he'd dismiss kops on that other level but not on his shop level
|
||||
objects inside the Wizard's Tower can't be teleport to outside and vica versa
|
||||
objects inside the Wizard's Tower can't be teleport to outside and vice versa
|
||||
dying in lava and being life-saved or leaving bones would destroy ring of
|
||||
fire resistance if it happened to be made of wood, and also burn up
|
||||
scrolls of fire and spellbook of fireball
|
||||
@@ -786,7 +786,7 @@ when shop prices are adjusted, handle roundoff (integer truncation) better
|
||||
for hero poly'd into a monster form that lacks a weapon attack but has a claw
|
||||
attack, use wielded weapon even when claw attack isn't the very first
|
||||
rename the SLEEPING property and Sleeping attribute to SLEEPY and Sleepy, resp.
|
||||
character escape sequence handling during options processing was vulernable
|
||||
character escape sequence handling during options processing was vulnerable
|
||||
to malformed escapes and could potentially be abused to clobber the
|
||||
stack and launch a buffer overrun attack
|
||||
give alternate message for "<mon> turns to flee" when mon can't move
|
||||
@@ -815,7 +815,7 @@ hangup save made during magic mapping or <foo> detection performed while
|
||||
underwater could put hero on top of the water after restore
|
||||
fix bug preventing stone-resistant monsters w/o gloves from wielding cockatrices
|
||||
items conferring life drain resistance were affected by drain life spell
|
||||
'a'pply command could be used to recogniize undiscovered potions of oil
|
||||
'a'pply command could be used to recognize undiscovered potions of oil
|
||||
fix replacing an existing bones file in wizard mode [load?y, unlink?n, die?y,
|
||||
save?y, replace?y] for configurations using external file compression
|
||||
theft of worn armor with wear/unwear delay would interfere with completion of
|
||||
@@ -872,13 +872,28 @@ data.base "gelatinous cube" and "jack boot" have their own entries
|
||||
data.base "vampire bat" matched twice; use the bat entry
|
||||
data.base dagger attribution started with spaces instead of tabs
|
||||
remove 'if (Deaf)' guards preceding You_hear which already checks deafness
|
||||
tse a menu to loot multiple containers
|
||||
use a menu to loot multiple containers
|
||||
do_look() in post-3.4.3 used glyph prior to setting it in pager.c
|
||||
charge for a boulder that fills a pit in shop
|
||||
abuse wisdom in keeping with Rider eating message
|
||||
message inconsistency: death message "swallowed <mon> whole" was preceded
|
||||
by "You bite into"
|
||||
improve the messaging when a monster you can't see is causing an obstruction
|
||||
add option mention_walls, which gives feedback when bumping against a wall
|
||||
fix invalid pointer dereference in morguemon if ndemon returns NON_PM
|
||||
after object loss through polyshudder don't get left hiding under nothing
|
||||
if you're polymorphed into a hider
|
||||
show object symbols in menu headings in menus where those object symbols
|
||||
act as menu accelerators, toggleable via "menu_objsyms" option
|
||||
show t-shirt text at end of game inventory disclose
|
||||
hitting with a polearm remembers the position of the last monster you hit
|
||||
allow showing legal polearm positions when asked for location to hit
|
||||
add messages for trying to pick up some terrain features
|
||||
boomerang makes noise when hitting a sink
|
||||
non-pet rust monsters would eat rust-proofed non-digestibles but ignore
|
||||
those non-digestibles otherwise
|
||||
kicking a grave may topple the gravestone
|
||||
allow showing legal jumping positions when asked for location to jump to
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
@@ -979,7 +994,7 @@ burying a punishment ball no longer ends your punishment
|
||||
add clicklook option to allow looking at things on the display by clicking
|
||||
right mouse button when floating mouse pointer over them
|
||||
Izchak's lighting store is now able to stock oil for your lamp
|
||||
provide core support for saving of messsage history in save file
|
||||
provide core support for saving of message history in save file
|
||||
the following actions can now be continued after save/restore: digging,
|
||||
eating, studying, removing armor
|
||||
hero-created and monster-created ice will eventually melt away
|
||||
@@ -1090,6 +1105,13 @@ pressing @ when cursor positioning moves cursor on top of hero
|
||||
pressing # when cursor positioning toggles automatic description of features
|
||||
under the cursor
|
||||
cursor positioning ignores uninteresting dungeon features
|
||||
allow reading many more items
|
||||
when you're hiding under something a zap downward should not hit that
|
||||
something, while a zap upward should
|
||||
show more explicit reason why player was helpless at death
|
||||
added new hallucinatory-only gods
|
||||
options to create the character blind or nudist
|
||||
moving clouds on the plane of air
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific New Features
|
||||
@@ -1127,6 +1149,7 @@ adopt/adapt/improve the Paranoid_Quit patch; default is paranoid_confirm:pray
|
||||
paranoid_confirm:Remove always pick from inventory for 'R' and 'T'
|
||||
adopt/adapt/improve Dungeon Overview
|
||||
Aardvark Joe's Extended Logfile
|
||||
Michael Deutschmann's use_darkgray
|
||||
|
||||
|
||||
Code Cleanup and Reorganization
|
||||
|
||||
@@ -5,3 +5,4 @@ pm.h
|
||||
vis_tab.h
|
||||
dgn_comp.h
|
||||
lev_comp.h
|
||||
tile.h
|
||||
|
||||
@@ -73,6 +73,11 @@ struct warntype_info {
|
||||
short speciesidx; /* index of above in mons[] (for save/restore) */
|
||||
};
|
||||
|
||||
struct polearm_info {
|
||||
struct monst *hitmon; /* the monster we tried to hit last */
|
||||
unsigned m_id; /* monster id of hitmon, in save file */
|
||||
};
|
||||
|
||||
struct context_info {
|
||||
unsigned ident; /* social security number for each monster */
|
||||
unsigned no_of_wizards; /* 0, 1 or 2 (wizard and his shadow) */
|
||||
@@ -103,6 +108,7 @@ struct context_info {
|
||||
struct book_info spbook;
|
||||
struct takeoff_info takeoff;
|
||||
struct warntype_info warntype;
|
||||
struct polearm_info polearm;
|
||||
};
|
||||
|
||||
extern NEARDATA struct context_info context;
|
||||
|
||||
@@ -28,6 +28,7 @@ E char SAVEP[];
|
||||
E NEARDATA int bases[MAXOCLASSES];
|
||||
|
||||
E NEARDATA int multi;
|
||||
E const char *multi_reason;
|
||||
E NEARDATA int nroom;
|
||||
E NEARDATA int nsubroom;
|
||||
E NEARDATA int occtime;
|
||||
|
||||
+4
-2
@@ -364,6 +364,7 @@ E void NDECL(heal_legs);
|
||||
/* ### do_name.c ### */
|
||||
|
||||
E int FDECL(getpos, (coord *,BOOLEAN_P,const char *));
|
||||
E void FDECL(getpos_sethilite, (void (*f)(int) ));
|
||||
E void FDECL(new_mname, (struct monst *,int));
|
||||
E void FDECL(free_mname, (struct monst *));
|
||||
E void FDECL(new_oname, (struct obj *,int));
|
||||
@@ -911,7 +912,7 @@ E int NDECL(dopramulet);
|
||||
E int NDECL(doprtool);
|
||||
E int NDECL(doprinuse);
|
||||
E void FDECL(useupf, (struct obj *,long));
|
||||
E char *FDECL(let_to_name, (CHAR_P,BOOLEAN_P));
|
||||
E char *FDECL(let_to_name, (CHAR_P,BOOLEAN_P,BOOLEAN_P));
|
||||
E void NDECL(free_invbuf);
|
||||
E void NDECL(reassign);
|
||||
E int NDECL(doorganize);
|
||||
@@ -1825,6 +1826,7 @@ E long NDECL(random);
|
||||
/* ### read.c ### */
|
||||
|
||||
E void FDECL(learnscroll, (struct obj *));
|
||||
E char *FDECL(tshirt_text, (struct obj *, char *));
|
||||
E int NDECL(doread);
|
||||
E boolean FDECL(is_chargeable, (struct obj *));
|
||||
E void FDECL(recharge, (struct obj *,int));
|
||||
@@ -2628,7 +2630,7 @@ E boolean FDECL(obj_resists, (struct obj *,int,int));
|
||||
E boolean FDECL(obj_shudders, (struct obj *));
|
||||
E void FDECL(do_osshock, (struct obj *));
|
||||
E int FDECL(bhito, (struct obj *,struct obj *));
|
||||
E int FDECL(bhitpile, (struct obj *,int (*)(OBJ_P,OBJ_P),int,int));
|
||||
E int FDECL(bhitpile, (struct obj *,int (*)(OBJ_P,OBJ_P),int,int,SCHAR_P));
|
||||
E int FDECL(zappable, (struct obj *));
|
||||
E void FDECL(zapnodir, (struct obj *));
|
||||
E int NDECL(dozap);
|
||||
|
||||
@@ -189,7 +189,9 @@ struct instance_flags {
|
||||
boolean deferred_X; /* deferred entry into explore mode */
|
||||
boolean num_pad; /* use numbers for movement commands */
|
||||
boolean news; /* print news */
|
||||
boolean mention_walls; /* give feedback when bumping walls */
|
||||
boolean menu_tab_sep; /* Use tabs to separate option menu fields */
|
||||
boolean menu_head_objsym; /* Show obj symbol in menu headings */
|
||||
boolean menu_requested; /* Flag for overloaded use of 'm' prefix
|
||||
* on some non-move commands */
|
||||
boolean renameallowed; /* can change hero name during role selection */
|
||||
@@ -293,6 +295,7 @@ struct instance_flags {
|
||||
boolean wc2_softkeyboard; /* use software keyboard */
|
||||
boolean wc2_wraptext; /* wrap text */
|
||||
boolean wc2_selectsaved; /* display a menu of user's saved games */
|
||||
boolean wc2_darkgray; /* try to use dark-gray color for black glyphs */
|
||||
boolean cmdassist; /* provide detailed assistance for some commands */
|
||||
boolean clicklook; /* allow right-clicking for look */
|
||||
boolean obsolete; /* obsolete options can point at this, it isn't used */
|
||||
|
||||
@@ -303,6 +303,17 @@ struct obj {
|
||||
|| (otmp)->otyp == WAX_CANDLE\
|
||||
|| (otmp)->otyp == POT_OIL)
|
||||
|
||||
/* things that can be read */
|
||||
#define is_readable(otmp) ((otmp)->otyp == FORTUNE_COOKIE\
|
||||
|| (otmp)->otyp == T_SHIRT\
|
||||
|| (otmp)->otyp == ALCHEMY_SMOCK\
|
||||
|| (otmp)->otyp == CREDIT_CARD\
|
||||
|| (otmp)->otyp == CAN_OF_GREASE\
|
||||
|| (otmp)->otyp == MAGIC_MARKER\
|
||||
|| (otmp)->oclass == COIN_CLASS\
|
||||
|| (otmp)->oartifact == ART_ORB_OF_FATE\
|
||||
|| (otmp)->otyp == CANDY_BAR)
|
||||
|
||||
/* special stones */
|
||||
#define is_graystone(obj) ((obj)->otyp == LUCKSTONE || \
|
||||
(obj)->otyp == LOADSTONE || \
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||
* and save files.
|
||||
*/
|
||||
#define EDITLEVEL 58
|
||||
#define EDITLEVEL 60
|
||||
|
||||
#define COPYRIGHT_BANNER_A \
|
||||
"NetHack, Copyright 1985-2015"
|
||||
|
||||
@@ -10,6 +10,7 @@ struct sysopt {
|
||||
char *support; /* local support contact */
|
||||
char *recover; /* how to run recover - may be overridden by win port */
|
||||
char *wizards;
|
||||
char *explorers;
|
||||
char *shellers; /* like wizards, for ! command (-DSHELL) */
|
||||
char *debugfiles; /* files to show debugplines in. '*' is all. */
|
||||
int env_dbgfl; /* 1: debugfiles comes from getenv("DEBUGFILES")
|
||||
|
||||
+2
-1
@@ -219,7 +219,8 @@ NEARDATA struct window_procs windowprocs;
|
||||
#define WC2_WRAPTEXT 0x04L /* 03 wrap long lines of text */
|
||||
#define WC2_HILITE_STATUS 0x08L /* 04 hilite fields in status */
|
||||
#define WC2_SELECTSAVED 0x10L /* 05 saved game selection menu */
|
||||
/* 27 free bits */
|
||||
#define WC2_DARKGRAY 0x20L /* 06 use bold black for black glyphs */
|
||||
/* 26 free bits */
|
||||
|
||||
#define ALIGN_LEFT 1
|
||||
#define ALIGN_RIGHT 2
|
||||
|
||||
@@ -92,6 +92,11 @@ struct u_conduct { /* number of times... */
|
||||
/* genocides already listed at end of game */
|
||||
};
|
||||
|
||||
struct u_roleplay {
|
||||
boolean blind; /* permanently blind */
|
||||
boolean nudist; /* has not worn any armor, ever */
|
||||
};
|
||||
|
||||
/*** Unified structure containing role information ***/
|
||||
struct Role {
|
||||
/*** Strings that name various things ***/
|
||||
@@ -330,6 +335,7 @@ struct you {
|
||||
struct u_event uevent; /* certain events have happened */
|
||||
struct u_have uhave; /* you're carrying special objects */
|
||||
struct u_conduct uconduct; /* KMH, conduct */
|
||||
struct u_roleplay uroleplay;
|
||||
struct attribs acurr, /* your current attributes (eg. str)*/
|
||||
aexe, /* for gain/loss via "exercise" */
|
||||
abon, /* your bonus attributes (eg. str) */
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@
|
||||
#define Blinded u.uprops[BLINDED].intrinsic
|
||||
#define Blindfolded (ublindf && ublindf->otyp != LENSES)
|
||||
/* ...means blind because of a cover */
|
||||
#define Blind ((Blinded || Blindfolded || !haseyes(youmonst.data)) && \
|
||||
#define Blind ((u.uroleplay.blind || Blinded || Blindfolded || !haseyes(youmonst.data)) && \
|
||||
!(ublindf && ublindf->oartifact == ART_EYES_OF_THE_OVERWORLD))
|
||||
/* ...the Eyes operate even when you really are blind
|
||||
or don't have any eyes */
|
||||
|
||||
+1
-1
@@ -292,7 +292,7 @@ boolean resuming;
|
||||
}
|
||||
restore_attrib();
|
||||
/* underwater and waterlevel vision are done here */
|
||||
if (Is_waterlevel(&u.uz))
|
||||
if (Is_waterlevel(&u.uz) || Is_airlevel(&u.uz))
|
||||
movebubbles();
|
||||
else if (Underwater)
|
||||
under_water(0);
|
||||
|
||||
+134
-29
@@ -20,6 +20,7 @@ STATIC_DCL void FDECL(use_candelabrum, (struct obj *));
|
||||
STATIC_DCL void FDECL(use_candle, (struct obj **));
|
||||
STATIC_DCL void FDECL(use_lamp, (struct obj *));
|
||||
STATIC_DCL void FDECL(light_cocktail, (struct obj *));
|
||||
STATIC_PTR void FDECL(display_jump_positions, (int));
|
||||
STATIC_DCL void FDECL(use_tinning_kit, (struct obj *));
|
||||
STATIC_DCL void FDECL(use_figurine, (struct obj **));
|
||||
STATIC_DCL void FDECL(use_grease, (struct obj *));
|
||||
@@ -27,6 +28,7 @@ STATIC_DCL void FDECL(use_trap, (struct obj *));
|
||||
STATIC_DCL void FDECL(use_stone, (struct obj *));
|
||||
STATIC_PTR int NDECL(set_trap); /* occupation callback */
|
||||
STATIC_DCL int FDECL(use_whip, (struct obj *));
|
||||
STATIC_PTR void FDECL(display_polearm_positions, (int));
|
||||
STATIC_DCL int FDECL(use_pole, (struct obj *));
|
||||
STATIC_DCL int FDECL(use_cream_pie, (struct obj *));
|
||||
STATIC_DCL int FDECL(use_grapple, (struct obj *));
|
||||
@@ -736,8 +738,10 @@ struct obj *obj;
|
||||
pline("Yow! The %s stares back!", mirror);
|
||||
else
|
||||
pline("Yikes! You've frozen yourself!");
|
||||
if (!Hallucination || !rn2(4))
|
||||
if (!Hallucination || !rn2(4)) {
|
||||
nomul(-rnd(MAXULEV + 6 - u.ulevel));
|
||||
multi_reason = "gazing into a mirror";
|
||||
}
|
||||
nomovemsg = 0; /* default, "you can move again" */
|
||||
}
|
||||
} else if (youmonst.data->mlet == S_VAMPIRE)
|
||||
@@ -915,6 +919,7 @@ struct obj **optr;
|
||||
break;
|
||||
case 2: /* no explanation; it just happens... */
|
||||
nomovemsg = "";
|
||||
multi_reason = NULL;
|
||||
nomul(-rnd(2));
|
||||
break;
|
||||
}
|
||||
@@ -1357,6 +1362,53 @@ dojump()
|
||||
return jump(0);
|
||||
}
|
||||
|
||||
boolean
|
||||
is_valid_jump_pos(x,y, magic, showmsg)
|
||||
int x,y, magic;
|
||||
boolean showmsg;
|
||||
{
|
||||
if (!magic && !(HJumping & ~INTRINSIC) && !EJumping &&
|
||||
distu(x, y) != 5) {
|
||||
/* The Knight jumping restriction still applies when riding a
|
||||
* horse. After all, what shape is the knight piece in chess?
|
||||
*/
|
||||
if (showmsg) pline("Illegal move!");
|
||||
return FALSE;
|
||||
} else if (distu(x, y) > (magic ? 6+magic*3 : 9)) {
|
||||
if (showmsg) pline("Too far!");
|
||||
return FALSE;
|
||||
} else if (!cansee(x, y)) {
|
||||
if (showmsg) You("cannot see where to land!");
|
||||
return FALSE;
|
||||
} else if (!isok(x, y)) {
|
||||
if (showmsg) You("cannot jump there!");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int jumping_is_magic;
|
||||
|
||||
void
|
||||
display_jump_positions(state)
|
||||
int state;
|
||||
{
|
||||
if (state == 0) {
|
||||
tmp_at(DISP_BEAM, cmap_to_glyph(S_flashbeam));
|
||||
} else if (state == 1) {
|
||||
int x,y, dx, dy;
|
||||
for (dx = -4; dx <= 4; dx++)
|
||||
for (dy = -4; dy <= 4; dy++) {
|
||||
x = dx + (int)u.ux;
|
||||
y = dy + (int)u.uy;
|
||||
if (isok(x,y) && is_valid_jump_pos(x,y, jumping_is_magic, FALSE))
|
||||
tmp_at(x,y);
|
||||
}
|
||||
} else {
|
||||
tmp_at(DISP_END, 0);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
jump(magic)
|
||||
int magic; /* 0=Physical, otherwise skill level */
|
||||
@@ -1436,24 +1488,12 @@ int magic; /* 0=Physical, otherwise skill level */
|
||||
pline("Where do you want to jump?");
|
||||
cc.x = u.ux;
|
||||
cc.y = u.uy;
|
||||
jumping_is_magic = magic;
|
||||
getpos_sethilite(display_jump_positions);
|
||||
if (getpos(&cc, TRUE, "the desired position") < 0)
|
||||
return 0; /* user pressed ESC */
|
||||
if (!magic && !(HJumping & ~INTRINSIC) && !EJumping &&
|
||||
distu(cc.x, cc.y) != 5) {
|
||||
/* The Knight jumping restriction still applies when riding a
|
||||
* horse. After all, what shape is the knight piece in chess?
|
||||
*/
|
||||
pline("Illegal move!");
|
||||
return 0;
|
||||
} else if (distu(cc.x, cc.y) > (magic ? 6+magic*3 : 9)) {
|
||||
pline("Too far!");
|
||||
return 0;
|
||||
} else if (!cansee(cc.x, cc.y)) {
|
||||
You("cannot see where to land!");
|
||||
return 0;
|
||||
} else if (!isok(cc.x, cc.y)) {
|
||||
You("cannot jump there!");
|
||||
return 0;
|
||||
if (!is_valid_jump_pos(cc.x, cc.y, magic, TRUE)) {
|
||||
return 0;
|
||||
} else {
|
||||
coord uc;
|
||||
int range, temp;
|
||||
@@ -1508,6 +1548,7 @@ int magic; /* 0=Physical, otherwise skill level */
|
||||
teleds(cc.x, cc.y, TRUE);
|
||||
sokoban_guilt();
|
||||
nomul(-1);
|
||||
multi_reason = "jumping around";
|
||||
nomovemsg = "";
|
||||
morehungry(rnd(25));
|
||||
return 1;
|
||||
@@ -2531,6 +2572,54 @@ static const char
|
||||
cant_see_spot[] = "won't hit anything if you can't see that spot.",
|
||||
cant_reach[] = "can't reach that spot from here.";
|
||||
|
||||
/* find pos of monster in range, if only one monster */
|
||||
boolean
|
||||
find_poleable_mon(pos, min_range, max_range)
|
||||
coord *pos;
|
||||
int min_range, max_range;
|
||||
{
|
||||
struct monst *mtmp;
|
||||
struct monst *selmon = NULL;
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon)
|
||||
if (mtmp && !DEADMONSTER(mtmp) && !mtmp->mtame &&
|
||||
cansee(mtmp->mx, mtmp->my) &&
|
||||
distu(mtmp->mx, mtmp->my) <= max_range &&
|
||||
distu(mtmp->mx, mtmp->my) >= min_range) {
|
||||
if (selmon) return FALSE;
|
||||
selmon = mtmp;
|
||||
}
|
||||
if (!selmon) return FALSE;
|
||||
pos->x = selmon->mx;
|
||||
pos->y = selmon->my;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int polearm_range_min = -1;
|
||||
int polearm_range_max = -1;
|
||||
|
||||
void
|
||||
display_polearm_positions(state)
|
||||
int state;
|
||||
{
|
||||
if (state == 0) {
|
||||
tmp_at(DISP_BEAM, cmap_to_glyph(S_flashbeam));
|
||||
} else if (state == 1) {
|
||||
int x,y, dx,dy;
|
||||
for (dx = -4; dx <= 4; dx++)
|
||||
for (dy = -4; dy <= 4; dy++) {
|
||||
x = dx + (int)u.ux;
|
||||
y = dy + (int)u.uy;
|
||||
if (isok(x, y) &&
|
||||
distu(x, y) >= polearm_range_min &&
|
||||
distu(x, y) <= polearm_range_max) {
|
||||
tmp_at(x, y);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tmp_at(DISP_END, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Distance attacks by pole-weapons */
|
||||
STATIC_OVL int
|
||||
use_pole(obj)
|
||||
@@ -2539,6 +2628,7 @@ use_pole(obj)
|
||||
int res = 0, typ, max_range, min_range, glyph;
|
||||
coord cc;
|
||||
struct monst *mtmp;
|
||||
struct monst *hitm = context.polearm.hitmon;
|
||||
|
||||
/* Are you allowed to use the pole? */
|
||||
if (u.uswallow) {
|
||||
@@ -2551,15 +2641,7 @@ use_pole(obj)
|
||||
}
|
||||
/* assert(obj == uwep); */
|
||||
|
||||
/* Prompt for a location */
|
||||
pline(where_to_hit);
|
||||
cc.x = u.ux;
|
||||
cc.y = u.uy;
|
||||
if (getpos(&cc, TRUE, "the spot to hit") < 0)
|
||||
return res; /* ESC; uses turn iff polearm became wielded */
|
||||
|
||||
glyph = glyph_at(cc.x, cc.y);
|
||||
/*
|
||||
/*
|
||||
* Calculate allowable range (pole's reach is always 2 steps):
|
||||
* unskilled and basic: orthogonal direction, 4..4;
|
||||
* skilled: as basic, plus knight's jump position, 4..5;
|
||||
@@ -2579,6 +2661,26 @@ use_pole(obj)
|
||||
if (typ == P_NONE || P_SKILL(typ) <= P_BASIC) max_range = 4;
|
||||
else if (P_SKILL(typ) == P_SKILLED) max_range = 5;
|
||||
else max_range = 8; /* (P_SKILL(typ) >= P_EXPERT) */
|
||||
|
||||
polearm_range_min = min_range;
|
||||
polearm_range_max = max_range;
|
||||
|
||||
/* Prompt for a location */
|
||||
pline(where_to_hit);
|
||||
cc.x = u.ux;
|
||||
cc.y = u.uy;
|
||||
if (!find_poleable_mon(&cc, min_range, max_range) &&
|
||||
hitm && !DEADMONSTER(hitm) && cansee(hitm->mx, hitm->my) &&
|
||||
distu(hitm->mx,hitm->my) <= max_range &&
|
||||
distu(hitm->mx,hitm->my) >= min_range) {
|
||||
cc.x = hitm->mx;
|
||||
cc.y = hitm->my;
|
||||
}
|
||||
getpos_sethilite(display_polearm_positions);
|
||||
if (getpos(&cc, TRUE, "the spot to hit") < 0)
|
||||
return res; /* ESC; uses turn iff polearm became wielded */
|
||||
|
||||
glyph = glyph_at(cc.x, cc.y);
|
||||
if (distu(cc.x, cc.y) > max_range) {
|
||||
pline("Too far!");
|
||||
return (res);
|
||||
@@ -2596,11 +2698,13 @@ use_pole(obj)
|
||||
return res;
|
||||
}
|
||||
|
||||
context.polearm.hitmon = NULL;
|
||||
/* Attack the monster there */
|
||||
bhitpos = cc;
|
||||
if ((mtmp = m_at(bhitpos.x, bhitpos.y)) != (struct monst *)0) {
|
||||
if (attack_checks(mtmp, uwep)) return res;
|
||||
if (overexertion()) return 1; /* burn nutrition; maybe pass out */
|
||||
context.polearm.hitmon = mtmp;
|
||||
check_caitiff(mtmp);
|
||||
notonhead = (bhitpos.x != mtmp->mx || bhitpos.y != mtmp->my);
|
||||
(void) thitmonst(mtmp, uwep);
|
||||
@@ -2828,6 +2932,7 @@ do_break_wand(obj)
|
||||
boolean fillmsg = FALSE;
|
||||
int expltype = EXPL_MAGICAL;
|
||||
char confirm[QBUFSZ], buf[BUFSZ];
|
||||
boolean is_fragile = (!strcmp(OBJ_DESCR(objects[obj->otyp]), "balsa"));
|
||||
|
||||
if (yn(safe_qbuf(confirm, "Are you really sure you want to break ", "?",
|
||||
obj, yname, ysimple_name, "the wand")) == 'n')
|
||||
@@ -2836,7 +2941,7 @@ do_break_wand(obj)
|
||||
if (nohands(youmonst.data)) {
|
||||
You_cant("break %s without hands!", yname(obj));
|
||||
return 0;
|
||||
} else if (ACURR(A_STR) < 10) {
|
||||
} else if (ACURR(A_STR) < (is_fragile ? 5 : 10)) {
|
||||
You("don't have the strength to break %s!", yname(obj));
|
||||
return 0;
|
||||
}
|
||||
@@ -2974,7 +3079,7 @@ do_break_wand(obj)
|
||||
/* if (context.botl) bot(); */
|
||||
}
|
||||
if (affects_objects && level.objects[x][y]) {
|
||||
(void) bhitpile(obj, bhito, x, y);
|
||||
(void) bhitpile(obj, bhito, x, y, 0);
|
||||
if (context.botl) bot(); /* potion effects */
|
||||
}
|
||||
} else {
|
||||
@@ -2991,7 +3096,7 @@ do_break_wand(obj)
|
||||
* since it's also used by retouch_equipment() for polyself.)
|
||||
*/
|
||||
if (affects_objects && level.objects[x][y]) {
|
||||
(void) bhitpile(obj, bhito, x, y);
|
||||
(void) bhitpile(obj, bhito, x, y, 0);
|
||||
if (context.botl) bot(); /* potion effects */
|
||||
}
|
||||
damage = zapyourself(obj, FALSE);
|
||||
|
||||
@@ -983,6 +983,7 @@ char *hittee; /* target's name: "you" or mon_nam(mdef) */
|
||||
resisted = TRUE;
|
||||
} else {
|
||||
nomul(-3);
|
||||
multi_reason = "being scared stiff";
|
||||
nomovemsg = "";
|
||||
if (magr && magr == u.ustuck && sticks(youmonst.data)) {
|
||||
u.ustuck = (struct monst *)0;
|
||||
|
||||
@@ -691,6 +691,8 @@ int propidx; /* special cases can have negative values */
|
||||
Sprintf(buf, because_of,
|
||||
obj->oartifact ? bare_artifactname(obj) :
|
||||
ysimple_name(obj));
|
||||
else if (propidx == BLINDED && u.uroleplay.blind)
|
||||
Sprintf(buf, " from birth");
|
||||
else if (propidx == BLINDED && Blindfolded_only)
|
||||
Sprintf(buf, because_of, ysimple_name(ublindf));
|
||||
|
||||
|
||||
@@ -509,6 +509,16 @@ enter_explore_mode(VOID_ARGS)
|
||||
} else if (discover) {
|
||||
You("are already in explore mode.");
|
||||
} else {
|
||||
#ifdef SYSCF
|
||||
# if defined(UNIX)
|
||||
if (!sysopt.explorers ||
|
||||
!sysopt.explorers[0] ||
|
||||
!check_user_string(sysopt.explorers)) {
|
||||
You("cannot access explore mode.");
|
||||
return 0;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
pline(
|
||||
"Beware! From explore mode there will be no return to normal game.");
|
||||
if (paranoid_query(ParanoidQuit,
|
||||
@@ -997,11 +1007,8 @@ wiz_levltyp_legend(VOID_ARGS)
|
||||
STATIC_PTR int
|
||||
wiz_smell(VOID_ARGS)
|
||||
{
|
||||
char out_str[BUFSZ];
|
||||
struct permonst *pm = 0;
|
||||
int ans = 0;
|
||||
int mndx; /* monster index */
|
||||
int found; /* count of matching mndxs found */
|
||||
coord cc; /* screen pos of unknown glyph */
|
||||
int glyph; /* glyph at selected position */
|
||||
|
||||
@@ -1015,11 +1022,6 @@ wiz_smell(VOID_ARGS)
|
||||
|
||||
pline("You can move the cursor to a monster that you want to smell.");
|
||||
do {
|
||||
/* Reset some variables. */
|
||||
pm = (struct permonst *)0;
|
||||
found = 0;
|
||||
out_str[0] = '\0';
|
||||
|
||||
pline("Pick a monster to smell.");
|
||||
ans = getpos(&cc, TRUE, "a monster");
|
||||
if (ans < 0 || cc.x < 0) {
|
||||
@@ -2246,6 +2248,9 @@ int final;
|
||||
en_win = create_nhwindow(NHW_MENU);
|
||||
putstr(en_win, 0, "Voluntary challenges:");
|
||||
|
||||
if (u.uroleplay.blind) you_have_been("blind from birth");
|
||||
if (u.uroleplay.nudist) you_have_been("faithfully nudist");
|
||||
|
||||
if (!u.uconduct.food)
|
||||
enl_msg(You_, "have gone", "went", " without food", "");
|
||||
/* But beverages are okay */
|
||||
|
||||
@@ -21,6 +21,7 @@ char *catmore = 0; /* default pager */
|
||||
NEARDATA int bases[MAXOCLASSES] = DUMMY;
|
||||
|
||||
NEARDATA int multi = 0;
|
||||
const char *multi_reason = NULL;
|
||||
NEARDATA int nroom = 0;
|
||||
NEARDATA int nsubroom = 0;
|
||||
NEARDATA int occtime = 0;
|
||||
|
||||
@@ -890,6 +890,7 @@ struct obj *obj;
|
||||
}
|
||||
You("peer into %s...", the(xname(obj)));
|
||||
nomul(-rnd(10));
|
||||
multi_reason = "gazing into a crystal ball";
|
||||
nomovemsg = "";
|
||||
if (obj->spe <= 0)
|
||||
pline_The("vision is unclear.");
|
||||
|
||||
@@ -1023,6 +1023,7 @@ struct obj *obj;
|
||||
/* you ought to be able to let go; tough luck */
|
||||
/* (maybe `move_into_trap()' would be better) */
|
||||
nomul(-d(2,2));
|
||||
multi_reason = "stuck in a spider web";
|
||||
nomovemsg = "You pull free.";
|
||||
} else if (lev->typ == IRONBARS) {
|
||||
pline("Clang!");
|
||||
@@ -1283,7 +1284,7 @@ zap_dig()
|
||||
struct monst *mtmp;
|
||||
struct obj *otmp;
|
||||
struct trap *trap_with_u = (struct trap *)0;
|
||||
int zx, zy, diridx, digdepth, flow_x, flow_y;
|
||||
int zx, zy, diridx = 8, digdepth, flow_x = -1, flow_y = -1;
|
||||
boolean shopdoor, shopwall, maze_dig, pitdig = FALSE, pitflow = FALSE;
|
||||
|
||||
/*
|
||||
@@ -1461,7 +1462,7 @@ zap_dig()
|
||||
} /* while */
|
||||
tmp_at(DISP_END,0); /* closing call */
|
||||
|
||||
if (pitflow) {
|
||||
if (pitflow && isok(flow_x, flow_y)) {
|
||||
struct trap *ttmp = t_at(flow_x, flow_y);
|
||||
if (ttmp && (ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT)) {
|
||||
schar filltyp = fillholetyp(ttmp->tx, ttmp->ty, TRUE);
|
||||
|
||||
@@ -1286,7 +1286,7 @@ boolean at_stairs, falling, portal;
|
||||
}
|
||||
|
||||
/* initial movement of bubbles just before vision_recalc */
|
||||
if (Is_waterlevel(&u.uz))
|
||||
if (Is_waterlevel(&u.uz) || Is_airlevel(&u.uz))
|
||||
movebubbles();
|
||||
|
||||
if (level_info[new_ledger].flags & FORGOTTEN) {
|
||||
@@ -1402,6 +1402,7 @@ boolean at_stairs, falling, portal;
|
||||
/* assume this will always return TRUE when changing level */
|
||||
(void) in_out_region(u.ux, u.uy);
|
||||
(void) pickup(1);
|
||||
context.polearm.hitmon = NULL;
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
|
||||
+30
-1
@@ -25,6 +25,17 @@ nextmbuf()
|
||||
return bufs[bufidx];
|
||||
}
|
||||
|
||||
/* function for getpos() to highlight desired map locations.
|
||||
* parameter value 0 = initialize, 1 = highlight, 2 = done
|
||||
*/
|
||||
void (*getpos_hilitefunc)(int) = NULL;
|
||||
void
|
||||
getpos_sethilite(f)
|
||||
void (*f)(int);
|
||||
{
|
||||
getpos_hilitefunc = f;
|
||||
}
|
||||
|
||||
/* the response for '?' help request in getpos() */
|
||||
STATIC_OVL void
|
||||
getpos_help(force, goal)
|
||||
@@ -41,6 +52,8 @@ const char *goal;
|
||||
putstr(tmpwin, 0, "Use [HJKL] to move the cursor 8 units at a time.");
|
||||
putstr(tmpwin, 0, "Or enter a background symbol (ex. <).");
|
||||
putstr(tmpwin, 0, "Use @ to move the cursor on yourself.");
|
||||
if (getpos_hilitefunc != NULL)
|
||||
putstr(tmpwin, 0, "Use $ to display valid locations.");
|
||||
putstr(tmpwin, 0, "Use # to toggle automatic description.");
|
||||
/* disgusting hack; the alternate selection characters work for any
|
||||
getpos call, but they only matter for dowhatis (and doquickwhatis) */
|
||||
@@ -69,6 +82,7 @@ const char *goal;
|
||||
boolean show_goal_msg = FALSE;
|
||||
static const char pick_chars[] = ".,;:";
|
||||
const char *cp;
|
||||
boolean hilite_state = FALSE;
|
||||
|
||||
if (!goal) goal = "desired location";
|
||||
if (flags.verbose) {
|
||||
@@ -92,7 +106,7 @@ const char *goal;
|
||||
curs(WIN_MAP, cx, cy);
|
||||
flush_screen(0);
|
||||
show_goal_msg = FALSE;
|
||||
} else if (auto_msg && !msg_given) {
|
||||
} else if (auto_msg && !msg_given && !hilite_state) {
|
||||
coord cc;
|
||||
int sym = 0;
|
||||
char tmpbuf[BUFSZ];
|
||||
@@ -110,6 +124,13 @@ const char *goal;
|
||||
|
||||
c = nh_poskey(&tx, &ty, &sidx);
|
||||
|
||||
if (hilite_state) {
|
||||
(*getpos_hilitefunc)(2);
|
||||
hilite_state = FALSE;
|
||||
curs(WIN_MAP, cx, cy);
|
||||
flush_screen(0);
|
||||
}
|
||||
|
||||
if (auto_msg)
|
||||
msg_given = FALSE;
|
||||
|
||||
@@ -174,6 +195,13 @@ const char *goal;
|
||||
/* update message window to reflect that we're still targetting */
|
||||
show_goal_msg = TRUE;
|
||||
msg_given = TRUE;
|
||||
} else if ((c == '$') && (getpos_hilitefunc != NULL)) {
|
||||
if (!hilite_state) {
|
||||
(*getpos_hilitefunc)(0);
|
||||
(*getpos_hilitefunc)(1);
|
||||
hilite_state = TRUE;
|
||||
}
|
||||
goto nxtc;
|
||||
} else if (c == '#') {
|
||||
auto_msg = !auto_msg;
|
||||
pline("Automatic description %sis %s.",
|
||||
@@ -269,6 +297,7 @@ const char *goal;
|
||||
if (msg_given) clear_nhwindow(WIN_MESSAGE);
|
||||
ccp->x = cx;
|
||||
ccp->y = cy;
|
||||
getpos_hilitefunc = NULL;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1407,6 +1407,7 @@ register struct obj *otmp;
|
||||
if(cursed(otmp)) return(0);
|
||||
if(delay) {
|
||||
nomul(delay);
|
||||
multi_reason = "disrobing";
|
||||
if (is_helmet(otmp)) {
|
||||
/* ick... */
|
||||
nomovemsg = !strcmp(helm_simple_name(otmp), "hat") ?
|
||||
@@ -1664,6 +1665,7 @@ dowear()
|
||||
delay = -objects[otmp->otyp].oc_delay;
|
||||
if(delay){
|
||||
nomul(delay);
|
||||
multi_reason = "dressing up";
|
||||
if(is_boots(otmp)) afternmv = Boots_on;
|
||||
if(is_helmet(otmp)) afternmv = Helmet_on;
|
||||
if(is_gloves(otmp)) afternmv = Gloves_on;
|
||||
|
||||
@@ -423,7 +423,7 @@ boolean with_you;
|
||||
* probably because the level is full.
|
||||
* Dump the monster's cargo and leave the monster dead.
|
||||
*/
|
||||
struct obj *obj, *corpse;
|
||||
struct obj *obj;
|
||||
while ((obj = mtmp->minvent) != 0) {
|
||||
obj_extract_self(obj);
|
||||
obj_no_longer_held(obj);
|
||||
@@ -437,7 +437,7 @@ boolean with_you;
|
||||
impossible("Can't find relocated object.");
|
||||
}
|
||||
}
|
||||
corpse = mkcorpstat(CORPSE, (struct monst *)0, mtmp->data,
|
||||
(void) mkcorpstat(CORPSE, (struct monst *)0, mtmp->data,
|
||||
xlocale, ylocale, CORPSTAT_NONE);
|
||||
mongone(mtmp);
|
||||
}
|
||||
@@ -685,6 +685,7 @@ migrate_to_level(mtmp, tolev, xyloc, cc)
|
||||
mtmp->mux = new_lev.dnum;
|
||||
mtmp->muy = new_lev.dlevel;
|
||||
mtmp->mx = mtmp->my = 0; /* this implies migration */
|
||||
if (mtmp == context.polearm.hitmon) context.polearm.hitmon = NULL;
|
||||
}
|
||||
|
||||
/* return quality of food; the lower the better */
|
||||
|
||||
+22
-1
@@ -991,7 +991,28 @@ dokick()
|
||||
exercise(A_DEX, TRUE);
|
||||
return(1);
|
||||
}
|
||||
if(IS_GRAVE(maploc->typ) || maploc->typ == IRONBARS)
|
||||
if (IS_GRAVE(maploc->typ)) {
|
||||
if(Levitation) goto dumb;
|
||||
if (rn2(4)) goto ouch;
|
||||
exercise(A_WIS, FALSE);
|
||||
if (Role_if(PM_ARCHEOLOGIST) ||
|
||||
Role_if(PM_SAMURAI) ||
|
||||
((u.ualign.type == A_LAWFUL) && (u.ualign.record > -10))) {
|
||||
adjalign(-sgn(u.ualign.type));
|
||||
}
|
||||
maploc->typ = ROOM;
|
||||
maploc->doormask = 0;
|
||||
(void) mksobj_at(ROCK, x,y, TRUE, FALSE);
|
||||
del_engr_at(x,y);
|
||||
if (Blind)
|
||||
pline("Crack! %s broke!", Something);
|
||||
else {
|
||||
pline_The("headstone topples over and breaks!");
|
||||
newsym(x,y);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if(maploc->typ == IRONBARS)
|
||||
goto ouch;
|
||||
if(IS_TREE(maploc->typ)) {
|
||||
struct obj *treefruit;
|
||||
|
||||
@@ -693,6 +693,7 @@ hurtle(dx, dy, range, verbose)
|
||||
if(!range || (!dx && !dy) || u.ustuck) return; /* paranoia */
|
||||
|
||||
nomul(-range);
|
||||
multi_reason = "moving through the air";
|
||||
nomovemsg = ""; /* it just happens */
|
||||
if (verbose)
|
||||
You("%s in the opposite direction.", range > 1 ? "hurtle" : "float");
|
||||
|
||||
@@ -962,6 +962,7 @@ register int pm;
|
||||
/* A pile of gold can't ride. */
|
||||
if (u.usteed) dismount_steed(DISMOUNT_FELL);
|
||||
nomul(-tmp);
|
||||
multi_reason = "pretending to be a pile of gold";
|
||||
Sprintf(buf, Hallucination ?
|
||||
"You suddenly dread being peeled and mimic %s again!" :
|
||||
"You now prefer mimicking %s again.",
|
||||
@@ -1479,6 +1480,7 @@ struct obj *obj;
|
||||
pline_The("world spins and %s %s.", what, where);
|
||||
incr_itimeout(&HDeaf, duration);
|
||||
nomul(-duration);
|
||||
multi_reason = "unconscious from rotten food";
|
||||
nomovemsg = "You are conscious again.";
|
||||
afternmv = Hear_again;
|
||||
return(1);
|
||||
@@ -1572,6 +1574,8 @@ eatcorpse(otmp) /* called when a corpse is selected as food */
|
||||
} else if ((mnum == PM_COCKATRICE || mnum == PM_CHICKATRICE) &&
|
||||
(Stone_resistance || Hallucination)) {
|
||||
pline("This tastes just like chicken!");
|
||||
} else if (mnum == PM_FLOATING_EYE && u.umonnum == PM_RAVEN) {
|
||||
You("peck the eyeball with delight.");
|
||||
} else {
|
||||
/* [is this right? omnivores end up always disliking the taste] */
|
||||
boolean yummy = (vegan(&mons[mnum]) ?
|
||||
@@ -2677,6 +2681,7 @@ boolean incr;
|
||||
if (!Levitation) selftouch("Falling, you");
|
||||
incr_itimeout(&HDeaf, duration);
|
||||
nomul(-duration);
|
||||
multi_reason = "fainted from lack of food";
|
||||
nomovemsg = "You regain consciousness.";
|
||||
afternmv = unfaint;
|
||||
newhs = FAINTED;
|
||||
@@ -2853,6 +2858,7 @@ vomit() /* A good idea from David Neves */
|
||||
else
|
||||
make_sick(0L, (char *)0, TRUE, SICK_VOMITABLE);
|
||||
nomul(-2);
|
||||
multi_reason = "vomiting";
|
||||
nomovemsg = You_can_move_again;
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,12 @@ int how;
|
||||
Sprintf(eos(buf), " called %s", MNAME(mtmp));
|
||||
}
|
||||
|
||||
if (multi) Strcat(buf, ", while helpless");
|
||||
if (multi) {
|
||||
if (multi_reason)
|
||||
Sprintf(eos(buf), ", while %s", multi_reason);
|
||||
else
|
||||
Strcat(buf, ", while helpless");
|
||||
}
|
||||
Strcpy(killer.name, buf);
|
||||
if (mptr->mlet == S_WRAITH)
|
||||
u.ugrave_arise = PM_WRAITH;
|
||||
|
||||
@@ -2184,6 +2184,9 @@ int src;
|
||||
} else if (src == SET_IN_SYS && match_varname(buf, "SHELLERS", 8)) {
|
||||
if (sysopt.shellers) free(sysopt.shellers);
|
||||
sysopt.shellers = dupstr(bufp);
|
||||
} else if (src == SET_IN_SYS && match_varname(buf, "EXPLORERS", 7)) {
|
||||
if (sysopt.explorers) free(sysopt.explorers);
|
||||
sysopt.explorers = dupstr(bufp);
|
||||
} else if (src == SET_IN_SYS && match_varname(buf, "DEBUGFILES", 5)) {
|
||||
if (sysopt.debugfiles) free(sysopt.debugfiles);
|
||||
/* if showdebug() has already been called (perhaps we've added
|
||||
|
||||
+24
-4
@@ -630,8 +630,11 @@ int mode;
|
||||
if (Passes_walls && may_passwall(x,y)) {
|
||||
; /* do nothing */
|
||||
} else if (tmpr->typ == IRONBARS) {
|
||||
if (!(Passes_walls || passes_bars(youmonst.data)))
|
||||
if (!(Passes_walls || passes_bars(youmonst.data))) {
|
||||
if (iflags.mention_walls)
|
||||
You("cannot pass through the bars.");
|
||||
return FALSE;
|
||||
}
|
||||
} else if (tunnels(youmonst.data) && !needspick(youmonst.data)) {
|
||||
/* Eat the rock. */
|
||||
if (mode == DO_MOVE && still_chewing(x,y)) return FALSE;
|
||||
@@ -646,8 +649,10 @@ int mode;
|
||||
if (Is_stronghold(&u.uz) && is_db_wall(x,y))
|
||||
pline_The("drawbridge is up!");
|
||||
/* sokoban restriction stays even after puzzle is solved */
|
||||
if (Passes_walls && !may_passwall(x,y) && In_sokoban(&u.uz))
|
||||
else if (Passes_walls && !may_passwall(x,y) && In_sokoban(&u.uz))
|
||||
pline_The("Sokoban walls resist your ability.");
|
||||
else if (iflags.mention_walls)
|
||||
pline("It's a wall.");
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1099,7 +1104,7 @@ domove()
|
||||
register struct monst *mtmp;
|
||||
register struct rm *tmpr;
|
||||
register xchar x,y;
|
||||
struct trap *trap;
|
||||
struct trap *trap = (struct trap *)0;
|
||||
int wtcap;
|
||||
boolean on_ice;
|
||||
xchar chainx, chainy, ballx, bally; /* ball&chain new positions */
|
||||
@@ -1563,6 +1568,7 @@ domove()
|
||||
/* must come after we finished picking up, in spoteffects() */
|
||||
if (cause_delay) {
|
||||
nomul(-2);
|
||||
multi_reason = "dragging an iron ball";
|
||||
nomovemsg = "";
|
||||
}
|
||||
|
||||
@@ -2202,7 +2208,19 @@ dopickup()
|
||||
}
|
||||
}
|
||||
if (!OBJ_AT(u.ux, u.uy)) {
|
||||
There("is nothing here to pick up.");
|
||||
register struct rm *lev = &levl[u.ux][u.uy];
|
||||
if (IS_THRONE(lev->typ))
|
||||
pline("It must weigh%s a ton!",
|
||||
lev->looted ? " almost" : "");
|
||||
else if (IS_SINK(lev->typ))
|
||||
pline_The("plumbing connects it to the floor.");
|
||||
else if (IS_GRAVE(lev->typ))
|
||||
You("don't need a gravestone. Yet.");
|
||||
else if (IS_FOUNTAIN(lev->typ))
|
||||
You("could drink the water...");
|
||||
else if (IS_DOOR(lev->typ) && (lev->doormask & D_ISOPEN))
|
||||
pline("It won't come off the hinges.");
|
||||
else There("is nothing here to pick up.");
|
||||
return 0;
|
||||
}
|
||||
if (!can_reach_floor(TRUE)) {
|
||||
@@ -2417,6 +2435,7 @@ nomul(nval)
|
||||
u.uinvulnerable = FALSE; /* Kludge to avoid ctrl-C bug -dlc */
|
||||
u.usleep = 0;
|
||||
multi = nval;
|
||||
if (nval == 0) multi_reason = NULL;
|
||||
context.travel = context.travel1 = context.mv = context.run = 0;
|
||||
}
|
||||
|
||||
@@ -2431,6 +2450,7 @@ const char *msg_override;
|
||||
if (*nomovemsg) pline1(nomovemsg);
|
||||
nomovemsg = 0;
|
||||
u.usleep = 0;
|
||||
multi_reason = NULL;
|
||||
if (afternmv) (*afternmv)();
|
||||
afternmv = 0;
|
||||
}
|
||||
|
||||
+21
-9
@@ -915,8 +915,8 @@ register const char *let,*word;
|
||||
|
||||
/* "ugly check" for reading fortune cookies, part 2 */
|
||||
if ((!strcmp(word, "read")
|
||||
&& (otmp->otyp == FORTUNE_COOKIE || otmp->otyp == T_SHIRT)))
|
||||
allowall = TRUE;
|
||||
&& is_readable(otmp)))
|
||||
allowall = usegold = TRUE;
|
||||
}
|
||||
}
|
||||
bp[foo] = 0;
|
||||
@@ -1789,7 +1789,7 @@ nextclass:
|
||||
if (!flags.sortpack || otmp->oclass == *invlet) {
|
||||
if (flags.sortpack && !classcount) {
|
||||
add_menu(win, NO_GLYPH, &any, 0, 0, iflags.menu_headings,
|
||||
let_to_name(*invlet, FALSE), MENU_UNSELECTED);
|
||||
let_to_name(*invlet, FALSE, (want_reply && iflags.menu_head_objsym)), MENU_UNSELECTED);
|
||||
classcount++;
|
||||
}
|
||||
any.a_char = ilet;
|
||||
@@ -1863,7 +1863,7 @@ char avoidlet;
|
||||
if (flags.sortpack && !classcount) {
|
||||
any = zeroany; /* zero */
|
||||
add_menu(win, NO_GLYPH, &any, 0, 0, iflags.menu_headings,
|
||||
let_to_name(*invlet, FALSE), MENU_UNSELECTED);
|
||||
let_to_name(*invlet, FALSE, FALSE), MENU_UNSELECTED);
|
||||
classcount++;
|
||||
}
|
||||
any.a_char = ilet;
|
||||
@@ -1991,7 +1991,7 @@ dounpaid()
|
||||
if (otmp->unpaid) {
|
||||
if (!flags.sortpack || otmp->oclass == *invlet) {
|
||||
if (flags.sortpack && !classcount) {
|
||||
putstr(win, 0, let_to_name(*invlet, TRUE));
|
||||
putstr(win, 0, let_to_name(*invlet, TRUE, FALSE));
|
||||
classcount++;
|
||||
}
|
||||
|
||||
@@ -2009,7 +2009,7 @@ dounpaid()
|
||||
if (count > num_so_far) {
|
||||
/* something unpaid is contained */
|
||||
if (flags.sortpack)
|
||||
putstr(win, 0, let_to_name(CONTAINED_SYM, TRUE));
|
||||
putstr(win, 0, let_to_name(CONTAINED_SYM, TRUE, FALSE));
|
||||
/*
|
||||
* Search through the container objects in the inventory for
|
||||
* unpaid items. The top level inventory items have already
|
||||
@@ -2701,10 +2701,12 @@ static NEARDATA char *invbuf = (char *)0;
|
||||
static NEARDATA unsigned invbufsiz = 0;
|
||||
|
||||
char *
|
||||
let_to_name(let,unpaid)
|
||||
let_to_name(let,unpaid,showsym)
|
||||
char let;
|
||||
boolean unpaid;
|
||||
boolean unpaid,showsym;
|
||||
{
|
||||
const char *ocsymfmt = " ('%c')";
|
||||
const int invbuf_sympadding = 8; /* arbitrary */
|
||||
const char *class_name;
|
||||
const char *pos;
|
||||
int oclass = (let >= 1 && let < MAXOCLASSES) ? let : 0;
|
||||
@@ -2717,7 +2719,8 @@ boolean unpaid;
|
||||
else
|
||||
class_name = names[0];
|
||||
|
||||
len = strlen(class_name) + (unpaid ? sizeof "unpaid_" : sizeof "");
|
||||
len = strlen(class_name) + (unpaid ? sizeof "unpaid_" : sizeof "") +
|
||||
(oclass ? (strlen(ocsymfmt)+invbuf_sympadding) : 0);
|
||||
if (len > invbufsiz) {
|
||||
if (invbuf) free((genericptr_t)invbuf);
|
||||
invbufsiz = len + 10; /* add slop to reduce incremental realloc */
|
||||
@@ -2727,6 +2730,15 @@ boolean unpaid;
|
||||
Strcat(strcpy(invbuf, "Unpaid "), class_name);
|
||||
else
|
||||
Strcpy(invbuf, class_name);
|
||||
if ((oclass != 0) && showsym) {
|
||||
char *bp = eos(invbuf);
|
||||
int mlen = invbuf_sympadding - strlen(class_name);
|
||||
while (--mlen > 0) {
|
||||
*bp = ' '; bp++;
|
||||
}
|
||||
*bp = '\0';
|
||||
Sprintf(eos(invbuf), ocsymfmt, def_oc_syms[oclass].sym);
|
||||
}
|
||||
return invbuf;
|
||||
}
|
||||
|
||||
|
||||
@@ -437,6 +437,11 @@ struct obj *otmp;
|
||||
"Only Amiga makes it possible.",
|
||||
"CATS have all the answers.",
|
||||
#endif
|
||||
"This mail complies with the Yendorian Anti-Spam Act (YASA)",
|
||||
"Please find enclosed a small token to represent your Owlbear",
|
||||
"**FR33 P0T10N 0F FULL H34L1NG**",
|
||||
"Please return to sender (Asmodeus)",
|
||||
"Buy a potion of gain level for only $19.99! Guaranteed to be blessed!",
|
||||
"Invitation: Visit the NetHack web site at http://www.nethack.org!"
|
||||
};
|
||||
|
||||
|
||||
+1
-5
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 makemon.c $NHDT-Date: 1426465436 2015/03/16 00:23:56 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.74 $ */
|
||||
/* NetHack 3.5 makemon.c $NHDT-Date: 1427440865 2015/03/27 07:21:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.75 $ */
|
||||
/* NetHack 3.5 makemon.c $Date: 2012/01/29 00:34:33 $ $Revision: 1.69 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1884,10 +1884,6 @@ int *seencount; /* secondary output */
|
||||
} while (--creatcnt > 0);
|
||||
if (seecount) {
|
||||
if (seencount) *seencount += seecount;
|
||||
/* don't set contents-known flag if we just used last charge
|
||||
(such suppression doesn't actually gain us much since
|
||||
player can now deduce that the bag has become empty) */
|
||||
if (bag->spe > 0) bag->cknown = 1;
|
||||
if (bag->dknown) makeknown(BAG_OF_TRICKS);
|
||||
} else if (!tipping) {
|
||||
pline1(!moncount ? nothing_happens : "Nothing seems to happen.");
|
||||
|
||||
@@ -634,12 +634,14 @@ int spellnum;
|
||||
if (multi >= 0)
|
||||
You("stiffen briefly.");
|
||||
nomul(-1);
|
||||
multi_reason = "paralyzed by a monster";
|
||||
} else {
|
||||
if (multi >= 0)
|
||||
You("are frozen in place!");
|
||||
dmg = 4 + (int)mtmp->m_lev;
|
||||
if (Half_spell_damage) dmg = (dmg + 1) / 2;
|
||||
nomul(-dmg);
|
||||
multi_reason = "paralyzed by a monster";
|
||||
}
|
||||
nomovemsg = 0;
|
||||
dmg = 0;
|
||||
|
||||
@@ -1053,6 +1053,7 @@ dopois:
|
||||
else You("are frozen by %s!", mon_nam(mtmp));
|
||||
nomovemsg = You_can_move_again;
|
||||
nomul(-rnd(10));
|
||||
multi_reason = "paralyzed by a monster";
|
||||
exercise(A_DEX, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
+169
-140
@@ -344,7 +344,8 @@ fixup_special()
|
||||
was_waterlevel = FALSE;
|
||||
u.uinwater = 0;
|
||||
unsetup_waterlevel();
|
||||
} else if (Is_waterlevel(&u.uz)) {
|
||||
}
|
||||
if (Is_waterlevel(&u.uz) || Is_airlevel(&u.uz)) {
|
||||
level.flags.hero_memory = 0;
|
||||
was_waterlevel = TRUE;
|
||||
/* water level is an odd beast - it has to be set up
|
||||
@@ -916,98 +917,110 @@ movebubbles()
|
||||
struct trap *btrap;
|
||||
static const struct rm water_pos =
|
||||
{ cmap_to_glyph(S_water), WATER, 0, 0, 0, 0, 0, 0, 0 };
|
||||
static const struct rm air_pos =
|
||||
{ cmap_to_glyph(S_cloud), AIR, 0, 0, 0, 1, 0, 0, 0 };
|
||||
|
||||
/* set up the portal the first time bubbles are moved */
|
||||
if (!wportal) set_wportal();
|
||||
|
||||
vision_recalc(2);
|
||||
/* keep attached ball&chain separate from bubble objects */
|
||||
if (Punished) unplacebc();
|
||||
|
||||
/*
|
||||
* Pick up everything inside of a bubble then fill all bubble
|
||||
* locations.
|
||||
*/
|
||||
if (Is_waterlevel(&u.uz)) {
|
||||
|
||||
for (b = up ? bbubbles : ebubbles; b; b = up ? b->next : b->prev) {
|
||||
if (b->cons) panic("movebubbles: cons != null");
|
||||
for (i = 0, x = b->x; i < (int) b->bm[0]; i++, x++)
|
||||
for (j = 0, y = b->y; j < (int) b->bm[1]; j++, y++)
|
||||
if (b->bm[j + 2] & (1 << i)) {
|
||||
if (!isok(x,y)) {
|
||||
impossible("movebubbles: bad pos (%d,%d)", x,y);
|
||||
continue;
|
||||
}
|
||||
/* keep attached ball&chain separate from bubble objects */
|
||||
if (Punished) unplacebc();
|
||||
|
||||
/* pick up objects, monsters, hero, and traps */
|
||||
if (OBJ_AT(x,y)) {
|
||||
struct obj *olist = (struct obj *) 0, *otmp;
|
||||
struct container *cons = (struct container *)
|
||||
alloc(sizeof(struct container));
|
||||
/*
|
||||
* Pick up everything inside of a bubble then fill all bubble
|
||||
* locations.
|
||||
*/
|
||||
|
||||
while ((otmp = level.objects[x][y]) != 0) {
|
||||
remove_object(otmp);
|
||||
otmp->ox = otmp->oy = 0;
|
||||
otmp->nexthere = olist;
|
||||
olist = otmp;
|
||||
for (b = up ? bbubbles : ebubbles; b; b = up ? b->next : b->prev) {
|
||||
if (b->cons) panic("movebubbles: cons != null");
|
||||
for (i = 0, x = b->x; i < (int) b->bm[0]; i++, x++)
|
||||
for (j = 0, y = b->y; j < (int) b->bm[1]; j++, y++)
|
||||
if (b->bm[j + 2] & (1 << i)) {
|
||||
if (!isok(x,y)) {
|
||||
impossible("movebubbles: bad pos (%d,%d)", x,y);
|
||||
continue;
|
||||
}
|
||||
|
||||
cons->x = x;
|
||||
cons->y = y;
|
||||
cons->what = CONS_OBJ;
|
||||
cons->list = (genericptr_t) olist;
|
||||
cons->next = b->cons;
|
||||
b->cons = cons;
|
||||
/* pick up objects, monsters, hero, and traps */
|
||||
if (OBJ_AT(x,y)) {
|
||||
struct obj *olist = (struct obj *) 0, *otmp;
|
||||
struct container *cons = (struct container *)
|
||||
alloc(sizeof(struct container));
|
||||
|
||||
while ((otmp = level.objects[x][y]) != 0) {
|
||||
remove_object(otmp);
|
||||
otmp->ox = otmp->oy = 0;
|
||||
otmp->nexthere = olist;
|
||||
olist = otmp;
|
||||
}
|
||||
|
||||
cons->x = x;
|
||||
cons->y = y;
|
||||
cons->what = CONS_OBJ;
|
||||
cons->list = (genericptr_t) olist;
|
||||
cons->next = b->cons;
|
||||
b->cons = cons;
|
||||
}
|
||||
if (MON_AT(x,y)) {
|
||||
struct monst *mon = m_at(x,y);
|
||||
struct container *cons = (struct container *)
|
||||
alloc(sizeof(struct container));
|
||||
|
||||
cons->x = x;
|
||||
cons->y = y;
|
||||
cons->what = CONS_MON;
|
||||
cons->list = (genericptr_t) mon;
|
||||
|
||||
cons->next = b->cons;
|
||||
b->cons = cons;
|
||||
|
||||
if(mon->wormno)
|
||||
remove_worm(mon);
|
||||
else
|
||||
remove_monster(x, y);
|
||||
|
||||
newsym(x,y); /* clean up old position */
|
||||
mon->mx = mon->my = 0;
|
||||
}
|
||||
if (!u.uswallow && x == u.ux && y == u.uy) {
|
||||
struct container *cons = (struct container *)
|
||||
alloc(sizeof(struct container));
|
||||
|
||||
cons->x = x;
|
||||
cons->y = y;
|
||||
cons->what = CONS_HERO;
|
||||
cons->list = (genericptr_t) 0;
|
||||
|
||||
cons->next = b->cons;
|
||||
b->cons = cons;
|
||||
}
|
||||
if ((btrap = t_at(x,y)) != 0) {
|
||||
struct container *cons = (struct container *)
|
||||
alloc(sizeof(struct container));
|
||||
|
||||
cons->x = x;
|
||||
cons->y = y;
|
||||
cons->what = CONS_TRAP;
|
||||
cons->list = (genericptr_t) btrap;
|
||||
|
||||
cons->next = b->cons;
|
||||
b->cons = cons;
|
||||
}
|
||||
|
||||
levl[x][y] = water_pos;
|
||||
block_point(x,y);
|
||||
}
|
||||
if (MON_AT(x,y)) {
|
||||
struct monst *mon = m_at(x,y);
|
||||
struct container *cons = (struct container *)
|
||||
alloc(sizeof(struct container));
|
||||
|
||||
cons->x = x;
|
||||
cons->y = y;
|
||||
cons->what = CONS_MON;
|
||||
cons->list = (genericptr_t) mon;
|
||||
|
||||
cons->next = b->cons;
|
||||
b->cons = cons;
|
||||
|
||||
if(mon->wormno)
|
||||
remove_worm(mon);
|
||||
else
|
||||
remove_monster(x, y);
|
||||
|
||||
newsym(x,y); /* clean up old position */
|
||||
mon->mx = mon->my = 0;
|
||||
}
|
||||
if (!u.uswallow && x == u.ux && y == u.uy) {
|
||||
struct container *cons = (struct container *)
|
||||
alloc(sizeof(struct container));
|
||||
|
||||
cons->x = x;
|
||||
cons->y = y;
|
||||
cons->what = CONS_HERO;
|
||||
cons->list = (genericptr_t) 0;
|
||||
|
||||
cons->next = b->cons;
|
||||
b->cons = cons;
|
||||
}
|
||||
if ((btrap = t_at(x,y)) != 0) {
|
||||
struct container *cons = (struct container *)
|
||||
alloc(sizeof(struct container));
|
||||
|
||||
cons->x = x;
|
||||
cons->y = y;
|
||||
cons->what = CONS_TRAP;
|
||||
cons->list = (genericptr_t) btrap;
|
||||
|
||||
cons->next = b->cons;
|
||||
b->cons = cons;
|
||||
}
|
||||
|
||||
levl[x][y] = water_pos;
|
||||
block_point(x,y);
|
||||
}
|
||||
}
|
||||
} else if (Is_airlevel(&u.uz)) {
|
||||
for (x = 0; x < COLNO; x++)
|
||||
for (y = 0; y < ROWNO; y++) {
|
||||
levl[x][y] = air_pos;
|
||||
unblock_point(x,y);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1026,7 +1039,7 @@ movebubbles()
|
||||
}
|
||||
|
||||
/* put attached ball&chain back */
|
||||
if (Punished) placebc();
|
||||
if (Is_waterlevel(&u.uz) && Punished) placebc();
|
||||
vision_full_recalc = 1;
|
||||
}
|
||||
|
||||
@@ -1070,7 +1083,7 @@ int fd, mode;
|
||||
{
|
||||
register struct bubble *b;
|
||||
|
||||
if (!Is_waterlevel(&u.uz)) return;
|
||||
if (!Is_waterlevel(&u.uz) && !Is_airlevel(&u.uz)) return;
|
||||
|
||||
if (perform_bwrite(mode)) {
|
||||
int n = 0;
|
||||
@@ -1095,7 +1108,7 @@ register int fd;
|
||||
register int i;
|
||||
int n;
|
||||
|
||||
if (!Is_waterlevel(&u.uz)) return;
|
||||
if (!Is_waterlevel(&u.uz) && !Is_airlevel(&u.uz)) return;
|
||||
|
||||
set_wportal();
|
||||
mread(fd,(genericptr_t)&n,sizeof(int));
|
||||
@@ -1171,6 +1184,7 @@ setup_waterlevel()
|
||||
register int x, y;
|
||||
register int xskip, yskip;
|
||||
register int water_glyph = cmap_to_glyph(S_water);
|
||||
register int air_glyph = cmap_to_glyph(S_air);
|
||||
|
||||
/* ouch, hardcoded... */
|
||||
|
||||
@@ -1183,12 +1197,18 @@ setup_waterlevel()
|
||||
|
||||
for (x = xmin; x <= xmax; x++)
|
||||
for (y = ymin; y <= ymax; y++)
|
||||
levl[x][y].glyph = water_glyph;
|
||||
levl[x][y].glyph = Is_waterlevel(&u.uz) ? water_glyph : air_glyph;
|
||||
|
||||
/* make bubbles */
|
||||
|
||||
xskip = 10 + rn2(10);
|
||||
yskip = 4 + rn2(4);
|
||||
if (Is_waterlevel(&u.uz)) {
|
||||
xskip = 10 + rn2(10);
|
||||
yskip = 4 + rn2(4);
|
||||
} else {
|
||||
xskip = 6 + rn2(4);
|
||||
yskip = 3 + rn2(3);
|
||||
}
|
||||
|
||||
for (x = bxmin; x <= bxmax; x += xskip)
|
||||
for (y = bymin; y <= bymax; y += yskip)
|
||||
mk_bubble(x,y,rn2(7));
|
||||
@@ -1274,67 +1294,76 @@ register boolean ini;
|
||||
register int x, y, i, j, colli = 0;
|
||||
struct container *cons, *ctemp;
|
||||
|
||||
/* move bubble */
|
||||
if (dx < -1 || dx > 1 || dy < -1 || dy > 1) {
|
||||
/* pline("mv_bubble: dx = %d, dy = %d", dx, dy); */
|
||||
dx = sgn(dx);
|
||||
dy = sgn(dy);
|
||||
/* clouds move slowly */
|
||||
if (!Is_airlevel(&u.uz) || !rn2(6)) {
|
||||
/* move bubble */
|
||||
if (dx < -1 || dx > 1 || dy < -1 || dy > 1) {
|
||||
/* pline("mv_bubble: dx = %d, dy = %d", dx, dy); */
|
||||
dx = sgn(dx);
|
||||
dy = sgn(dy);
|
||||
}
|
||||
|
||||
/*
|
||||
* collision with level borders?
|
||||
* 1 = horizontal border, 2 = vertical, 3 = corner
|
||||
*/
|
||||
if (b->x <= bxmin) colli |= 2;
|
||||
if (b->y <= bymin) colli |= 1;
|
||||
if ((int) (b->x + b->bm[0] - 1) >= bxmax) colli |= 2;
|
||||
if ((int) (b->y + b->bm[1] - 1) >= bymax) colli |= 1;
|
||||
|
||||
if (b->x < bxmin) {
|
||||
pline("bubble xmin: x = %d, xmin = %d", b->x, bxmin);
|
||||
b->x = bxmin;
|
||||
}
|
||||
if (b->y < bymin) {
|
||||
pline("bubble ymin: y = %d, ymin = %d", b->y, bymin);
|
||||
b->y = bymin;
|
||||
}
|
||||
if ((int) (b->x + b->bm[0] - 1) > bxmax) {
|
||||
pline("bubble xmax: x = %d, xmax = %d",
|
||||
b->x + b->bm[0] - 1, bxmax);
|
||||
b->x = bxmax - b->bm[0] + 1;
|
||||
}
|
||||
if ((int) (b->y + b->bm[1] - 1) > bymax) {
|
||||
pline("bubble ymax: y = %d, ymax = %d",
|
||||
b->y + b->bm[1] - 1, bymax);
|
||||
b->y = bymax - b->bm[1] + 1;
|
||||
}
|
||||
|
||||
/* bounce if we're trying to move off the border */
|
||||
if (b->x == bxmin && dx < 0) dx = -dx;
|
||||
if (b->x + b->bm[0] - 1 == bxmax && dx > 0) dx = -dx;
|
||||
if (b->y == bymin && dy < 0) dy = -dy;
|
||||
if (b->y + b->bm[1] - 1 == bymax && dy > 0) dy = -dy;
|
||||
|
||||
b->x += dx;
|
||||
b->y += dy;
|
||||
}
|
||||
|
||||
/*
|
||||
* collision with level borders?
|
||||
* 1 = horizontal border, 2 = vertical, 3 = corner
|
||||
*/
|
||||
if (b->x <= bxmin) colli |= 2;
|
||||
if (b->y <= bymin) colli |= 1;
|
||||
if ((int) (b->x + b->bm[0] - 1) >= bxmax) colli |= 2;
|
||||
if ((int) (b->y + b->bm[1] - 1) >= bymax) colli |= 1;
|
||||
|
||||
if (b->x < bxmin) {
|
||||
pline("bubble xmin: x = %d, xmin = %d", b->x, bxmin);
|
||||
b->x = bxmin;
|
||||
}
|
||||
if (b->y < bymin) {
|
||||
pline("bubble ymin: y = %d, ymin = %d", b->y, bymin);
|
||||
b->y = bymin;
|
||||
}
|
||||
if ((int) (b->x + b->bm[0] - 1) > bxmax) {
|
||||
pline("bubble xmax: x = %d, xmax = %d",
|
||||
b->x + b->bm[0] - 1, bxmax);
|
||||
b->x = bxmax - b->bm[0] + 1;
|
||||
}
|
||||
if ((int) (b->y + b->bm[1] - 1) > bymax) {
|
||||
pline("bubble ymax: y = %d, ymax = %d",
|
||||
b->y + b->bm[1] - 1, bymax);
|
||||
b->y = bymax - b->bm[1] + 1;
|
||||
}
|
||||
|
||||
/* bounce if we're trying to move off the border */
|
||||
if (b->x == bxmin && dx < 0) dx = -dx;
|
||||
if (b->x + b->bm[0] - 1 == bxmax && dx > 0) dx = -dx;
|
||||
if (b->y == bymin && dy < 0) dy = -dy;
|
||||
if (b->y + b->bm[1] - 1 == bymax && dy > 0) dy = -dy;
|
||||
|
||||
b->x += dx;
|
||||
b->y += dy;
|
||||
|
||||
/* void positions inside bubble */
|
||||
|
||||
/* draw the bubbles */
|
||||
for (i = 0, x = b->x; i < (int) b->bm[0]; i++, x++)
|
||||
for (j = 0, y = b->y; j < (int) b->bm[1]; j++, y++)
|
||||
if (b->bm[j + 2] & (1 << i)) {
|
||||
if (Is_waterlevel(&u.uz)) {
|
||||
levl[x][y].typ = AIR;
|
||||
levl[x][y].lit = 1;
|
||||
unblock_point(x,y);
|
||||
} else if (Is_airlevel(&u.uz)) {
|
||||
levl[x][y].typ = CLOUD;
|
||||
levl[x][y].lit = 1;
|
||||
block_point(x,y);
|
||||
}
|
||||
}
|
||||
|
||||
/* replace contents of bubble */
|
||||
for (cons = b->cons; cons; cons = ctemp) {
|
||||
ctemp = cons->next;
|
||||
cons->x += dx;
|
||||
cons->y += dy;
|
||||
if (Is_waterlevel(&u.uz)) {
|
||||
/* replace contents of bubble */
|
||||
for (cons = b->cons; cons; cons = ctemp) {
|
||||
ctemp = cons->next;
|
||||
cons->x += dx;
|
||||
cons->y += dy;
|
||||
|
||||
switch(cons->what) {
|
||||
switch(cons->what) {
|
||||
case CONS_OBJ: {
|
||||
struct obj *olist, *otmp;
|
||||
|
||||
@@ -1375,13 +1404,13 @@ register boolean ini;
|
||||
default:
|
||||
impossible("mv_bubble: unknown bubble contents");
|
||||
break;
|
||||
}
|
||||
free((genericptr_t)cons);
|
||||
}
|
||||
free((genericptr_t)cons);
|
||||
b->cons = 0;
|
||||
}
|
||||
b->cons = 0;
|
||||
|
||||
/* boing? */
|
||||
|
||||
switch (colli) {
|
||||
case 1: b->dy = -b->dy; break;
|
||||
case 3: b->dy = -b->dy; /* fall through */
|
||||
|
||||
+13
-9
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 mkroom.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mkroom.c $NHDT-Date: 1427239202 2015/03/24 23:20:02 $ $NHDT-Branch: master $:$NHDT-Revision: 1.16 $ */
|
||||
/* NetHack 3.5 mkroom.c $Date: 2012/01/10 17:47:19 $ $Revision: 1.15 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -219,14 +219,10 @@ struct mkroom *sroom;
|
||||
{
|
||||
struct monst *mon;
|
||||
register int sx,sy,i;
|
||||
int sh, tx, ty, goldlim, type = sroom->rtype;
|
||||
int sh, tx = 0, ty = 0, goldlim = 0, type = sroom->rtype;
|
||||
int rmno = (int)((sroom - rooms) + ROOMOFFSET);
|
||||
coord mm;
|
||||
|
||||
#ifdef GCC_WARN
|
||||
tx = ty = goldlim = 0;
|
||||
#endif
|
||||
|
||||
sh = sroom->fdoor;
|
||||
switch(type) {
|
||||
case COURT:
|
||||
@@ -408,9 +404,17 @@ morguemon()
|
||||
{
|
||||
register int i = rn2(100), hd = rn2(level_difficulty());
|
||||
|
||||
if(hd > 10 && i < 10)
|
||||
return((Inhell || In_endgame(&u.uz)) ? mkclass(S_DEMON,0) :
|
||||
&mons[ndemon(A_NONE)]);
|
||||
if(hd > 10 && i < 10) {
|
||||
if (Inhell || In_endgame(&u.uz)) {
|
||||
return(mkclass(S_DEMON,0));
|
||||
} else {
|
||||
int ndemon_res = ndemon(A_NONE);
|
||||
if (ndemon_res != NON_PM)
|
||||
return(&mons[ndemon_res]);
|
||||
/* else do what? As is, it will drop to ghost/wraith/zombie */
|
||||
}
|
||||
}
|
||||
|
||||
if(hd > 8 && i > 85)
|
||||
return(mkclass(S_VAMPIRE,0));
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 mon.c $NHDT-Date: 1426465438 2015/03/16 00:23:58 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.139 $ */
|
||||
/* NetHack 3.5 mon.c $NHDT-Date: 1427580482 2015/03/28 22:08:02 $ $NHDT-Branch: master $:$NHDT-Revision: 1.142 $ */
|
||||
/* NetHack 3.5 mon.c $Date: 2012/05/16 02:15:10 $ $Revision: 1.126 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -616,7 +616,10 @@ meatmetal(mtmp)
|
||||
/* Eats topmost metal object if it is there */
|
||||
for (otmp = level.objects[mtmp->mx][mtmp->my];
|
||||
otmp; otmp = otmp->nexthere) {
|
||||
if (mtmp->data == &mons[PM_RUST_MONSTER] && !is_rustprone(otmp))
|
||||
/* Don't eat indigestible/choking/inappropriate objects */
|
||||
if ((mtmp->data == &mons[PM_RUST_MONSTER] && !is_rustprone(otmp)) ||
|
||||
(otmp->otyp == AMULET_OF_STRANGULATION) ||
|
||||
(otmp->otyp == RIN_SLOW_DIGESTION))
|
||||
continue;
|
||||
if (is_metallic(otmp) && !obj_resists(otmp, 5, 95) &&
|
||||
touch_artifact(otmp,mtmp)) {
|
||||
@@ -633,9 +636,7 @@ meatmetal(mtmp)
|
||||
pline("%s spits %s out in disgust!",
|
||||
Monnam(mtmp), distant_name(otmp,doname));
|
||||
}
|
||||
/* KMH -- Don't eat indigestible/choking objects */
|
||||
} else if (otmp->otyp != AMULET_OF_STRANGULATION &&
|
||||
otmp->otyp != RIN_SLOW_DIGESTION) {
|
||||
} else {
|
||||
if (cansee(mtmp->mx,mtmp->my) && flags.verbose)
|
||||
pline("%s eats %s!", Monnam(mtmp),
|
||||
distant_name(otmp,doname));
|
||||
@@ -1238,6 +1239,8 @@ dmonsfree()
|
||||
for (mtmp = &fmon; *mtmp;) {
|
||||
freetmp = *mtmp;
|
||||
if (freetmp->mhp <= 0 && !freetmp->isgd) {
|
||||
if (freetmp == context.polearm.hitmon)
|
||||
context.polearm.hitmon = NULL;
|
||||
*mtmp = freetmp->nmon;
|
||||
dealloc_monst(freetmp);
|
||||
count++;
|
||||
|
||||
+4
-4
@@ -446,7 +446,7 @@ dodiscovered() /* free after Robert Viduya */
|
||||
if ((dis = disco[i]) != 0 && interesting_to_discover(dis)) {
|
||||
ct++;
|
||||
if (oclass != prev_class) {
|
||||
putstr(tmpwin, iflags.menu_headings, let_to_name(oclass, FALSE));
|
||||
putstr(tmpwin, iflags.menu_headings, let_to_name(oclass, FALSE, FALSE));
|
||||
prev_class = oclass;
|
||||
}
|
||||
Sprintf(buf, "%s %s",(objects[dis].oc_pre_discovered ? "*" : " "),
|
||||
@@ -472,7 +472,7 @@ char *buf;
|
||||
{
|
||||
char *s;
|
||||
|
||||
Strcpy(buf, let_to_name(oclass, FALSE));
|
||||
Strcpy(buf, let_to_name(oclass, FALSE, FALSE));
|
||||
for (s = buf; *s; ++s) *s = lowc(*s);
|
||||
return buf;
|
||||
}
|
||||
@@ -615,7 +615,7 @@ doclassdisco()
|
||||
break;
|
||||
default:
|
||||
oclass = def_char_to_objclass(c);
|
||||
Sprintf(buf, "Discovered %s", let_to_name(oclass, FALSE));
|
||||
Sprintf(buf, "Discovered %s", let_to_name(oclass, FALSE, FALSE));
|
||||
putstr(tmpwin, iflags.menu_headings, buf);
|
||||
for (i = bases[(int)oclass];
|
||||
i < NUM_OBJECTS && objects[i].oc_class == oclass; ++i) {
|
||||
@@ -672,7 +672,7 @@ rename_disco()
|
||||
if (oclass != prev_class) {
|
||||
any.a_int = 0;
|
||||
add_menu(tmpwin, NO_GLYPH, &any, ' ', iflags.menu_headings,
|
||||
ATR_NONE, let_to_name(oclass, FALSE), MENU_UNSELECTED);
|
||||
ATR_NONE, let_to_name(oclass, FALSE, FALSE), MENU_UNSELECTED);
|
||||
prev_class = oclass;
|
||||
}
|
||||
any.a_int = dis;
|
||||
|
||||
+18
-4
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 objnam.c $NHDT-Date: 1426977394 2015/03/21 22:36:34 $ $NHDT-Branch: master $:$NHDT-Revision: 1.108 $ */
|
||||
/* NetHack 3.5 objnam.c $NHDT-Date: 1427440866 2015/03/27 07:21:06 $ $NHDT-Branch: master $:$NHDT-Revision: 1.109 $ */
|
||||
/* NetHack 3.5 objnam.c $Date: 2011/10/27 02:24:54 $ $Revision: 1.101 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -489,6 +489,11 @@ register struct obj *obj;
|
||||
}
|
||||
if (pluralize) Strcpy(buf, makeplural(buf));
|
||||
|
||||
if (obj->otyp == T_SHIRT && program_state.gameover) {
|
||||
char tmpbuf[BUFSZ];
|
||||
Sprintf(eos(buf), " with text \"%s\"", tshirt_text(obj, tmpbuf));
|
||||
}
|
||||
|
||||
if (has_oname(obj) && dknown) {
|
||||
Strcat(buf, " named ");
|
||||
nameit:
|
||||
@@ -651,8 +656,9 @@ register struct obj *obj;
|
||||
*/
|
||||
register char *bp = xname(obj);
|
||||
|
||||
if (iflags.override_ID) known = cknown = bknown = lknown = TRUE;
|
||||
else {
|
||||
if (iflags.override_ID) {
|
||||
known = cknown = bknown = lknown = TRUE;
|
||||
} else {
|
||||
known = obj->known;
|
||||
cknown = obj->cknown;
|
||||
bknown = obj->bknown;
|
||||
@@ -685,7 +691,15 @@ register struct obj *obj;
|
||||
|
||||
/* "empty" goes at the beginning, but item count goes at the end */
|
||||
if (cknown &&
|
||||
(Is_container(obj) || obj->otyp == STATUE) && !Has_contents(obj))
|
||||
/* bag of tricks: include "empty" prefix if it's known to
|
||||
be empty but its precise number of charges isn't known
|
||||
(when that is known, suffix of "(n:0)" will be appended,
|
||||
making the prefix be redundant; note that 'known' flag
|
||||
isn't set when emptiness gets discovered because then
|
||||
charging magic would yield known number of new charges) */
|
||||
(obj->otyp == BAG_OF_TRICKS ? (obj->spe == 0 && !obj->known) :
|
||||
/* not bag of tricks: empty if container which has no contents */
|
||||
(Is_container(obj) || obj->otyp == STATUE) && !Has_contents(obj)))
|
||||
Strcat(prefix, "empty ");
|
||||
|
||||
if (bknown &&
|
||||
|
||||
@@ -85,6 +85,7 @@ static struct Bool_Opt
|
||||
#else
|
||||
{"BIOS", (boolean *)0, FALSE, SET_IN_FILE},
|
||||
#endif
|
||||
{"blind", &u.uroleplay.blind, FALSE, DISP_IN_GAME},
|
||||
{"bones", &flags.bones, TRUE, SET_IN_FILE},
|
||||
#ifdef INSURANCE
|
||||
{"checkpoint", &flags.ins_chkpt, TRUE, SET_IN_GAME},
|
||||
@@ -139,14 +140,17 @@ static struct Bool_Opt
|
||||
#else
|
||||
{"mail", (boolean *)0, TRUE, SET_IN_FILE},
|
||||
#endif
|
||||
{"mention_walls", &iflags.mention_walls, FALSE, SET_IN_GAME},
|
||||
/* for menu debugging only*/
|
||||
{"menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME},
|
||||
{"menu_objsyms", &iflags.menu_head_objsym, FALSE, SET_IN_GAME},
|
||||
{"mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME}, /*WC*/
|
||||
#ifdef NEWS
|
||||
{"news", &iflags.news, TRUE, DISP_IN_GAME},
|
||||
#else
|
||||
{"news", (boolean *)0, FALSE, SET_IN_FILE},
|
||||
#endif
|
||||
{"nudist", &u.uroleplay.nudist, FALSE, DISP_IN_GAME},
|
||||
{"null", &flags.null, TRUE, SET_IN_GAME},
|
||||
#if defined(SYSFLAGS) && defined(MAC)
|
||||
{"page_wait", &sysflags.page_wait, TRUE, SET_IN_GAME},
|
||||
@@ -199,6 +203,7 @@ static struct Bool_Opt
|
||||
{"tombstone",&flags.tombstone, TRUE, SET_IN_GAME},
|
||||
{"toptenwin",&iflags.toptenwin, FALSE, SET_IN_GAME},
|
||||
{"travel", &flags.travelcmd, TRUE, SET_IN_GAME},
|
||||
{"use_darkgray", &iflags.wc2_darkgray, TRUE, SET_IN_FILE},
|
||||
#ifdef WIN32CON
|
||||
{"use_inverse", &iflags.wc_inverse, TRUE, SET_IN_GAME}, /*WC*/
|
||||
#else
|
||||
@@ -4396,6 +4401,7 @@ struct wc_Opt wc2_options[] = {
|
||||
{"fullscreen", WC2_FULLSCREEN},
|
||||
{"softkeyboard", WC2_SOFTKEYBOARD},
|
||||
{"wraptext", WC2_WRAPTEXT},
|
||||
{"use_darkgray", WC2_DARKGRAY},
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
{"hilite_status", WC2_HILITE_STATUS},
|
||||
#endif
|
||||
|
||||
+63
-19
@@ -447,7 +447,8 @@ const char **firstmatch;
|
||||
{
|
||||
boolean need_to_look = FALSE;
|
||||
int glyph;
|
||||
char look_buf[BUFSZ], prefix[BUFSZ];
|
||||
static char look_buf[BUFSZ];
|
||||
char prefix[BUFSZ];
|
||||
int found = 0; /* count of matching syms found */
|
||||
int i;
|
||||
int skipped_venom = 0;
|
||||
@@ -678,7 +679,7 @@ do_look(mode, click_cc)
|
||||
char out_str[BUFSZ];
|
||||
const char *firstmatch = 0;
|
||||
struct permonst *pm = 0;
|
||||
int i, ans = 0;
|
||||
int i = '\0', ans = 0;
|
||||
int sym; /* typed symbol or converted glyph */
|
||||
int found; /* count of matching syms found */
|
||||
coord cc; /* screen pos of unknown glyph */
|
||||
@@ -688,25 +689,68 @@ do_look(mode, click_cc)
|
||||
if (!clicklook) {
|
||||
if (quick) {
|
||||
from_screen = TRUE; /* yes, we want to use the cursor */
|
||||
} else {
|
||||
i = ynq("Specify unknown object by cursor?");
|
||||
if (i == 'q') return 0;
|
||||
from_screen = (i == 'y');
|
||||
i = 'y';
|
||||
}
|
||||
|
||||
if (i != 'y') {
|
||||
menu_item *pick_list = (menu_item *)0;
|
||||
winid win;
|
||||
anything any;
|
||||
win = create_nhwindow(NHW_MENU);
|
||||
start_menu(win);
|
||||
any.a_void = 0; any.a_char ='a';
|
||||
/* 'y' and 'n' to keep backwards compat with previous versions */
|
||||
add_menu(win, NO_GLYPH, &any, 'a', 'y', ATR_NONE, "something on the map", MENU_UNSELECTED);
|
||||
any.a_void = 0; any.a_char ='b';
|
||||
add_menu(win, NO_GLYPH, &any, 'b', 0, ATR_NONE, "something you're carrying", MENU_UNSELECTED);
|
||||
any.a_void = 0; any.a_char ='c';
|
||||
add_menu(win, NO_GLYPH, &any, 'c', 'n', ATR_NONE, "something else", MENU_UNSELECTED);
|
||||
end_menu(win, "What do you want to look at:");
|
||||
if (select_menu(win, PICK_ONE, &pick_list) > 0) {
|
||||
i = pick_list->item.a_char;
|
||||
free((genericptr_t)pick_list);
|
||||
}
|
||||
destroy_nhwindow(win);
|
||||
}
|
||||
|
||||
if (from_screen) {
|
||||
cc.x = u.ux;
|
||||
cc.y = u.uy;
|
||||
sym = 0; /* gcc -Wall lint */
|
||||
} else {
|
||||
getlin("Specify what? (type the word)", out_str);
|
||||
if (out_str[0] == '\0' || out_str[0] == '\033')
|
||||
return 0;
|
||||
if (out_str[1]) { /* user typed in a complete string */
|
||||
checkfile(out_str, pm, TRUE, TRUE);
|
||||
return 0;
|
||||
}
|
||||
sym = out_str[0];
|
||||
switch (i) {
|
||||
default:
|
||||
case 'q': return 0;
|
||||
case 'y':
|
||||
case 'a':
|
||||
from_screen = TRUE;
|
||||
sym = 0;
|
||||
cc.x = u.ux;
|
||||
cc.y = u.uy;
|
||||
break;
|
||||
case 'b':
|
||||
{
|
||||
char invlet;
|
||||
struct obj *invobj;
|
||||
invlet = display_inventory(NULL, TRUE);
|
||||
if (!invlet) return 0;
|
||||
for (invobj = invent; invobj; invobj = invobj->nobj)
|
||||
if (invobj->invlet == invlet) {
|
||||
strcpy(out_str, singular(invobj, xname));
|
||||
break;
|
||||
}
|
||||
if (!out_str[1]) return 0;
|
||||
checkfile(out_str, pm, TRUE, TRUE);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case 'c':
|
||||
from_screen = FALSE;
|
||||
getlin("Specify what? (type the word)", out_str);
|
||||
if (out_str[0] == '\0' || out_str[0] == '\033')
|
||||
return 0;
|
||||
|
||||
if (out_str[1]) { /* user typed in a complete string */
|
||||
checkfile(out_str, pm, TRUE, TRUE);
|
||||
return 0;
|
||||
}
|
||||
sym = out_str[0];
|
||||
break;
|
||||
}
|
||||
} else { /* clicklook */
|
||||
cc.x = click_cc->x;
|
||||
|
||||
+11
-8
@@ -769,7 +769,9 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */
|
||||
if (sorted && !printed_type_name) {
|
||||
any = zeroany;
|
||||
add_menu(win, NO_GLYPH, &any, 0, 0, iflags.menu_headings,
|
||||
let_to_name(*pack, FALSE), MENU_UNSELECTED);
|
||||
let_to_name(*pack, FALSE,
|
||||
(how != PICK_NONE) && iflags.menu_head_objsym),
|
||||
MENU_UNSELECTED);
|
||||
printed_type_name = TRUE;
|
||||
}
|
||||
|
||||
@@ -928,8 +930,10 @@ int how; /* type of query */
|
||||
any.a_int = curr->oclass;
|
||||
add_menu(win, NO_GLYPH, &any, invlet++,
|
||||
def_oc_syms[(int)objects[curr->otyp].oc_class].sym,
|
||||
ATR_NONE, let_to_name(*pack, FALSE),
|
||||
MENU_UNSELECTED);
|
||||
ATR_NONE,
|
||||
let_to_name(*pack, FALSE,
|
||||
(how != PICK_NONE) && iflags.menu_head_objsym),
|
||||
MENU_UNSELECTED);
|
||||
collected_type_name = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -1494,6 +1498,7 @@ doloot() /* loot a container on the floor or loot saddle from mon. */
|
||||
char qbuf[BUFSZ];
|
||||
int prev_inquiry = 0;
|
||||
boolean prev_loot = FALSE;
|
||||
int num_conts;
|
||||
|
||||
if (check_capacity((char *)0)) {
|
||||
/* "Can't do that while carrying so much stuff." */
|
||||
@@ -1514,15 +1519,11 @@ doloot() /* loot a container on the floor or loot saddle from mon. */
|
||||
|
||||
lootcont:
|
||||
|
||||
if (container_at(cc.x, cc.y, FALSE)) {
|
||||
if ((num_conts = container_at(cc.x, cc.y, TRUE)) > 0) {
|
||||
boolean anyfound = FALSE;
|
||||
int num_conts = 0;
|
||||
|
||||
if (!able_to_loot(cc.x, cc.y, TRUE)) return 0;
|
||||
|
||||
for (cobj = level.objects[cc.x][cc.y]; cobj; cobj = cobj->nexthere)
|
||||
if (Is_container(cobj)) num_conts++;
|
||||
|
||||
if (num_conts > 1) {
|
||||
/* use a menu to loot many containers */
|
||||
int n, i;
|
||||
@@ -2120,6 +2121,7 @@ int held;
|
||||
/* even if the trap fails, you've used up this turn */
|
||||
if (multi >= 0) { /* in case we didn't become paralyzed */
|
||||
nomul(-1);
|
||||
multi_reason = "opening a container";
|
||||
nomovemsg = "";
|
||||
}
|
||||
return 1;
|
||||
@@ -2629,6 +2631,7 @@ struct obj *box; /* or bag */
|
||||
/* even if the trap fails, you've used up this turn */
|
||||
if (multi >= 0) { /* in case we didn't become paralyzed */
|
||||
nomul(-1);
|
||||
multi_reason = "tipping a container";
|
||||
nomovemsg = "";
|
||||
}
|
||||
} else if (box->otyp == BAG_OF_TRICKS || box->otyp == HORN_OF_PLENTY) {
|
||||
|
||||
@@ -1285,6 +1285,7 @@ dogaze()
|
||||
-d((int)mtmp->m_lev+1,
|
||||
(int)mtmp->data->mattk[0].damd)
|
||||
: -200);
|
||||
multi_reason = "frozen by a monster's gaze";
|
||||
nomovemsg = 0;
|
||||
return 1;
|
||||
} else
|
||||
|
||||
+5
-3
@@ -375,6 +375,7 @@ ghost_from_bottle()
|
||||
if(flags.verbose)
|
||||
You("are frightened to death, and unable to move.");
|
||||
nomul(-3);
|
||||
multi_reason = "being frightened to death";
|
||||
nomovemsg = "You regain your composure.";
|
||||
}
|
||||
|
||||
@@ -678,6 +679,7 @@ peffects(otmp)
|
||||
Your("%s are frozen to the %s!",
|
||||
makeplural(body_part(FOOT)), surface(u.ux, u.uy));
|
||||
nomul(-(rn1(10, 25 - 12*bcsign(otmp))));
|
||||
multi_reason = "frozen by a potion";
|
||||
nomovemsg = You_can_move_again;
|
||||
exercise(A_DEX, FALSE);
|
||||
}
|
||||
@@ -1053,7 +1055,7 @@ boolean useeit;
|
||||
const char *objphrase; /* "Your widget glows" or "Steed's saddle glows" */
|
||||
{
|
||||
void FDECL((*func), (OBJ_P)) = 0;
|
||||
const char *how = 0, *glowcolor = 0;
|
||||
const char *glowcolor = 0;
|
||||
#define COST_alter (-2)
|
||||
#define COST_none (-1)
|
||||
int costchange = COST_none;
|
||||
@@ -1062,7 +1064,6 @@ const char *objphrase; /* "Your widget glows" or "Steed's saddle glows" */
|
||||
if (!potion || potion->otyp != POT_WATER) return FALSE;
|
||||
|
||||
if (potion->blessed) {
|
||||
how = "softly glow";
|
||||
if (targobj->cursed) {
|
||||
func = uncurse;
|
||||
glowcolor = NH_AMBER;
|
||||
@@ -1074,7 +1075,6 @@ const char *objphrase; /* "Your widget glows" or "Steed's saddle glows" */
|
||||
altfmt = TRUE; /* "with a <color> aura" */
|
||||
}
|
||||
} else if (potion->cursed) {
|
||||
how = "glow";
|
||||
if (targobj->blessed) {
|
||||
func = unbless;
|
||||
glowcolor = "brown";
|
||||
@@ -1467,6 +1467,7 @@ register struct obj *obj;
|
||||
if (!Free_action) {
|
||||
pline("%s seems to be holding you.", Something);
|
||||
nomul(-rnd(5));
|
||||
multi_reason = "frozen by a potion";
|
||||
nomovemsg = You_can_move_again;
|
||||
exercise(A_DEX, FALSE);
|
||||
} else You("stiffen momentarily.");
|
||||
@@ -1476,6 +1477,7 @@ register struct obj *obj;
|
||||
if (!Free_action && !Sleep_resistance) {
|
||||
You_feel("rather tired.");
|
||||
nomul(-rnd(5));
|
||||
multi_reason = "sleeping off a magical draught";
|
||||
nomovemsg = You_can_move_again;
|
||||
exercise(A_DEX, FALSE);
|
||||
} else You("yawn.");
|
||||
|
||||
+58
-11
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 pray.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 pray.c $NHDT-Date: 1427670643 2015/03/29 23:10:43 $ $NHDT-Branch: master $:$NHDT-Revision: 1.69 $ */
|
||||
/* NetHack 3.5 pray.c $Date: 2012/05/07 01:44:38 $ $Revision: 1.62 $ */
|
||||
/* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1269,6 +1269,7 @@ dosacrifice()
|
||||
dmon->mpeaceful = TRUE;
|
||||
You("are terrified, and unable to move.");
|
||||
nomul(-3);
|
||||
multi_reason = "being terrified of a demon";
|
||||
nomovemsg = 0;
|
||||
} else pline_The("%s.", demonless_msg);
|
||||
}
|
||||
@@ -1655,6 +1656,7 @@ dopray()
|
||||
}
|
||||
}
|
||||
nomul(-3);
|
||||
multi_reason = "praying";
|
||||
nomovemsg = "You finish your prayer.";
|
||||
afternmv = prayer_done;
|
||||
|
||||
@@ -1817,6 +1819,7 @@ doturn()
|
||||
}
|
||||
}
|
||||
nomul(-5);
|
||||
multi_reason = "trying to turn the monsters";
|
||||
nomovemsg = You_can_move_again;
|
||||
return(1);
|
||||
}
|
||||
@@ -1860,26 +1863,70 @@ aligntyp alignment;
|
||||
return gnam;
|
||||
}
|
||||
|
||||
static const char *hallu_gods[] = {
|
||||
"the Flying Spaghetti Monster", /* Church of the FSM */
|
||||
"Eris", /* Discordianism */
|
||||
"the Martians", /* every science fiction ever */
|
||||
"Xom", /* Crawl */
|
||||
"AnDoR dRaKoN", /* ADOM */
|
||||
"the Central Bank of Yendor", /* economics */
|
||||
"Tooth Fairy", /* real world(?) */
|
||||
"Om", /* Discworld */
|
||||
"Yawgmoth", /* Magic: the Gathering */
|
||||
"Morgoth", /* LoTR */
|
||||
"Cthulhu", /* Lovecraft */
|
||||
"the Ori", /* Stargate */
|
||||
"destiny", /* why not? */
|
||||
"your Friend the Computer", /* Paranoia */
|
||||
};
|
||||
|
||||
/* hallucination handling for priest/minion names: select a random god
|
||||
iff character is hallucinating */
|
||||
const char *
|
||||
halu_gname(alignment)
|
||||
aligntyp alignment;
|
||||
{
|
||||
const char *gnam;
|
||||
const char *gnam = NULL;
|
||||
int which;
|
||||
|
||||
if (!Hallucination) return align_gname(alignment);
|
||||
if (!Hallucination)
|
||||
return align_gname(alignment);
|
||||
|
||||
which = randrole();
|
||||
switch (rn2(3)) {
|
||||
case 0: gnam = roles[which].lgod; break;
|
||||
case 1: gnam = roles[which].ngod; break;
|
||||
case 2: gnam = roles[which].cgod; break;
|
||||
default: gnam = 0; break; /* lint suppression */
|
||||
/* The priest may not have initialized god names. If this is the
|
||||
* case, and we roll priest, we need to try again. */
|
||||
do
|
||||
which = randrole();
|
||||
while (!roles[which].lgod);
|
||||
|
||||
switch (rn2(9)) {
|
||||
case 0:
|
||||
case 1:
|
||||
gnam = roles[which].lgod;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
gnam = roles[which].ngod;
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
gnam = roles[which].cgod;
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
gnam = hallu_gods[rn2(sizeof hallu_gods / sizeof *hallu_gods)];
|
||||
break;
|
||||
case 8:
|
||||
gnam = Moloch;
|
||||
break;
|
||||
default:
|
||||
impossible("rn2 broken in halu_gname?!?");
|
||||
}
|
||||
if (!gnam) gnam = Moloch;
|
||||
if (*gnam == '_') ++gnam;
|
||||
if (!gnam) {
|
||||
impossible("No random god name?");
|
||||
gnam = "your Friend the Computer"; /* Paranoia */
|
||||
}
|
||||
if (*gnam == '_')
|
||||
++gnam;
|
||||
return gnam;
|
||||
}
|
||||
|
||||
|
||||
@@ -475,6 +475,7 @@ int roomno;
|
||||
if (flags.verbose)
|
||||
You("are frightened to death, and unable to move.");
|
||||
nomul(-3);
|
||||
multi_reason = "being terrified of a demon";
|
||||
nomovemsg = "You regain your composure.";
|
||||
}
|
||||
}
|
||||
|
||||
+198
-31
@@ -53,6 +53,115 @@ struct obj *sobj;
|
||||
(void) learnscrolltyp(sobj->otyp);
|
||||
}
|
||||
|
||||
char *
|
||||
erode_obj_text(otmp, buf)
|
||||
struct obj *otmp;
|
||||
char *buf;
|
||||
{
|
||||
int erosion = greatest_erosion(otmp);
|
||||
if (erosion)
|
||||
wipeout_text(buf,
|
||||
(int)(strlen(buf) * erosion / (2*MAX_ERODE)),
|
||||
otmp->o_id ^ (unsigned)ubirthday);
|
||||
return buf;
|
||||
}
|
||||
|
||||
char *
|
||||
tshirt_text(tshirt, buf)
|
||||
struct obj *tshirt;
|
||||
char *buf;
|
||||
{
|
||||
static const char *shirt_msgs[] = { /* Scott Bigham */
|
||||
"I explored the Dungeons of Doom and all I got was this lousy T-shirt!",
|
||||
"Is that Mjollnir in your pocket or are you just happy to see me?",
|
||||
"It's not the size of your sword, it's how #enhance'd you are with it.",
|
||||
"Madame Elvira's House O' Succubi Lifetime Customer",
|
||||
"Madame Elvira's House O' Succubi Employee of the Month",
|
||||
"Ludios Vault Guards Do It In Small, Dark Rooms",
|
||||
"Yendor Military Soldiers Do It In Large Groups",
|
||||
"I survived Yendor Military Boot Camp",
|
||||
"Ludios Accounting School Intra-Mural Lacrosse Team",
|
||||
"Oracle(TM) Fountains 10th Annual Wet T-Shirt Contest",
|
||||
"Hey, black dragon! Disintegrate THIS!",
|
||||
"I'm With Stupid -->",
|
||||
"Don't blame me, I voted for Izchak!",
|
||||
"Don't Panic", /* HHGTTG */
|
||||
"Furinkan High School Athletic Dept.", /* Ranma 1/2 */
|
||||
"Hel-LOOO, Nurse!", /* Animaniacs */
|
||||
"=^.^=",
|
||||
"100% goblin hair - do not wash",
|
||||
"Aberzombie and Fitch",
|
||||
"cK -- Cockatrice touches the Kop",
|
||||
"Don't ask me, I only adventure here",
|
||||
"Down with pants!",
|
||||
"d, your dog or a killer?",
|
||||
"FREE PUG AND NEWT!",
|
||||
"Go team ant!",
|
||||
"Got newt?",
|
||||
"Hello, my darlings!", /* Charlie Drake */
|
||||
"Hey! Nymphs! Steal This T-Shirt!",
|
||||
"I <3 Dungeon of Doom",
|
||||
"I <3 Maud",
|
||||
"I am a Valkyrie. If you see me running, try to keep up.",
|
||||
"I am not a pack rat - I am a collector",
|
||||
"I bounced off a rubber tree", /* Monkey Island */
|
||||
"Plunder Island Brimstone Beach Club", /* Monkey Island */
|
||||
"If you can read this, I can hit you with my polearm",
|
||||
"I'm confused!",
|
||||
"I scored with the princess",
|
||||
"I want to live forever or die in the attempt.",
|
||||
"Lichen Park",
|
||||
"LOST IN THOUGHT - please send search party",
|
||||
"Meat is Mordor",
|
||||
"Minetown Better Business Bureau",
|
||||
"Minetown Watch",
|
||||
"Ms. Palm's House of Negotiable Affection -- A Very Reputable House Of Disrepute",
|
||||
"Protection Racketeer",
|
||||
"Real men love Crom",
|
||||
"Somebody stole my Mojo!",
|
||||
"The Hellhound Gang",
|
||||
"The Werewolves",
|
||||
"They Might Be Storm Giants",
|
||||
"Weapons don't kill people, I kill people",
|
||||
"White Zombie",
|
||||
"You're killing me!",
|
||||
"Anhur State University - Home of the Fighting Fire Ants!",
|
||||
"FREE HUGS",
|
||||
"Serial Ascender",
|
||||
"Real men are valkyries",
|
||||
"Young Men's Cavedigging Association",
|
||||
"Occupy Fort Ludios",
|
||||
"I couldn't afford this T-shirt so I stole it!",
|
||||
"Mind flayers suck",
|
||||
"I'm not wearing any pants",
|
||||
"Down with the living!",
|
||||
"Pudding farmer",
|
||||
"Vegetarian",
|
||||
};
|
||||
Strcpy(buf, shirt_msgs[tshirt->o_id % SIZE(shirt_msgs)]);
|
||||
return erode_obj_text(tshirt, buf);
|
||||
}
|
||||
|
||||
char *
|
||||
apron_text(apron, buf)
|
||||
struct obj *apron;
|
||||
char *buf;
|
||||
{
|
||||
static const char *apron_msgs[] = {
|
||||
"Kiss the cook",
|
||||
"I'm making SCIENCE!",
|
||||
"Don't mess with the chef",
|
||||
"Don't make me poison you",
|
||||
"Gehennom's Kitchen",
|
||||
"Rat: The other white meat",
|
||||
"If you can't stand the heat, get out of Gehennom!",
|
||||
"If we weren't meant to eat animals, why are they made out of meat?",
|
||||
"If you don't like the food, I'll stab you",
|
||||
};
|
||||
Strcpy(buf, apron_msgs[apron->o_id % SIZE(apron_msgs)]);
|
||||
return erode_obj_text(apron, buf);
|
||||
}
|
||||
|
||||
int
|
||||
doread()
|
||||
{
|
||||
@@ -72,34 +181,15 @@ doread()
|
||||
if (!Blind) u.uconduct.literate++;
|
||||
useup(scroll);
|
||||
return(1);
|
||||
} else if (scroll->otyp == T_SHIRT) {
|
||||
static const char *shirt_msgs[] = { /* Scott Bigham */
|
||||
"I explored the Dungeons of Doom and all I got was this lousy T-shirt!",
|
||||
"Is that Mjollnir in your pocket or are you just happy to see me?",
|
||||
"It's not the size of your sword, it's how #enhance'd you are with it.",
|
||||
"Madame Elvira's House O' Succubi Lifetime Customer",
|
||||
"Madame Elvira's House O' Succubi Employee of the Month",
|
||||
"Ludios Vault Guards Do It In Small, Dark Rooms",
|
||||
"Yendor Military Soldiers Do It In Large Groups",
|
||||
"I survived Yendor Military Boot Camp",
|
||||
"Ludios Accounting School Intra-Mural Lacrosse Team",
|
||||
"Oracle(TM) Fountains 10th Annual Wet T-Shirt Contest",
|
||||
"Hey, black dragon! Disintegrate THIS!",
|
||||
"I'm With Stupid -->",
|
||||
"Don't blame me, I voted for Izchak!",
|
||||
"Don't Panic", /* HHGTTG */
|
||||
"Furinkan High School Athletic Dept.", /* Ranma 1/2 */
|
||||
"Hel-LOOO, Nurse!", /* Animaniacs */
|
||||
};
|
||||
} else if (scroll->otyp == T_SHIRT ||
|
||||
scroll->otyp == ALCHEMY_SMOCK) {
|
||||
char buf[BUFSZ];
|
||||
int erosion;
|
||||
|
||||
if (Blind) {
|
||||
You_cant("feel any Braille writing.");
|
||||
return 0;
|
||||
}
|
||||
/* can't read shirt worn under suit (under cloak is ok though) */
|
||||
if (uarm && scroll == uarmu) {
|
||||
if (scroll->otyp == T_SHIRT && uarm && scroll == uarmu) {
|
||||
pline("%s shirt is obscured by %s%s.",
|
||||
scroll->unpaid ? "That" : "Your",
|
||||
shk_your(buf, uarm), suit_simple_name(uarm));
|
||||
@@ -108,19 +198,96 @@ doread()
|
||||
u.uconduct.literate++;
|
||||
if(flags.verbose)
|
||||
pline("It reads:");
|
||||
Strcpy(buf, shirt_msgs[scroll->o_id % SIZE(shirt_msgs)]);
|
||||
erosion = greatest_erosion(scroll);
|
||||
if (erosion)
|
||||
wipeout_text(buf,
|
||||
(int)(strlen(buf) * erosion / (2*MAX_ERODE)),
|
||||
scroll->o_id ^ (unsigned)ubirthday);
|
||||
pline("\"%s\"", buf);
|
||||
pline("\"%s\"", (scroll->otyp == T_SHIRT)
|
||||
? tshirt_text(scroll, buf)
|
||||
: apron_text(scroll, buf));
|
||||
return 1;
|
||||
} else if (scroll->otyp == CREDIT_CARD) {
|
||||
static const char *card_msgs[] = {
|
||||
"Leprechaun Gold Tru$t - Shamrock Card",
|
||||
"Magic Memory Vault Charge Card",
|
||||
"Larn National Bank", /* Larn */
|
||||
"First Bank of Omega", /* Omega */
|
||||
"Bank of Zork - Frobozz Magic Card", /* Zork */
|
||||
"Ankh-Morpork Merchant's Guild Barter Card",
|
||||
"Ankh-Morpork Thieves' Guild Unlimited Transaction Card",
|
||||
"Ransmannsby Moneylenders Association",
|
||||
"Bank of Gehennom - 99% Interest Card",
|
||||
"Yendorian Express - Copper Card",
|
||||
"Yendorian Express - Silver Card",
|
||||
"Yendorian Express - Gold Card",
|
||||
"Yendorian Express - Mithril Card",
|
||||
"Yendorian Express - Platinum Card", /* must be last */
|
||||
};
|
||||
if (Blind) {
|
||||
You("feel the embossed numbers:");
|
||||
} else {
|
||||
if(flags.verbose)
|
||||
pline("It reads:");
|
||||
pline("\"%s\"", scroll->oartifact ? card_msgs[SIZE(card_msgs)-1]
|
||||
: card_msgs[scroll->o_id % (SIZE(card_msgs)-1)]);
|
||||
}
|
||||
/* Make a credit card number */
|
||||
pline("\"%d0%d %d%d1 0%d%d0\"", ((scroll->o_id % 89)+10), (scroll->o_id % 4),
|
||||
(((scroll->o_id * 499) % 899999) + 100000), (scroll->o_id % 10),
|
||||
(!(scroll->o_id % 3)), ((scroll->o_id * 7) % 10));
|
||||
u.uconduct.literate++;
|
||||
return 1;
|
||||
} else if (scroll->otyp == CAN_OF_GREASE) {
|
||||
pline("This %s has no label.", singular(scroll, xname));
|
||||
return 0;
|
||||
} else if (scroll->otyp == MAGIC_MARKER) {
|
||||
if (Blind) {
|
||||
You_cant("feel any Braille writing.");
|
||||
return 0;
|
||||
}
|
||||
if (flags.verbose)
|
||||
pline("It reads:");
|
||||
pline("\"Magic Marker(TM) Red Ink Marker Pen. Water Soluble.\"");
|
||||
u.uconduct.literate++;
|
||||
return 1;
|
||||
} else if (scroll->oclass == COIN_CLASS) {
|
||||
if (Blind)
|
||||
You("feel the embossed words:");
|
||||
else if (flags.verbose)
|
||||
You("read:");
|
||||
pline("\"1 Zorkmid. 857 GUE. In Frobs We Trust.\"");
|
||||
u.uconduct.literate++;
|
||||
return 1;
|
||||
} else if (scroll->oartifact == ART_ORB_OF_FATE) {
|
||||
if (Blind)
|
||||
You("feel the engraved signature:");
|
||||
else pline("It is signed:");
|
||||
pline("\"Odin.\"");
|
||||
u.uconduct.literate++;
|
||||
return 1;
|
||||
} else if (scroll->otyp == CANDY_BAR) {
|
||||
static const char *wrapper_msgs[] = {
|
||||
"Apollo", /* Lost */
|
||||
"Moon Crunchy", /* South Park */
|
||||
"Snacky Cake",
|
||||
"Chocolate Nuggie",
|
||||
"The Small Bar",
|
||||
"Crispy Yum Yum",
|
||||
"Nilla Crunchie",
|
||||
"Berry Bar",
|
||||
"Choco Nummer",
|
||||
"Om-nom", /* Cat Macro */
|
||||
"Fruity Oaty", /* Serenity */
|
||||
"Wonka Bar" /* Charlie and the Chocolate Factory */
|
||||
};
|
||||
if (Blind) {
|
||||
You_cant("feel any Braille writing.");
|
||||
return 0;
|
||||
}
|
||||
pline("The wrapper reads: \"%s\"", wrapper_msgs[scroll->o_id % SIZE(wrapper_msgs)]);
|
||||
u.uconduct.literate++;
|
||||
return 1;
|
||||
} else if (scroll->oclass != SCROLL_CLASS
|
||||
&& scroll->oclass != SPBOOK_CLASS) {
|
||||
pline(silly_thing_to, "read");
|
||||
return(0);
|
||||
} else if (Blind) {
|
||||
} else if (Blind && (scroll->otyp != SPE_BOOK_OF_THE_DEAD)) {
|
||||
const char *what = 0;
|
||||
if (scroll->oclass == SPBOOK_CLASS)
|
||||
what = "mystic runes";
|
||||
@@ -2031,7 +2198,7 @@ create_particular()
|
||||
{
|
||||
char buf[BUFSZ], *bufp, monclass;
|
||||
int which, tryct, i, firstchoice = NON_PM;
|
||||
struct permonst *whichpm;
|
||||
struct permonst *whichpm = NULL;
|
||||
struct monst *mtmp;
|
||||
boolean madeany = FALSE;
|
||||
boolean maketame, makepeaceful, makehostile;
|
||||
|
||||
+7
-3
@@ -446,6 +446,10 @@ boolean ghostly;
|
||||
if (mtmp->isshk) restshk(mtmp, ghostly);
|
||||
if (mtmp->ispriest) restpriest(mtmp, ghostly);
|
||||
|
||||
if (!ghostly) {
|
||||
if (mtmp->m_id == context.polearm.m_id)
|
||||
context.polearm.hitmon = mtmp;
|
||||
}
|
||||
mtmp2 = mtmp;
|
||||
}
|
||||
if(first && mtmp2->nmon){
|
||||
@@ -1140,9 +1144,9 @@ get_plname_from_file(fd, plbuf)
|
||||
int fd;
|
||||
char *plbuf;
|
||||
{
|
||||
int rlen, pltmpsiz = 0;
|
||||
rlen = read(fd, (genericptr_t) &pltmpsiz, sizeof(pltmpsiz));
|
||||
rlen = read(fd, (genericptr_t) plbuf, pltmpsiz);
|
||||
int pltmpsiz = 0;
|
||||
(void) read(fd, (genericptr_t) &pltmpsiz, sizeof(pltmpsiz));
|
||||
(void) read(fd, (genericptr_t) plbuf, pltmpsiz);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+7
-1
@@ -1124,8 +1124,13 @@ register struct monst *mtmp;
|
||||
}
|
||||
if (mtmp->minvent)
|
||||
saveobjchn(fd,mtmp->minvent,mode);
|
||||
if (release_data(mode))
|
||||
if (release_data(mode)) {
|
||||
if (mtmp == context.polearm.hitmon) {
|
||||
context.polearm.m_id = mtmp->m_id;
|
||||
context.polearm.hitmon = NULL;
|
||||
}
|
||||
dealloc_monst(mtmp);
|
||||
}
|
||||
mtmp = mtmp2;
|
||||
}
|
||||
if (perform_bwrite(mode))
|
||||
@@ -1316,6 +1321,7 @@ freedynamicdata()
|
||||
/* level-specific data */
|
||||
free_timers(RANGE_LEVEL);
|
||||
free_light_sources(RANGE_LEVEL);
|
||||
clear_regions();
|
||||
freemonchn(fmon);
|
||||
free_worm(); /* release worm segment information */
|
||||
freetrapchn(ftrap);
|
||||
|
||||
+6
-1
@@ -304,7 +304,11 @@ dosounds()
|
||||
|
||||
static const char * const h_sounds[] = {
|
||||
"beep", "boing", "sing", "belche", "creak", "cough", "rattle",
|
||||
"ululate", "pop", "jingle", "sniffle", "tinkle", "eep"
|
||||
"ululate", "pop", "jingle", "sniffle", "tinkle", "eep",
|
||||
"clatter", "hum", "sizzle", "twitter", "wheeze", "rustle",
|
||||
"honk", "lisp", "yodel", "coo", "burp", "moo", "boom",
|
||||
"murmur", "oink", "quack", "rumble", "twang", "bellow",
|
||||
"toot", "gargle", "hoot", "warble"
|
||||
};
|
||||
|
||||
const char *
|
||||
@@ -706,6 +710,7 @@ register struct monst *mtmp;
|
||||
pline("%s rattles noisily.", Monnam(mtmp));
|
||||
You("freeze for a moment.");
|
||||
nomul(-2);
|
||||
multi_reason = "scared by rattling";
|
||||
nomovemsg = 0;
|
||||
break;
|
||||
case MS_LAUGH:
|
||||
|
||||
@@ -329,6 +329,7 @@ learn(VOID_ARGS)
|
||||
context.spbook.book = 0; /* no longer studying */
|
||||
context.spbook.o_id = 0;
|
||||
nomul(context.spbook.delay); /* remaining delay is uninterrupted */
|
||||
multi_reason = "reading a book";
|
||||
nomovemsg = 0;
|
||||
context.spbook.delay = 0;
|
||||
return(0);
|
||||
@@ -506,6 +507,7 @@ register struct obj *spellbook;
|
||||
boolean gone = cursed_book(spellbook);
|
||||
|
||||
nomul(context.spbook.delay); /* study time */
|
||||
multi_reason = "reading a book";
|
||||
nomovemsg = 0;
|
||||
context.spbook.delay = 0;
|
||||
if(gone || !rn2(3)) {
|
||||
@@ -522,6 +524,7 @@ register struct obj *spellbook;
|
||||
spellbook->in_use = FALSE;
|
||||
}
|
||||
nomul(context.spbook.delay);
|
||||
multi_reason = "reading a book";
|
||||
nomovemsg = 0;
|
||||
context.spbook.delay = 0;
|
||||
return(1);
|
||||
|
||||
@@ -361,6 +361,7 @@ gotobj:
|
||||
named++;
|
||||
/* the following is to set multi for later on */
|
||||
nomul(-armordelay);
|
||||
multi_reason = "taking off clothes";
|
||||
nomovemsg = 0;
|
||||
remove_worn_item(otmp, TRUE);
|
||||
otmp->cursed = curssv;
|
||||
|
||||
@@ -33,6 +33,7 @@ sys_early_init()
|
||||
#endif
|
||||
sysopt.env_dbgfl = 0; /* haven't checked getenv("DEBUGFILES") yet */
|
||||
sysopt.shellers = NULL;
|
||||
sysopt.explorers = NULL;
|
||||
sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */
|
||||
|
||||
/* record file */
|
||||
|
||||
@@ -51,6 +51,7 @@ stoned_dialogue()
|
||||
case 3: /* limbs turned to stone */
|
||||
stop_occupation();
|
||||
nomul(-3); /* can't move anymore */
|
||||
multi_reason = "getting stoned";
|
||||
nomovemsg = You_can_move_again; /* not unconscious */
|
||||
break;
|
||||
default:
|
||||
@@ -377,6 +378,7 @@ nh_timeout()
|
||||
if (u.umoved && !Levitation) {
|
||||
slip_or_trip();
|
||||
nomul(-2);
|
||||
multi_reason = "fumbling";
|
||||
nomovemsg = "";
|
||||
/* The more you are carrying the more likely you
|
||||
* are to make noise when you fumble. Adjustments
|
||||
@@ -409,6 +411,7 @@ boolean wakeup_msg;
|
||||
{
|
||||
stop_occupation();
|
||||
nomul(how_long);
|
||||
multi_reason = "sleeping";
|
||||
/* generally don't notice sounds while sleeping */
|
||||
if (wakeup_msg && multi == how_long) {
|
||||
/* caller can follow with a direct call to Hear_again() if
|
||||
@@ -1271,6 +1274,7 @@ do_storms()
|
||||
if(!u.uinvulnerable) {
|
||||
stop_occupation();
|
||||
nomul(-3);
|
||||
multi_reason = "hiding from thunderstorm";
|
||||
nomovemsg = 0;
|
||||
}
|
||||
} else
|
||||
|
||||
@@ -66,6 +66,7 @@ STATIC_DCL void FDECL(discardexcess, (FILE *));
|
||||
STATIC_DCL void FDECL(readentry, (FILE *,struct toptenentry *));
|
||||
STATIC_DCL void FDECL(writeentry, (FILE *,struct toptenentry *));
|
||||
STATIC_DCL void FDECL(writexlentry, (FILE*, struct toptenentry *));
|
||||
STATIC_DCL long NDECL(encodexlogflags);
|
||||
STATIC_DCL long NDECL(encodeconduct);
|
||||
STATIC_DCL long NDECL(encodeachieve);
|
||||
STATIC_DCL void FDECL(free_ttlist, (struct toptenentry *));
|
||||
@@ -341,10 +342,23 @@ struct toptenentry *tt;
|
||||
Fprintf(rfile, "%cgender0=%s%calign0=%s",
|
||||
XLOG_SEP, genders[flags.initgend].filecode,
|
||||
XLOG_SEP, aligns[1 - u.ualignbase[A_ORIGINAL]].filecode);
|
||||
Fprintf(rfile, "%cflags=0x%lx",
|
||||
XLOG_SEP, encodexlogflags());
|
||||
Fprintf(rfile, "\n");
|
||||
#undef XLOG_SEP
|
||||
}
|
||||
|
||||
STATIC_OVL long
|
||||
encodexlogflags()
|
||||
{
|
||||
long e = 0L;
|
||||
|
||||
if (wizard) e |= 1L << 0;
|
||||
if (discover) e |= 1L << 1;
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
STATIC_OVL long
|
||||
encodeconduct()
|
||||
{
|
||||
@@ -383,6 +397,8 @@ encodeachieve()
|
||||
if(u.uachieve.mines_luckstone) r |= 1L << 9;
|
||||
if(u.uachieve.finish_sokoban) r |= 1L << 10;
|
||||
if(u.uachieve.killed_medusa) r |= 1L << 11;
|
||||
if(u.uroleplay.blind) r |= 1L << 12;
|
||||
if(u.uroleplay.nudist) r |= 1L << 13;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
+13
-8
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 trap.c $NHDT-Date: 1426558928 2015/03/17 02:22:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.195 $ */
|
||||
/* NetHack 3.5 trap.c $NHDT-Date: 1427331767 2015/03/26 01:02:47 $ $NHDT-Branch: master $:$NHDT-Revision: 1.199 $ */
|
||||
/* NetHack 3.5 trap.c $Date: 2013/03/14 01:58:21 $ $Revision: 1.179 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -946,6 +946,7 @@ unsigned trflags;
|
||||
} else {
|
||||
pline("%s bear trap closes on your %s!",
|
||||
A_Your[trap->madeby_u], body_part(FOOT));
|
||||
set_wounded_legs(rn2(2) ? RIGHT_SIDE : LEFT_SIDE, rn1(10,10));
|
||||
if(u.umonnum == PM_OWLBEAR || u.umonnum == PM_BUGBEAR)
|
||||
You("howl in anger!");
|
||||
losehp(Maybe_Half_Phys(dmg), "bear trap", KILLED_BY_AN);
|
||||
@@ -1406,13 +1407,12 @@ struct obj *otmp;
|
||||
{
|
||||
struct monst *steed = u.usteed;
|
||||
int tt;
|
||||
boolean in_sight, trapkilled, steedhit;
|
||||
boolean trapkilled, steedhit;
|
||||
|
||||
if (!steed || !trap) return 0;
|
||||
tt = trap->ttyp;
|
||||
steed->mx = u.ux;
|
||||
steed->my = u.uy;
|
||||
in_sight = !Blind;
|
||||
trapkilled = steedhit = FALSE;
|
||||
|
||||
switch (tt) {
|
||||
@@ -3118,13 +3118,17 @@ acid_damage(obj)
|
||||
struct obj *obj;
|
||||
{
|
||||
/* Scrolls but not spellbooks can be erased by acid. */
|
||||
struct monst *victim =
|
||||
carried(obj) ? &youmonst : mcarried(obj) ? obj->ocarry : NULL;
|
||||
boolean vismon = victim && (victim != &youmonst) && canseemon(victim);
|
||||
struct monst *victim;
|
||||
boolean vismon;
|
||||
|
||||
if (obj->greased)
|
||||
if (!obj) return;
|
||||
|
||||
victim = carried(obj) ? &youmonst : mcarried(obj) ? obj->ocarry : NULL;
|
||||
vismon = victim && (victim != &youmonst) && canseemon(victim);
|
||||
|
||||
if (obj->greased) {
|
||||
grease_protect(obj, NULL, victim);
|
||||
else if (obj->oclass == SCROLL_CLASS && obj->otyp != SCR_BLANK_PAPER) {
|
||||
} else if (obj->oclass == SCROLL_CLASS && obj->otyp != SCR_BLANK_PAPER) {
|
||||
if (obj->otyp != SCR_BLANK_PAPER
|
||||
#ifdef MAIL
|
||||
&& obj->otyp != SCR_MAIL
|
||||
@@ -4444,6 +4448,7 @@ boolean disarm;
|
||||
if (!Free_action) {
|
||||
pline("Suddenly you are frozen in place!");
|
||||
nomul(-d(5, 6));
|
||||
multi_reason = "frozen by a trap";
|
||||
exercise(A_DEX, FALSE);
|
||||
nomovemsg = You_can_move_again;
|
||||
} else You("momentarily stiffen.");
|
||||
|
||||
@@ -491,6 +491,7 @@ void
|
||||
u_init()
|
||||
{
|
||||
register int i;
|
||||
struct u_roleplay tmpuroleplay = u.uroleplay; /* these set by rcfile options */
|
||||
|
||||
flags.female = flags.initgend;
|
||||
flags.beginner = 1;
|
||||
@@ -502,6 +503,8 @@ u_init()
|
||||
(void) memset((genericptr_t)&ubirthday, 0, sizeof(ubirthday));
|
||||
(void) memset((genericptr_t)&urealtime, 0, sizeof(urealtime));
|
||||
|
||||
u.uroleplay = tmpuroleplay; /* restore options set via rcfile */
|
||||
|
||||
#if 0 /* documentation of more zero values as desirable */
|
||||
u.usick_cause[0] = 0;
|
||||
u.uluck = u.moreluck = 0;
|
||||
@@ -922,6 +925,13 @@ register struct trobj *trop;
|
||||
nocreate4 = otyp;
|
||||
}
|
||||
|
||||
/* nudist gets no armor */
|
||||
if (u.uroleplay.nudist && obj->oclass == ARMOR_CLASS) {
|
||||
dealloc_obj(obj);
|
||||
trop++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (trop->trclass == COIN_CLASS) {
|
||||
/* no "blessed" or "identified" money */
|
||||
obj->quan = u.umoney0;
|
||||
|
||||
@@ -1871,6 +1871,7 @@ register struct attack *mattk;
|
||||
You("digest %s.", mon_nam(mdef));
|
||||
if (Slow_digestion) tmp *= 2;
|
||||
nomul(-tmp);
|
||||
multi_reason = "digesting something";
|
||||
nomovemsg = msgbuf;
|
||||
} else pline1(msgbuf);
|
||||
if (pd == &mons[PM_GREEN_SLIME]) {
|
||||
@@ -2353,6 +2354,7 @@ boolean wep_was_destroyed;
|
||||
You("are frozen by %s gaze!",
|
||||
s_suffix(mon_nam(mon)));
|
||||
nomul((ACURR(A_WIS) > 12 || rn2(4)) ? -tmp : -127);
|
||||
multi_reason = "frozen by a monster's gaze";
|
||||
nomovemsg = 0;
|
||||
}
|
||||
} else {
|
||||
@@ -2366,6 +2368,7 @@ boolean wep_was_destroyed;
|
||||
You("are frozen by %s!", mon_nam(mon));
|
||||
nomovemsg = You_can_move_again;
|
||||
nomul(-tmp);
|
||||
multi_reason = "frozen by a monster";
|
||||
exercise(A_DEX, FALSE);
|
||||
}
|
||||
break;
|
||||
|
||||
+5
-5
@@ -2198,9 +2198,9 @@ right_side(row, left, right_mark, limits)
|
||||
int deeper; /* if TRUE, call self as needed */
|
||||
int result; /* set by q?_path() */
|
||||
register int i; /* loop counter */
|
||||
register char *rowp; /* row optimization */
|
||||
char *row_min; /* left most [used by macro set_min()] */
|
||||
char *row_max; /* right most [used by macro set_max()] */
|
||||
register char *rowp = NULL; /* row optimization */
|
||||
char *row_min = NULL; /* left most [used by macro set_min()] */
|
||||
char *row_max = NULL; /* right most [used by macro set_max()] */
|
||||
int lim_max; /* right most limit of circle */
|
||||
|
||||
#ifdef GCC_WARN
|
||||
@@ -2374,8 +2374,8 @@ left_side(row, left_mark, right, limits)
|
||||
{
|
||||
int left, left_edge, nrow, deeper, result;
|
||||
register int i;
|
||||
register char *rowp;
|
||||
char *row_min, *row_max;
|
||||
register char *rowp = NULL;
|
||||
char *row_min = NULL, *row_max = NULL;
|
||||
int lim_min;
|
||||
|
||||
#ifdef GCC_WARN
|
||||
|
||||
+2
-3
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 worn.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 worn.c $NHDT-Date: 1427580338 2015/03/28 22:05:38 $ $NHDT-Branch: master $:$NHDT-Revision: 1.35 $ */
|
||||
/* NetHack 3.5 worn.c $Date: 2013/11/05 00:57:56 $ $Revision: 1.32 $ */
|
||||
/* SCCS Id: @(#)worn.c 3.5 2009/02/28 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
@@ -57,6 +57,7 @@ long mask;
|
||||
uskin = obj;
|
||||
/* assert( !uarm ); */
|
||||
} else {
|
||||
if ((mask & W_ARMOR)) u.uroleplay.nudist = FALSE;
|
||||
for(wp = worn; wp->w_mask; wp++) if(wp->w_mask & mask) {
|
||||
oobj = *(wp->w_obj);
|
||||
if(oobj && !(oobj->owornmask & wp->w_mask))
|
||||
@@ -591,9 +592,7 @@ long flag;
|
||||
case W_ARMS: return uarms;
|
||||
case W_ARMG: return uarmg;
|
||||
case W_ARMF: return uarmf;
|
||||
#ifdef TOURIST
|
||||
case W_ARMU: return uarmu;
|
||||
#endif
|
||||
default:
|
||||
impossible("bad flag in which_armor");
|
||||
return 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 zap.c $NHDT-Date: 1426465444 2015/03/16 00:24:04 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.195 $ */
|
||||
/* NetHack 3.5 zap.c $NHDT-Date: 1427782839 2015/03/31 06:20:39 $ $NHDT-Branch: master $:$NHDT-Revision: 1.200 $ */
|
||||
/* NetHack 3.5 zap.c $Date: 2013/11/05 00:57:56 $ $Revision: 1.183 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1750,8 +1750,14 @@ struct obj *obj, *otmp;
|
||||
if (Is_box(obj)) (void) boxlock(obj, otmp);
|
||||
|
||||
if (obj_shudders(obj)) {
|
||||
boolean cover = ((obj == level.objects[u.ux][u.uy]) &&
|
||||
u.uundetected &&
|
||||
hides_under(youmonst.data));
|
||||
|
||||
if (cansee(obj->ox, obj->oy)) learn_it = TRUE;
|
||||
do_osshock(obj);
|
||||
/* eek - your cover might have been blown */
|
||||
if (cover) (void) hideunder(&youmonst);
|
||||
break;
|
||||
}
|
||||
obj = poly_obj(obj, STRANGE_OBJECT);
|
||||
@@ -1886,10 +1892,11 @@ struct obj *obj, *otmp;
|
||||
|
||||
/* returns nonzero if something was hit */
|
||||
int
|
||||
bhitpile(obj,fhito,tx,ty)
|
||||
bhitpile(obj, fhito, tx, ty, zz)
|
||||
struct obj *obj;
|
||||
int FDECL((*fhito), (OBJ_P,OBJ_P));
|
||||
int tx, ty;
|
||||
schar zz;
|
||||
{
|
||||
int hitanything = 0;
|
||||
register struct obj *otmp, *next_obj;
|
||||
@@ -1909,8 +1916,11 @@ bhitpile(obj,fhito,tx,ty)
|
||||
|
||||
poly_zapped = -1;
|
||||
for(otmp = level.objects[tx][ty]; otmp; otmp = next_obj) {
|
||||
/* Fix for polymorph bug, Tim Wright */
|
||||
next_obj = otmp->nexthere;
|
||||
/* for zap downwards, don't hit object poly'd hero is hiding under */
|
||||
if (zz > 0 && u.uundetected && otmp == level.objects[u.ux][u.uy]
|
||||
&& hides_under(youmonst.data)) continue;
|
||||
|
||||
hitanything += (*fhito)(otmp, obj);
|
||||
}
|
||||
if(poly_zapped >= 0)
|
||||
@@ -2562,7 +2572,7 @@ struct obj *obj; /* wand or spell */
|
||||
if (u.dz < 0) {
|
||||
You("probe towards the %s.", ceiling(x,y));
|
||||
} else {
|
||||
ptmp += bhitpile(obj, bhito, x, y);
|
||||
ptmp += bhitpile(obj, bhito, x, y, u.dz);
|
||||
You("probe beneath the %s.", surface(x,y));
|
||||
ptmp += display_binventory(x, y, TRUE);
|
||||
}
|
||||
@@ -2682,7 +2692,7 @@ struct obj *obj; /* wand or spell */
|
||||
|
||||
if (u.dz > 0) {
|
||||
/* zapping downward */
|
||||
(void) bhitpile(obj, bhito, x, y);
|
||||
(void) bhitpile(obj, bhito, x, y, u.dz);
|
||||
|
||||
/* subset of engraving effects; none sets `disclose' */
|
||||
if ((e = engr_at(x, y)) != 0 && e->engr_type != HEADSTONE) {
|
||||
@@ -2718,6 +2728,22 @@ struct obj *obj; /* wand or spell */
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (u.dz < 0) {
|
||||
/* zapping upward */
|
||||
|
||||
/* game flavor: if you're hiding under "something"
|
||||
* a zap upward should hit that "something".
|
||||
*/
|
||||
if (u.uundetected && hides_under(youmonst.data)) {
|
||||
int hitit = 0;
|
||||
otmp = level.objects[u.ux][u.uy];
|
||||
|
||||
if (otmp) hitit = bhito(otmp, obj);
|
||||
if (hitit) {
|
||||
(void) hideunder(&youmonst);
|
||||
disclose = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return disclose;
|
||||
@@ -3089,7 +3115,7 @@ struct obj **pobj; /* object tossed/used, set to NULL
|
||||
}
|
||||
}
|
||||
if(fhito) {
|
||||
if(bhitpile(obj,fhito,bhitpos.x,bhitpos.y))
|
||||
if(bhitpile(obj,fhito,bhitpos.x,bhitpos.y,0))
|
||||
range--;
|
||||
} else {
|
||||
if(weapon == KICKED_WEAPON &&
|
||||
@@ -3253,8 +3279,10 @@ int dx, dy;
|
||||
}
|
||||
tmp_at(bhitpos.x, bhitpos.y);
|
||||
delay_output();
|
||||
if(IS_SINK(levl[bhitpos.x][bhitpos.y].typ))
|
||||
if(IS_SINK(levl[bhitpos.x][bhitpos.y].typ)) {
|
||||
if (!Deaf) pline("Klonk!");
|
||||
break; /* boomerang falls on sink */
|
||||
}
|
||||
/* ct==0, initial position, we want next delta to be same;
|
||||
ct==5, opposite position, repeat delta undoes first one */
|
||||
if (ct % 5 != 0) i += (counterclockwise ? -1 : 1);
|
||||
|
||||
@@ -1 +1 @@
|
||||
*.p filter=NHtext merge=NHsubst
|
||||
*.p NHSUBST
|
||||
|
||||
@@ -1 +1 @@
|
||||
NHDeflts filter=NHtext merge=NHsubst
|
||||
NHDeflts NHSUBST
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*.BC filter=NHtext merge=NHsubst
|
||||
*.bat filter=NHtext merge=NHsubst
|
||||
Makefile.* filter=NHtext merge=NHsubst
|
||||
Install.* filter=NHtext merge=NHsubst
|
||||
*.BC NHSUBST
|
||||
*.bat NHSUBST
|
||||
Makefile.* NHSUBST
|
||||
Install.* NHSUBST
|
||||
|
||||
@@ -1 +1 @@
|
||||
Makefile.* filter=NHtext merge=NHsubst
|
||||
Makefile.* NHSUBST
|
||||
|
||||
@@ -1 +1 @@
|
||||
Makefile.* filter=NHtext merge=NHsubst
|
||||
Makefile.* NHSUBST
|
||||
|
||||
@@ -1 +1 @@
|
||||
Makefile.* filter=NHtext merge=NHsubst
|
||||
Makefile.* NHSUBST
|
||||
|
||||
@@ -1 +1 @@
|
||||
* filter=NHtext merge=NHsubst
|
||||
* NHSUBST
|
||||
|
||||
@@ -16,6 +16,7 @@ HACKDIR=$(PREFIX)/games/lib/$(GAME)dir
|
||||
SHELLDIR = $(PREFIX)/games
|
||||
|
||||
CFLAGS=-O -I../include -DNOTPARMDECL $(CFLAGS1) $(CFLAGS3)
|
||||
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\"
|
||||
CFLAGS1=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
|
||||
CFLAGS3=-DX11_GRAPHICS -DDEFAULT_WINDOW_SYS=\"X11\" -DNOTTYGRAPHICS
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ WIZARDS=root games
|
||||
# Uses the same syntax as the WIZARDS option above.
|
||||
#SHELLERS=
|
||||
|
||||
# Users allowed to use #exploremode. Same syntax as WIZARDS above.
|
||||
EXPLORERS=*
|
||||
|
||||
# Show debugging information originating from these source files.
|
||||
# Use '*' for all, or list source files separated by spaces.
|
||||
# Only available if game has been compiled with DEBUG.
|
||||
|
||||
@@ -1 +1 @@
|
||||
Makefile.* filter=NHtext merge=NHsubst
|
||||
Makefile.* NHSUBST
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
*.ce filter=NHtext merge=NHsubst
|
||||
*.mak filter=NHtext merge=NHsubst
|
||||
*.bat filter=NHtext merge=NHsubst
|
||||
*.ce NHSUBST
|
||||
*.mak NHSUBST
|
||||
*.bat NHSUBST
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Install.nt filter=NHtext merge=NHsubst
|
||||
Makefile.* filter=NHtext merge=NHsubst
|
||||
*.rc filter=NHtext merge=NHsubst
|
||||
*.bat filter=NHtext merge=NHsubst
|
||||
Install.nt NHSUBST
|
||||
Makefile.* NHSUBST
|
||||
*.rc NHSUBST
|
||||
*.bat NHSUBST
|
||||
|
||||
+106
-70
@@ -195,10 +195,6 @@ guilibs = $(winlibs)
|
||||
# Exe File Info.
|
||||
#==========================================
|
||||
|
||||
#
|
||||
# For the level compiler bits,
|
||||
# we just defer to win\win32\dgnstuff.mak
|
||||
# and win\win32\levstuff.mak
|
||||
#
|
||||
#
|
||||
# Optional high-quality BSD random number generation routines
|
||||
@@ -271,44 +267,90 @@ DLBFLG =
|
||||
#==========================================
|
||||
#==========================================
|
||||
|
||||
INCLDIR= /I..\include
|
||||
!IF "$(TARGET_CPU)" == ""
|
||||
TARGET_CPU=x86
|
||||
!ENDIF
|
||||
|
||||
!IF "$(_NMAKE_VER)" == "10.00.40219.01"
|
||||
CL2013=
|
||||
!ELSE
|
||||
! IF ($(VSVER) > 2010)
|
||||
CL2013=-sdl
|
||||
! ENDIF
|
||||
!ENDIF
|
||||
|
||||
ccommon= -c -nologo -D"_CONSOLE" -D"_CRT_NONSTDC_NO_DEPRECATE" -D"_CRT_SECURE_NO_DEPRECATE" \
|
||||
-D"_LIB" -D"_SCL_SECURE_NO_DEPRECATE" -D"_VC80_UPGRADE=0x0600" -D"DLB" -D"_MBCS" \
|
||||
-DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -D"NDEBUG" -D"YY_NO_UNISTD_H" -EHsc -fp:precise -Gd -GF -GS -Gy \
|
||||
$(CL2013) -WX- -Zc:forScope -Zc:wchar_t -Zi
|
||||
cdebug= -analyze- -D"_DEBUG" -Gm -MTd -RTC1 -Od
|
||||
crelease= -analyze- -D"_MBCS" -errorReport:prompt -GL -Gm- -MT -O2 -Ot -Ox -Oy
|
||||
|
||||
lcommon= /NOLOGO /INCREMENTAL:NO
|
||||
|
||||
!IF "$(DEBUGINFO)" == "Y"
|
||||
CDBGFLAG=-Zi
|
||||
LDBGFLAG=/debug
|
||||
cdebug = -Zi -Od
|
||||
ldebug = /DEBUG
|
||||
cflags1=$(ccommon) $(cdebug)
|
||||
lflags1=$(lcommon) $(ldebug)
|
||||
!ELSE
|
||||
CDBGFLAG=
|
||||
LDBGFLAG=
|
||||
ldebug =
|
||||
cdebug =
|
||||
ldebug=
|
||||
cflags1=$(ccomon) $(crelease)
|
||||
lflags1=$(lcommon) $(ldebug)
|
||||
!ENDIF
|
||||
|
||||
!IF ("$(ldebug)" != "")
|
||||
!IF ("$(ldebug)" != "/RELEASE")
|
||||
ldebug = /DEBUG
|
||||
!ENDIF
|
||||
lflags= $(lflags1)
|
||||
|
||||
!IF "$(TARGET_CPU)" == "x86"
|
||||
cflags = $(cflags1) -D_X86_=1 -DWIN32 -D_WIN32 -W3
|
||||
scall = -Gz
|
||||
|
||||
!ELSEIF "$(TARGET_CPU)" == "x64"
|
||||
cflags = $(cflags1) -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -W4
|
||||
scall =
|
||||
!ENDIF
|
||||
|
||||
!IF ("$(cdebug)" != "")
|
||||
!IF ("$(cdebug)" != "-Ox -DNDEBUG")
|
||||
cdebug = -Zi -Od
|
||||
!ENDIF
|
||||
!IF "$(_NMAKE_VER)" == "10.00.40219.01"
|
||||
cflags = $(cflags:-W4=-W3)
|
||||
!ENDIF
|
||||
|
||||
cflags2 = $(cflags:-W4=-W3)
|
||||
#More verbose below
|
||||
#cflags2 = $(cflags) -wd4131
|
||||
#cflags2 = $(cflags:-W4=-Wall)
|
||||
#More verbose warning output options below
|
||||
#cflags = $(cflags:-W4=-wd4131
|
||||
#cflags = $(cflags:-W4=-Wall)
|
||||
#cflags = $(cflags:-W3=-wd4131
|
||||
#cflags = $(cflags:-W3=-Wall)
|
||||
|
||||
# declarations for use on Intel x86 systems
|
||||
!IF "$(TARGET_CPU)" == "x86"
|
||||
DLLENTRY = @12
|
||||
!ENDIF
|
||||
|
||||
# declarations for use on AMD64 systems
|
||||
!IF "$(TARGET_CPU)" == "x64"
|
||||
DLLENTRY =
|
||||
!ENDIF
|
||||
|
||||
# for Windows applications
|
||||
conlflags = $(lflags) -subsystem:console,$(EXEVER)
|
||||
guilflags = $(lflags) -subsystem:windows,$(EXEVER)
|
||||
dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
|
||||
|
||||
# basic subsystem specific libraries, less the C Run-Time
|
||||
baselibs = kernel32.lib $(optlibs) $(winsocklibs) advapi32.lib
|
||||
winlibs = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib
|
||||
|
||||
# for Windows applications that use the C Run-Time libraries
|
||||
conlibs = $(baselibs)
|
||||
guilibs = $(winlibs)
|
||||
#
|
||||
|
||||
INCLDIR= /I..\include
|
||||
|
||||
#==========================================
|
||||
# Util builds
|
||||
#==========================================
|
||||
|
||||
cflagsUtil = $(cdebug) $(cflags2) $(INCLDIR) \
|
||||
$(WINPFLAG) $(DLBFLG)
|
||||
lflagsUtil = $(ldebug) $(lflags) $(conlibs)
|
||||
cflagsUtil = $(cflags) $(INCLDIR) $(WINPFLAG) $(DLBFLG)
|
||||
lflagsUtil = $(lflags) $(conlibs)
|
||||
|
||||
#==========================================
|
||||
# - Game build
|
||||
@@ -320,15 +362,13 @@ LIBS= user32.lib winmm.lib $(ZLIB)
|
||||
|
||||
!IF ("$(GRAPHICAL)"=="Y")
|
||||
|
||||
cflagsGame = $(cdebug) $(cflags2) $(guiflags) $(INCLDIR) \
|
||||
$(WINPFLAG) $(DLBFLG)
|
||||
lflagsGame = $(ldebug) $(lflags) $(guilibs) $(GAMEPDBFILE) $(GAMEMAPFILE)
|
||||
cflagsGame = $(cflags) $(guiflags) $(INCLDIR) $(WINPFLAG) $(DLBFLG)
|
||||
lflagsGame = $(lflags) $(guilibs) $(GAMEPDBFILE) $(GAMEMAPFILE)
|
||||
|
||||
!ELSE
|
||||
|
||||
cflagsGame = $(cdebug) $(cflags2) $(conflags) $(INCLDIR) \
|
||||
$(WINPFLAG) $(DLBFLG)
|
||||
lflagsGame = $(ldebug) $(lflags) $(conlibs) $(GAMEPDBFILE) $(GAMEMAPFILE)
|
||||
cflagsGame = $(cflags) $(conflags) $(INCLDIR) $(WINPFLAG) $(DLBFLG)
|
||||
lflagsGame = $(lflags) $(conlibs) $(GAMEPDBFILE) $(GAMEMAPFILE)
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -429,21 +469,15 @@ U = $(UTIL)^\
|
||||
# Utility Objects.
|
||||
#
|
||||
|
||||
MAKESRC = $(U)makedefs.c
|
||||
MAKESRC = $(U)makedefs.c
|
||||
|
||||
MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o
|
||||
MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o
|
||||
|
||||
#SPLEVOBJS = $(O)lev_yacc.o $(O)lev_lex.o $(O)lev_main.o \
|
||||
# $(O)alloc.o $(O)decl.o $(O)drawing.o \
|
||||
# $(O)monst.o $(O)objects.o $(O)panic.o
|
||||
|
||||
SPLEVOBJS = $(O)lev_yacc.o $(O)lev_lex.o $(O)lev_main.o \
|
||||
$(O)alloc.o $(O)decl.o $(O)drawing.o \
|
||||
$(O)monst.o $(O)objects.o $(O)panic.o
|
||||
|
||||
DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_lex.o $(O)dgn_main.o \
|
||||
$(O)alloc.o $(O)panic.o
|
||||
LEVCOMPOBJS = $(O)lev_yacc.o $(O)lev_lex.o $(O)lev_main.o \
|
||||
$(O)alloc.o $(O)decl.o $(O)drawing.o $(O)monst.o $(O)objects.o $(O)panic.o
|
||||
|
||||
DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_lex.o $(O)dgn_main.o \
|
||||
$(O)alloc.o $(O)panic.o
|
||||
|
||||
RECOVOBJS = $(O)recover.o
|
||||
|
||||
@@ -703,7 +737,7 @@ $(NHRES): $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico
|
||||
|
||||
$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(O)gamedir.tag $(WINDLLS)
|
||||
@if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
|
||||
@echo Linking....
|
||||
@echo Linking $@
|
||||
$(link) $(lflagsGame) /STACK:2048 $(LIBS) $(COMCTRL) -out:$@ @<<$(GAME).lnk
|
||||
$(ALLOBJ:^ =^
|
||||
) $(NHRES)
|
||||
@@ -781,12 +815,14 @@ $(GAMEDIR)\nhraykey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def
|
||||
# Makedefs Stuff
|
||||
#==========================================
|
||||
$(U)nhsizes.exe: $(O)nhsizes.o
|
||||
@echo Linking $@
|
||||
$(link) $(lflagsUtil) -out:$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o
|
||||
|
||||
$(O)nhsizes.o: $(CONFIG_H) nhsizes.c
|
||||
@$(CC) $(cflagsUtil) -Fo$@ nhsizes.c
|
||||
|
||||
$(U)makedefs.exe: $(MAKEOBJS)
|
||||
@echo Linking $@
|
||||
@$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(MAKEOBJS)
|
||||
|
||||
$(O)makedefs.o: $(CONFIG_H) $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\objclass.h \
|
||||
@@ -794,7 +830,7 @@ $(O)makedefs.o: $(CONFIG_H) $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\objcla
|
||||
$(U)makedefs.c
|
||||
@if not exist $(OBJ)\*.* echo creating directory $(OBJ)
|
||||
@if not exist $(OBJ)\*.* mkdir $(OBJ)
|
||||
$(CC) $(cflagsUtil) -Fo$@ $(U)makedefs.c
|
||||
@$(CC) $(cflagsUtil) -Fo$@ $(U)makedefs.c
|
||||
|
||||
#
|
||||
# date.h should be remade every time any of the source or include
|
||||
@@ -835,6 +871,7 @@ $(DAT)\bogusmon: $(DAT)\bogusmon.txt $(U)makedefs.exe
|
||||
#==========================================
|
||||
|
||||
$(U)uudecode.exe: $(O)uudecode.o
|
||||
@echo Linking $@
|
||||
@$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)uudecode.o
|
||||
|
||||
$(O)uudecode.o: $(SSYS)\uudecode.c
|
||||
@@ -890,24 +927,20 @@ $(WIN32)\splash.bmp: $(U)uudecode.exe $(WIN32)\splash.uu
|
||||
$(U)lev_yacc.c $(INCL)\lev_comp.h: $(U)lev_comp.y
|
||||
nmake -nologo -f ..\win\win32\levstuff.mak default
|
||||
|
||||
LEVCFLAGS=-c -nologo -DWIN32 -D_WIN32 -I$(INCL) -nologo -Z7 -Od -DDLB
|
||||
|
||||
$(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h $(U)lev_yacc.c
|
||||
$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_yacc.c
|
||||
@$(CC) $(cflagsUtil) -Fo$@ $(U)lev_yacc.c
|
||||
|
||||
$(O)lev_lex.o: $(HACK_H) $(INCL)\lev_comp.h $(SP_LEV_H) \
|
||||
$(O)lev_lex.o: $(HACK_H) $(INCL)\lev_comp.h $(SP_LEV_H) \
|
||||
$(U)lev_lex.c
|
||||
$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_lex.c
|
||||
@$(CC) $(cflagsUtil) -Fo$@ $(U)lev_lex.c
|
||||
|
||||
$(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H)
|
||||
$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_main.c
|
||||
$(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H)
|
||||
@$(CC) $(cflagsUtil) -Fo$@ $(U)lev_main.c
|
||||
|
||||
$(U)levcomp.exe: $(SPLEVOBJS)
|
||||
@echo Linking $@...
|
||||
echo $(link)
|
||||
echo $(lflagsUtil)
|
||||
$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
|
||||
$(SPLEVOBJS:^ =^
|
||||
$(U)levcomp.exe: $(LEVCOMPOBJS)
|
||||
@echo Linking $@
|
||||
@$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
|
||||
$(LEVCOMPOBJS:^ =^
|
||||
)
|
||||
<<
|
||||
|
||||
@@ -921,17 +954,17 @@ $(U)dgn_yacc.c $(INCL)\dgn_comp.h : $(U)dgn_comp.y
|
||||
nmake -nologo -f ..\win\win32\dgnstuff.mak default
|
||||
|
||||
$(O)dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h $(U)dgn_yacc.c
|
||||
@$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_yacc.c
|
||||
@$(CC) $(cflagsUtil) -Fo$@ $(U)dgn_yacc.c
|
||||
|
||||
$(O)dgn_lex.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h \
|
||||
$(U)dgn_lex.c
|
||||
@$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_lex.c
|
||||
@$(CC) $(cflagsUtil) -Fo$@ $(U)dgn_lex.c
|
||||
|
||||
$(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c
|
||||
@$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_main.c
|
||||
@$(CC) $(cflagsUtil) -Fo$@ $(U)dgn_main.c
|
||||
|
||||
$(U)dgncomp.exe: $(DGNCOMPOBJS)
|
||||
@echo Linking $@...
|
||||
@echo Linking $@
|
||||
@$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
|
||||
$(DGNCOMPOBJS:^ =^
|
||||
)
|
||||
@@ -989,6 +1022,7 @@ $(INCL)\win32api.h: $(MSWSYS)\win32api.h
|
||||
#==========================================
|
||||
|
||||
$(U)dlb_main.exe: $(DLBOBJ) $(O)dlb.o
|
||||
@echo Linking $@
|
||||
@$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
|
||||
$(O)dlb_main.o
|
||||
$(O)dlb.o
|
||||
@@ -1038,10 +1072,11 @@ nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \
|
||||
#==========================================
|
||||
|
||||
$(U)recover.exe: $(RECOVOBJS)
|
||||
@echo Linking $@
|
||||
$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(RECOVOBJS)
|
||||
|
||||
$(O)recover.o: $(CONFIG_H) $(U)recover.c $(INCL)\win32api.h
|
||||
$(CC) $(cflagsUtil) -Fo$@ $(U)recover.c
|
||||
@$(CC) $(cflagsUtil) -Fo$@ $(U)recover.c
|
||||
|
||||
#==========================================
|
||||
# Tile Mapping
|
||||
@@ -1052,6 +1087,7 @@ $(SRC)\tile.c: $(U)tilemap.exe
|
||||
@$(U)tilemap
|
||||
|
||||
$(U)tilemap.exe: $(O)tilemap.o
|
||||
@echo Linking $@
|
||||
@$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)tilemap.o
|
||||
|
||||
$(O)tilemap.o: $(WSHR)\tilemap.c $(HACK_H)
|
||||
@@ -1083,7 +1119,7 @@ $(O)tilete32.o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H)
|
||||
#==========================================
|
||||
|
||||
$(U)gif2txt.exe: $(GIFREADERS) $(TEXT_IO)
|
||||
@echo Linking $@...
|
||||
@echo Linking $@
|
||||
@$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
|
||||
$(GIFREADERS:^ =^
|
||||
)
|
||||
@@ -1092,7 +1128,7 @@ $(U)gif2txt.exe: $(GIFREADERS) $(TEXT_IO)
|
||||
<<
|
||||
|
||||
$(U)gif2tx32.exe: $(GIFREADERS32) $(TEXT_IO32)
|
||||
@echo Linking $@...
|
||||
@echo Linking $@
|
||||
@$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
|
||||
$(GIFREADERS32:^ =^
|
||||
)
|
||||
@@ -1101,7 +1137,7 @@ $(U)gif2tx32.exe: $(GIFREADERS32) $(TEXT_IO32)
|
||||
<<
|
||||
|
||||
$(U)txt2ppm.exe: $(PPMWRITERS) $(TEXT_IO)
|
||||
@echo Linking $@...
|
||||
@echo Linking $@
|
||||
@$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
|
||||
$(PPMWRITERS:^ =^
|
||||
)
|
||||
@@ -1123,7 +1159,7 @@ $(TILEBMP32):
|
||||
!ENDIF
|
||||
|
||||
$(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO)
|
||||
@echo Linking $@...
|
||||
@echo Linking $@
|
||||
@$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
|
||||
$(O)tile2bmp.o
|
||||
$(TEXT_IO:^ =^
|
||||
@@ -1131,7 +1167,7 @@ $(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO)
|
||||
<<
|
||||
|
||||
$(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32)
|
||||
@echo Linking $@...
|
||||
@echo Linking $@
|
||||
@$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
|
||||
$(O)til2bm32.o
|
||||
$(TEXT_IO32:^ =^
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
*.pl filter=NHtext merge=NHsubst
|
||||
*.[ly] filter=NHtext merge=NHsubst
|
||||
*.pl NHSUBST
|
||||
*.[ly] NHSUBST
|
||||
|
||||
+11
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 winmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 winmenu.c $NHDT-Date: 1427881480 2015/04/01 09:44:40 $ $NHDT-Branch: master $:$NHDT-Revision: 1.5 $ */
|
||||
/* NetHack 3.5 winmenu.c $Date: 2009/05/06 10:55:53 $ $Revision: 1.5 $ */
|
||||
/* SCCS Id: @(#)winmenu.c 3.5 1996/08/15 */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
@@ -206,6 +206,7 @@ menu_key(w, event, params, num_params)
|
||||
struct xwindow *wp;
|
||||
char ch;
|
||||
int count;
|
||||
boolean selected_something;
|
||||
|
||||
wp = find_widget(w);
|
||||
menu_info = wp->menu_information;
|
||||
@@ -218,6 +219,13 @@ menu_key(w, event, params, num_params)
|
||||
}
|
||||
|
||||
if (menu_info->is_active) { /* waiting for input */
|
||||
/* first check for an explicit selector match, so that it won't be
|
||||
overridden if it happens to duplicate a mapped menu command (':'
|
||||
to look inside a container vs ':' to select via search string) */
|
||||
for (curr = menu_info->curr_menu.base; curr; curr = curr->next)
|
||||
if (curr->identifier.a_void != 0 && curr->selector == ch)
|
||||
goto make_selection;
|
||||
|
||||
ch = map_menu_cmd(ch);
|
||||
if (ch == '\033') { /* quit */
|
||||
if (menu_info->counting) {
|
||||
@@ -294,7 +302,8 @@ menu_key(w, event, params, num_params)
|
||||
X11_nhbell();
|
||||
return;
|
||||
} else {
|
||||
boolean selected_something = FALSE;
|
||||
make_selection:
|
||||
selected_something = FALSE;
|
||||
for (count = 0, curr = menu_info->curr_menu.base; curr;
|
||||
curr = curr->next, count++)
|
||||
if (curr->identifier.a_void != 0 && curr->selector == ch) break;
|
||||
|
||||
+107
-24
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 termcap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 termcap.c $NHDT-Date: 1427756993 2015/03/30 23:09:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.15 $ */
|
||||
/* NetHack 3.5 termcap.c $Date: 2009/05/06 10:59:19 $ $Revision: 1.13 $ */
|
||||
/* SCCS Id: @(#)termcap.c 3.5 2007/12/12 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
@@ -809,10 +809,9 @@ cl_eos() /* free after Robert Viduya */
|
||||
extern char *tparm();
|
||||
#endif
|
||||
|
||||
# ifdef COLOR_BLACK /* trust include file */
|
||||
#undef COLOR_BLACK
|
||||
# else
|
||||
# ifndef COLOR_BLACK /* trust include file */
|
||||
# ifndef _M_UNIX /* guess BGR */
|
||||
#define COLOR_BLACK 0
|
||||
#define COLOR_BLUE 1
|
||||
#define COLOR_GREEN 2
|
||||
#define COLOR_CYAN 3
|
||||
@@ -821,6 +820,7 @@ extern char *tparm();
|
||||
#define COLOR_YELLOW 6
|
||||
#define COLOR_WHITE 7
|
||||
# else /* guess RGB */
|
||||
#define COLOR_BLACK 0
|
||||
#define COLOR_RED 1
|
||||
#define COLOR_GREEN 2
|
||||
#define COLOR_YELLOW 3
|
||||
@@ -830,43 +830,126 @@ extern char *tparm();
|
||||
#define COLOR_WHITE 7
|
||||
# endif
|
||||
# endif
|
||||
#define COLOR_BLACK COLOR_BLUE
|
||||
|
||||
const int ti_map[8] = {
|
||||
COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_YELLOW,
|
||||
COLOR_BLUE, COLOR_MAGENTA, COLOR_CYAN, COLOR_WHITE };
|
||||
/* Mapping data for the six terminfo colors that resolve to pairs of nethack
|
||||
* colors. Black and white are handled specially.
|
||||
*/
|
||||
const struct {int ti_color, nh_color, nh_bright_color;} ti_map[6] =
|
||||
{
|
||||
{COLOR_RED,CLR_RED,CLR_ORANGE},
|
||||
{COLOR_GREEN,CLR_GREEN,CLR_BRIGHT_GREEN},
|
||||
{COLOR_YELLOW,CLR_BROWN,CLR_YELLOW},
|
||||
{COLOR_BLUE,CLR_BLUE,CLR_BRIGHT_BLUE},
|
||||
{COLOR_MAGENTA,CLR_MAGENTA,CLR_BRIGHT_MAGENTA},
|
||||
{COLOR_CYAN,CLR_CYAN,CLR_BRIGHT_CYAN}
|
||||
};
|
||||
|
||||
static char nilstring[] = "";
|
||||
|
||||
static void
|
||||
init_hilite()
|
||||
{
|
||||
register int c;
|
||||
char *setf, *scratch;
|
||||
|
||||
for (c = 0; c < SIZE(hilites); c++)
|
||||
hilites[c] = nh_HI;
|
||||
hilites[CLR_GRAY] = hilites[NO_COLOR] = (char *)0;
|
||||
int md_len;
|
||||
|
||||
if (tgetnum("Co") < 8
|
||||
|| (MD == NULL) || (strlen(MD) == 0)
|
||||
|| ((setf = tgetstr("AF", (char **)0)) == (char *)0
|
||||
&& (setf = tgetstr("Sf", (char **)0)) == (char *)0))
|
||||
{
|
||||
/* Fallback when colors not available
|
||||
* It's arbitrary to collapse all colors except gray
|
||||
* together, but that's what the previous code did.
|
||||
*/
|
||||
hilites[CLR_BLACK] = nh_HI;
|
||||
hilites[CLR_RED] = nh_HI;
|
||||
hilites[CLR_GREEN] = nh_HI;
|
||||
hilites[CLR_BROWN] = nh_HI;
|
||||
hilites[CLR_BLUE] = nh_HI;
|
||||
hilites[CLR_MAGENTA] = nh_HI;
|
||||
hilites[CLR_CYAN] = nh_HI;
|
||||
hilites[CLR_GRAY] = nilstring;
|
||||
hilites[NO_COLOR] = nilstring;
|
||||
hilites[CLR_ORANGE] = nh_HI;
|
||||
hilites[CLR_BRIGHT_GREEN] = nh_HI;
|
||||
hilites[CLR_YELLOW] = nh_HI;
|
||||
hilites[CLR_BRIGHT_BLUE] = nh_HI;
|
||||
hilites[CLR_BRIGHT_MAGENTA] = nh_HI;
|
||||
hilites[CLR_BRIGHT_CYAN] = nh_HI;
|
||||
hilites[CLR_WHITE] = nh_HI;
|
||||
return;
|
||||
|
||||
for (c = 0; c < CLR_MAX / 2; c++) {
|
||||
scratch = tparm(setf, ti_map[c]);
|
||||
if (c != CLR_GRAY) {
|
||||
hilites[c] = (char *) alloc(strlen(scratch) + 1);
|
||||
Strcpy(hilites[c], scratch);
|
||||
}
|
||||
if (c != CLR_BLACK) {
|
||||
hilites[c|BRIGHT] = (char*) alloc(strlen(scratch)+strlen(MD)+1);
|
||||
Strcpy(hilites[c|BRIGHT], MD);
|
||||
Strcat(hilites[c|BRIGHT], scratch);
|
||||
}
|
||||
|
||||
md_len = strlen(MD);
|
||||
|
||||
c = 6;
|
||||
while (c--) {
|
||||
char *work;
|
||||
scratch = tparm(setf,ti_map[c].ti_color);
|
||||
work = (char *) alloc(strlen(scratch) + md_len + 1);
|
||||
Strcpy(work,MD);
|
||||
hilites[ti_map[c].nh_bright_color] = work;
|
||||
work += md_len;
|
||||
Strcpy(work,scratch);
|
||||
hilites[ti_map[c].nh_color] = work;
|
||||
}
|
||||
|
||||
scratch = tparm(setf,COLOR_WHITE);
|
||||
hilites[CLR_WHITE] = (char *) alloc(strlen(scratch) + md_len + 1);
|
||||
Strcpy(hilites[CLR_WHITE],MD);
|
||||
Strcat(hilites[CLR_WHITE],scratch);
|
||||
|
||||
hilites[CLR_GRAY] = nilstring;
|
||||
hilites[NO_COLOR] = nilstring;
|
||||
|
||||
if (iflags.wc2_darkgray) {
|
||||
/* On many terminals, esp. those using classic PC CGA/EGA/VGA
|
||||
* textmode, specifying "hilight" and "black" simultaneously
|
||||
* produces a dark shade of gray that is visible against a
|
||||
* black background. We can use it to represent black objects.
|
||||
*/
|
||||
scratch = tparm(setf,COLOR_BLACK);
|
||||
hilites[CLR_BLACK] = (char *) alloc(strlen(scratch) + md_len + 1);
|
||||
Strcpy(hilites[CLR_BLACK],MD);
|
||||
Strcat(hilites[CLR_BLACK],scratch);
|
||||
} else {
|
||||
/* But it's concievable that hilighted black-on-black could
|
||||
* still be invisible on many others. We substitute blue for
|
||||
* black.
|
||||
*/
|
||||
hilites[CLR_BLACK] = hilites[CLR_BLUE];
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
kill_hilite()
|
||||
{
|
||||
/* if colors weren't available, no freeing needed */
|
||||
if (hilites[CLR_BLACK] == nh_HI)
|
||||
return;
|
||||
|
||||
if (hilites[CLR_BLACK] != hilites[CLR_BLUE])
|
||||
free(hilites[CLR_BLACK]);
|
||||
|
||||
/* CLR_BLUE overlaps CLR_BRIGHT_BLUE, do not free */
|
||||
/* CLR_GREEN overlaps CLR_BRIGHT_GREEN, do not free */
|
||||
/* CLR_CYAN overlaps CLR_BRIGHT_CYAN, do not free */
|
||||
/* CLR_RED overlaps CLR_ORANGE, do not free */
|
||||
/* CLR_MAGENTA overlaps CLR_BRIGHT_MAGENTA, do not free */
|
||||
/* CLR_BROWN overlaps CLR_YELLOW, do not free */
|
||||
/* CLR_GRAY is static 'nilstring', do not free */
|
||||
/* NO_COLOR is static 'nilstring', do not free */
|
||||
free(hilites[CLR_BRIGHT_BLUE]);
|
||||
free(hilites[CLR_BRIGHT_GREEN]);
|
||||
free(hilites[CLR_BRIGHT_CYAN]);
|
||||
free(hilites[CLR_YELLOW]);
|
||||
free(hilites[CLR_ORANGE]);
|
||||
free(hilites[CLR_BRIGHT_MAGENTA]);
|
||||
free(hilites[CLR_WHITE]);
|
||||
}
|
||||
|
||||
|
||||
# else /* UNIX && TERMINFO */
|
||||
|
||||
# ifndef TOS
|
||||
@@ -1011,7 +1094,6 @@ init_hilite()
|
||||
# endif
|
||||
# endif /* TOS */
|
||||
}
|
||||
# endif /* UNIX */
|
||||
|
||||
static void
|
||||
kill_hilite()
|
||||
@@ -1029,6 +1111,7 @@ kill_hilite()
|
||||
# endif
|
||||
return;
|
||||
}
|
||||
# endif /* UNIX */
|
||||
#endif /* TEXTCOLOR */
|
||||
|
||||
|
||||
|
||||
+21
-6
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 wintty.c $NHDT-Date: 1426465444 2015/03/16 00:24:04 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.71 $ */
|
||||
/* NetHack 3.5 wintty.c $NHDT-Date: 1427667623 2015/03/29 22:20:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.75 $ */
|
||||
/* NetHack 3.5 wintty.c $Date: 2012/01/22 06:27:09 $ $Revision: 1.66 $ */
|
||||
/* Copyright (c) David Cohrs, 1991 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -56,7 +56,7 @@ struct window_procs tty_procs = {
|
||||
#if defined(SELECTSAVED)
|
||||
WC2_SELECTSAVED|
|
||||
#endif
|
||||
0L,
|
||||
WC2_DARKGRAY,
|
||||
tty_init_nhwindows,
|
||||
tty_player_selection,
|
||||
tty_askname,
|
||||
@@ -1391,10 +1391,11 @@ struct WinDesc *cw;
|
||||
{
|
||||
tty_menu_item *page_start, *page_end, *curr;
|
||||
long count;
|
||||
int n, curr_page, page_lines;
|
||||
int n, curr_page, page_lines, resp_len;
|
||||
boolean finished, counting, reset_count;
|
||||
char *cp, *rp, resp[QBUFSZ], gacc[QBUFSZ],
|
||||
*msave, *morestr;
|
||||
*msave, *morestr, really_morc;
|
||||
#define MENU_EXPLICIT_CHOICE 0x7f /* pseudo menu manipulation char */
|
||||
|
||||
curr_page = page_lines = 0;
|
||||
page_start = page_end = 0;
|
||||
@@ -1501,6 +1502,8 @@ struct WinDesc *cw;
|
||||
page_lines = 0;
|
||||
}
|
||||
*rp = 0;
|
||||
/* remember how many explicit menu choices there are */
|
||||
resp_len = (int)strlen(resp);
|
||||
|
||||
/* corner window - clear extra lines from last page */
|
||||
if (cw->offx) {
|
||||
@@ -1533,7 +1536,15 @@ struct WinDesc *cw;
|
||||
xwaitforspace(resp);
|
||||
}
|
||||
|
||||
morc = map_menu_cmd(morc);
|
||||
really_morc = morc; /* (only used with MENU_EXPLICIT_CHOICE */
|
||||
if ((rp = index(resp, morc)) != 0 && rp < resp + resp_len)
|
||||
/* explicit menu selection; don't override it if it also
|
||||
happens to match a mapped menu command (such as ':' to
|
||||
look inside a container vs ':' to search) */
|
||||
morc = MENU_EXPLICIT_CHOICE;
|
||||
else
|
||||
morc = map_menu_cmd(morc);
|
||||
|
||||
switch (morc) {
|
||||
case '0':
|
||||
/* special case: '0' is also the default ball class */
|
||||
@@ -1646,7 +1657,7 @@ struct WinDesc *cw;
|
||||
boolean on_curr_page = FALSE;
|
||||
int lineno = 0;
|
||||
tty_getlin("Search for:", tmpbuf);
|
||||
if (!tmpbuf || tmpbuf[0] == '\033') break;
|
||||
if (!tmpbuf[0] || tmpbuf[0] == '\033') break;
|
||||
Sprintf(searchbuf, "*%s*", tmpbuf);
|
||||
for (curr = cw->mlist; curr; curr = curr->next) {
|
||||
if (on_curr_page) lineno++;
|
||||
@@ -1664,6 +1675,9 @@ struct WinDesc *cw;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MENU_EXPLICIT_CHOICE:
|
||||
morc = really_morc;
|
||||
/*FALLTHRU*/
|
||||
default:
|
||||
if (cw->how == PICK_NONE || !index(resp, morc)) {
|
||||
/* unacceptable input received */
|
||||
@@ -1809,6 +1823,7 @@ tty_display_nhwindow(window, blocking)
|
||||
cw->offx = (uchar) (int)
|
||||
max((int) 10, (int) (ttyDisplay->cols - cw->maxcol - 1));
|
||||
#endif
|
||||
if(cw->offx < 0) cw->offx = 0;
|
||||
if(cw->type == NHW_MENU)
|
||||
cw->offy = 0;
|
||||
if(ttyDisplay->toplin == 1)
|
||||
|
||||
Reference in New Issue
Block a user