Merge branch 'master' into derek-farming
* master: (49 commits) Fix 'fetch' syntax, include sparkly 'git log' trick Show object symbols in menu headings Fix a memory leak on termination. ... Conflicts: include/obj.h src/do.c src/files.c src/hack.c src/invent.c src/mkobj.c src/mon.c src/objnam.c
This commit is contained in:
@@ -32,6 +32,8 @@ core
|
||||
Makefile
|
||||
|
||||
# Win32-specific ignores
|
||||
Debug/
|
||||
Release/
|
||||
binary/
|
||||
build/
|
||||
Nethack.sln
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
$NHDT-Date: 1426969026 2015/03/21 20:17:06 $ $NHDT-Branch: master $:$NHDT-Revision: 1.137 $
|
||||
code_features.txt
|
||||
|
||||
Developer-useful info about code features, assumptions, purpose,
|
||||
rationale, etc.
|
||||
|
||||
==============================================
|
||||
FEATURE_NOTICE Alerts for a Release
|
||||
|
||||
There is a code mechanism for alterting players to a change in behavior
|
||||
over prior versions of the game.
|
||||
|
||||
Here's how to do it:
|
||||
o Where the change in behavior needs to alert the player,
|
||||
- Add an 'if statement' to invoke the alert behavior
|
||||
if the condition is met, for example
|
||||
if (flags.suppress_alert < FEATURE_NOTICE_VER(3.6.0))
|
||||
pline("Note: and explain the change here.");
|
||||
- The example above will alert the users for a new feature
|
||||
added in 3.6.0 via a one-liner via pline(), but you
|
||||
could get more elaborate (just make sure it is all done
|
||||
in the 'if' code block..
|
||||
|
||||
Once the user finds the alert no longer useful, or becoming
|
||||
annoying, they can set the "suppress_alert" option.
|
||||
- The user can only set the suppress_alert to the current
|
||||
version, not future versions. That restriction is done
|
||||
so that the feature can be used for new things in new
|
||||
releases.
|
||||
- The suppression can be done interactively mid game with
|
||||
the 'O' command, or via
|
||||
OPTIONS=suppress_alert:3.6.0
|
||||
in the user's config file.
|
||||
|
||||
==============================================
|
||||
PREFIXES_IN_USE and NOCWD_ASSUMPTIONS
|
||||
|
||||
Those provide a storage mechanism for holding the paths to various different
|
||||
types of files. Those paths are stored in the fqn_prefix[] array. They are a
|
||||
mechanism for enabling separation of the different files that NetHack needs.
|
||||
|
||||
The prefixes are added to the beginning of file names by various routines in
|
||||
files.c immediately prior to opening one of the types of files that the game
|
||||
uses.
|
||||
|
||||
They aren't about config file options (although config file options would be
|
||||
one way to set non-default values for some of the paths in the fqn_prefix[]
|
||||
array). Obviously the very first path needed (now sysconfdir, previously
|
||||
configdir) isn't viable for setting via config file options, but the game
|
||||
still needs to hunt it down "someplace." When the "someplace" is figured
|
||||
out, that place (path) would be stored in fqn_prefix[SYSCONPREFIX]. How it
|
||||
gets stored in fqn_prefix[SYSCONPREFIX] is up to us as developers.
|
||||
|
||||
Any of the fqn_prefix[] entries can be set somehow. It could be done in port
|
||||
startup code; in options processing; in config file processing; by
|
||||
translating a system environment variable such as USERPROFILE; whatever
|
||||
you/we want. The point is that NOCWD_ASSUMPTIONS and PREFIXES_IN_USE are
|
||||
there to ensure that there is a place to store that path information. The
|
||||
code to *utilize* the information is already in files.c (see fqname()).
|
||||
|
||||
There is a fqn_prefix[] entry for holding the path to each of the following:
|
||||
PREFIX NAME
|
||||
0 HACKPREFIX hackdir
|
||||
1 LEVELPREFIX leveldir location to create level files
|
||||
2 SAVEPREFIX savedir location to create/read saved games
|
||||
3 BONESPREFIX bonesir location to create/read bones
|
||||
4 DATAPREFIX datadir location to read data.base etc.
|
||||
5 SCOREPREFIX scoredir location to read/write scorefile
|
||||
6 LOCKPREFIX lockdir location to create/read lock files
|
||||
7 SYSCONFPREFIX sysconfdir location to read SYSCF_FILE
|
||||
8 CONFIGPREFIX configdir location to read user configuration file
|
||||
9 TROUBLEPREFIX troubledir location to place panic files etc.
|
||||
|
||||
To recap, they are about enabling "different paths for different things", and
|
||||
separation of:
|
||||
- read-only stuff from read-write stuff.
|
||||
- sysadmin stuff from user-writeable stuff.
|
||||
etc.
|
||||
|
||||
=================== NEXT FEATURE ==========================
|
||||
|
||||
|
||||
|
||||
+29
-3
@@ -32,14 +32,23 @@ 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')
|
||||
|
||||
"nhadd" is the preferred syntax and will automatically update the source file
|
||||
headers with the latest date, branch, and version.
|
||||
|
||||
|
||||
[*] git commit [-a] [-m "text"]
|
||||
[*] git nhcommit [-a] [-m "text"]
|
||||
|
||||
Commits all staged changes (in the index) to this branch in your local repo
|
||||
from your current position.
|
||||
@@ -47,6 +56,9 @@ Including -a will 'git add' all eligible files before doing so.
|
||||
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.
|
||||
|
||||
|
||||
[*] git push [--all] [-u origin (branch)]
|
||||
|
||||
@@ -61,7 +73,7 @@ branch.
|
||||
|
||||
Without any parameters, unstages the changes for (filename) from the index;
|
||||
does not change the working tree. This is the equivalent of the command
|
||||
[*] git reset --mixed (filename); git reset --soft (filename) has no effect.
|
||||
git reset --mixed (filename); git reset --soft (filename) has no effect.
|
||||
|
||||
With --hard, unstages (filename) from the index and reverts (filename) in
|
||||
the working tree to the most recent commit.
|
||||
@@ -93,10 +105,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.
|
||||
|
||||
|
||||
@@ -160,6 +172,20 @@ you must commit them manually later (likely after you have edited them). This
|
||||
more accurately mimics the merge behavior of svn [and cvs?]
|
||||
|
||||
|
||||
[*] git stash [save | apply | list] <stashname>
|
||||
|
||||
save: Takes all changes in your working directory and 'stashes' them in a temporary
|
||||
holding area. Convenient if the command you're trying to run won't go unless
|
||||
you have a clean working dir; also convenient to move experimental changes
|
||||
between branches without needing to commit them.
|
||||
|
||||
apply: Replays the named stash onto your current working directory as though
|
||||
it were a patch. Does not delete the stash from the list.
|
||||
|
||||
list: Lists all of your stashed code blobs.
|
||||
|
||||
|
||||
|
||||
=======================================
|
||||
Typical workflows for common activities
|
||||
=======================================
|
||||
|
||||
+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
|
||||
|
||||
@@ -5,6 +5,9 @@ rip.xpm
|
||||
pet_mark.xbm
|
||||
quest.dat
|
||||
rumors
|
||||
bogusmon
|
||||
engrave
|
||||
epitaph
|
||||
x11tiles
|
||||
*.lev
|
||||
spec_levs
|
||||
|
||||
@@ -0,0 +1,481 @@
|
||||
# Hallucinatory monsters
|
||||
#
|
||||
#
|
||||
# prefix codes:
|
||||
# dash - female, personal name
|
||||
# underscore _ female, general name
|
||||
# plus + male, personal name
|
||||
# vertical bar | male, general name
|
||||
# equals = gender not specified, personal name
|
||||
|
||||
# misc.
|
||||
jumbo shrimp
|
||||
giant pigmy
|
||||
gnu
|
||||
killer penguin
|
||||
giant cockroach
|
||||
giant slug
|
||||
maggot
|
||||
pterodactyl
|
||||
tyrannosaurus rex
|
||||
basilisk
|
||||
beholder
|
||||
nightmare
|
||||
efreeti
|
||||
marid
|
||||
rot grub
|
||||
bookworm
|
||||
master lichen
|
||||
shadow
|
||||
hologram
|
||||
jester
|
||||
attorney
|
||||
sleazoid
|
||||
killer tomato
|
||||
amazon
|
||||
robot
|
||||
battlemech
|
||||
rhinovirus
|
||||
harpy
|
||||
lion-dog
|
||||
rat-ant
|
||||
Y2K bug
|
||||
angry mariachi
|
||||
arch-pedant
|
||||
bluebird of happiness
|
||||
cardboard golem
|
||||
duct tape golem
|
||||
diagonally moving grid bug
|
||||
evil overlord
|
||||
newsgroup troll
|
||||
ninja pirate zombie robot
|
||||
octarine dragon
|
||||
gonzo journalist
|
||||
lag monster
|
||||
loan shark
|
||||
possessed waffle iron
|
||||
poultrygeist
|
||||
stuffed raccoon puppet
|
||||
viking
|
||||
wee green blobbie
|
||||
wereplatypus
|
||||
hag of bolding
|
||||
blancmange
|
||||
raging nerd
|
||||
spelling bee
|
||||
land octopus
|
||||
frog prince
|
||||
pigasus
|
||||
_Semigorgon
|
||||
conventioneer
|
||||
large microbat
|
||||
small megabat
|
||||
uberhulk
|
||||
tofurkey
|
||||
+Dudley
|
||||
|
||||
# Quendor (Zork, &c.)
|
||||
grue
|
||||
Christmas-tree monster
|
||||
luck sucker
|
||||
paskald
|
||||
brogmoid
|
||||
dornbeast
|
||||
|
||||
# Moria
|
||||
Ancient Multi-Hued Dragon
|
||||
+Evil Iggy
|
||||
|
||||
# Rogue V5 http://rogue.rogueforge.net/vade-mecum/
|
||||
rattlesnake
|
||||
ice monster
|
||||
phantom
|
||||
quagga
|
||||
aquator
|
||||
griffin
|
||||
emu
|
||||
kestrel
|
||||
xeroc
|
||||
venus flytrap
|
||||
|
||||
# Wizardry
|
||||
creeping coins
|
||||
|
||||
# Greek legend
|
||||
hydra
|
||||
siren
|
||||
|
||||
# Monty Python
|
||||
killer bunny
|
||||
|
||||
# The Princess Bride
|
||||
rodent of unusual size
|
||||
|
||||
# Wallace & Gromit
|
||||
were-rabbit
|
||||
|
||||
# "Only you can prevent forest fires!
|
||||
+Smokey Bear
|
||||
|
||||
# Discworld
|
||||
Luggage
|
||||
|
||||
# Lord of the Rings
|
||||
Ent
|
||||
|
||||
# Xanth
|
||||
tangle tree
|
||||
nickelpede
|
||||
wiggle
|
||||
|
||||
# Lewis Carroll
|
||||
white rabbit
|
||||
snark
|
||||
|
||||
# Dr. Dolittle
|
||||
pushmi-pullyu
|
||||
|
||||
# The Smurfs
|
||||
smurf
|
||||
|
||||
# Star Trek
|
||||
tribble
|
||||
Klingon
|
||||
Borg
|
||||
|
||||
# Star Wars
|
||||
Ewok
|
||||
|
||||
# Tonari no Totoro
|
||||
Totoro
|
||||
|
||||
# Nausicaa
|
||||
ohmu
|
||||
|
||||
# Sailor Moon
|
||||
youma
|
||||
|
||||
# Pokemon (Meowth)
|
||||
nyaasu
|
||||
|
||||
# monster movies
|
||||
-Godzilla
|
||||
+King Kong
|
||||
|
||||
# old L of SH
|
||||
earthquake beast
|
||||
|
||||
# Robotech
|
||||
Invid
|
||||
|
||||
# The Terminator
|
||||
Terminator
|
||||
|
||||
# Bubblegum Crisis
|
||||
boomer
|
||||
|
||||
# Dr. Who ("Exterminate!")
|
||||
Dalek
|
||||
|
||||
# HGttG
|
||||
microscopic space fleet
|
||||
Ravenous Bugblatter Beast of Traal
|
||||
|
||||
# TMNT
|
||||
teenage mutant ninja turtle
|
||||
|
||||
# Usagi Yojimbo
|
||||
samurai rabbit
|
||||
|
||||
# Cerebus
|
||||
aardvark
|
||||
|
||||
# Little Shop of Horrors
|
||||
=Audrey II
|
||||
|
||||
# 50's rock 'n' roll
|
||||
witch doctor
|
||||
one-eyed one-horned flying purple people eater
|
||||
|
||||
# saccharine kiddy TV
|
||||
+Barney the dinosaur
|
||||
|
||||
# Angband
|
||||
+Morgoth
|
||||
|
||||
# Babylon 5
|
||||
Vorlon
|
||||
|
||||
# King Arthur
|
||||
questing beast
|
||||
|
||||
# Movie
|
||||
Predator
|
||||
|
||||
# common pest
|
||||
mother-in-law
|
||||
|
||||
# Actual creatures
|
||||
praying mantis
|
||||
beluga whale
|
||||
chicken
|
||||
coelacanth
|
||||
star-nosed mole
|
||||
lungfish
|
||||
slow loris
|
||||
sea cucumber
|
||||
tapeworm
|
||||
liger
|
||||
velociraptor
|
||||
corpulent porpoise
|
||||
|
||||
# european cryptids
|
||||
wolpertinger
|
||||
elwedritsche
|
||||
skvader
|
||||
+Nessie
|
||||
tatzelwurm
|
||||
dahu
|
||||
|
||||
# fictitious beasts
|
||||
dropbear
|
||||
wild haggis
|
||||
jackalope
|
||||
flying pig
|
||||
hippocampus
|
||||
hippogriff
|
||||
kelpie
|
||||
|
||||
# Unusually animate body parts
|
||||
bouncing eye
|
||||
floating nose
|
||||
wandering eye
|
||||
|
||||
# Computerese
|
||||
buffer overflow
|
||||
dangling pointer
|
||||
walking disk drive
|
||||
floating point
|
||||
regex engine
|
||||
netsplit
|
||||
wiki
|
||||
peer
|
||||
COBOL
|
||||
|
||||
# bugs
|
||||
bohrbug
|
||||
mandelbug
|
||||
schroedinbug
|
||||
heisenbug
|
||||
|
||||
# DooM
|
||||
cacodemon
|
||||
scrag
|
||||
|
||||
# MST3K
|
||||
+Crow T. Robot
|
||||
|
||||
# Items and stuff
|
||||
chess pawn
|
||||
chocolate pudding
|
||||
ooblecks
|
||||
terracotta warrior
|
||||
hearse
|
||||
roomba
|
||||
miniature blimp
|
||||
dust speck
|
||||
|
||||
# DnD monster
|
||||
gazebo
|
||||
|
||||
# SciFi elements
|
||||
gray goo
|
||||
magnetic monopole
|
||||
first category perpetual motion device
|
||||
|
||||
# Ultima
|
||||
+Lord British
|
||||
|
||||
# They Might Be Giants
|
||||
particle man
|
||||
|
||||
# Robot Finds Kitten
|
||||
kitten prospecting robot
|
||||
|
||||
# Typography
|
||||
guillemet
|
||||
solidus
|
||||
obelus
|
||||
|
||||
# Their actual character
|
||||
apostrophe golem
|
||||
voluptuous ampersand
|
||||
|
||||
# Web comics and animation
|
||||
+Bob the angry flower
|
||||
+Strong Bad
|
||||
+Magical Trevor
|
||||
|
||||
# KoL
|
||||
one-winged dewinged stab-bat
|
||||
|
||||
# deities
|
||||
Invisible Pink Unicorn
|
||||
Flying Spaghetti Monster
|
||||
|
||||
# Monkey Island
|
||||
three-headed monkey
|
||||
+El Pollo Diablo
|
||||
|
||||
# modern folklore
|
||||
little green man
|
||||
|
||||
# Portal
|
||||
weighted Companion Cube
|
||||
|
||||
# /b/
|
||||
/b/tard
|
||||
|
||||
# South Park
|
||||
manbearpig
|
||||
|
||||
# internet memes
|
||||
bonsai-kitten
|
||||
tie-thulu
|
||||
+Domo-kun
|
||||
looooooooooooong cat
|
||||
nyan cat
|
||||
|
||||
# the Internet is made for cat pix
|
||||
ceiling cat
|
||||
basement cat
|
||||
monorail cat
|
||||
|
||||
# POWDER
|
||||
tridude
|
||||
|
||||
# Radomir Dopieralski
|
||||
orcus cosmicus
|
||||
|
||||
# Angband
|
||||
yeek
|
||||
quylthulg
|
||||
Greater Hell Beast
|
||||
|
||||
# Souljazz
|
||||
+Vendor of Yizard
|
||||
|
||||
# Dungeon Crawl Stone Soup
|
||||
+Sigmund
|
||||
lernaean hydra
|
||||
+Ijyb
|
||||
+Gloorx Vloq
|
||||
+Blork the orc
|
||||
|
||||
# Wil Wheaton, John Scalzi
|
||||
unicorn pegasus kitten
|
||||
|
||||
# Minecraft
|
||||
enderman
|
||||
|
||||
# Pun
|
||||
wight supremacist
|
||||
|
||||
# Starcraft 2
|
||||
zergling
|
||||
|
||||
# Feelings
|
||||
existential angst
|
||||
figment of your imagination
|
||||
flash of insight
|
||||
|
||||
# Fish
|
||||
ghoti
|
||||
|
||||
# Roald Dahl
|
||||
vermicious knid
|
||||
|
||||
# Carcassonne
|
||||
meeple
|
||||
|
||||
# The Wombles
|
||||
womble
|
||||
|
||||
# Fraggle Rock
|
||||
fraggle
|
||||
|
||||
# soundex and typos of monsters
|
||||
gloating eye
|
||||
flush golem
|
||||
martyr orc
|
||||
mortar orc
|
||||
acid blog
|
||||
acute blob
|
||||
aria elemental
|
||||
aliasing priest
|
||||
aligned parasite
|
||||
aligned parquet
|
||||
aligned proctor
|
||||
baby balky dragon
|
||||
baby blues dragon
|
||||
baby caricature
|
||||
baby crochet
|
||||
baby grainy dragon
|
||||
baby bong worm
|
||||
baby long word
|
||||
baby parable worm
|
||||
barfed devil
|
||||
beer wight
|
||||
boor wight
|
||||
brawny mold
|
||||
rave spider
|
||||
clue golem
|
||||
bust vortex
|
||||
errata elemental
|
||||
elastic eel
|
||||
electrocardiogram eel
|
||||
fir elemental
|
||||
tire elemental
|
||||
flamingo sphere
|
||||
fallacy golem
|
||||
frizzed centaur
|
||||
forest centerfold
|
||||
fierceness sphere
|
||||
frosted giant
|
||||
geriatric snake
|
||||
gnat ant
|
||||
giant bath
|
||||
grant beetle
|
||||
grind bug
|
||||
giant mango
|
||||
glossy golem
|
||||
gnome laureate
|
||||
gnome dummy
|
||||
gooier ooze
|
||||
green slide
|
||||
guardian nacho
|
||||
hell hound pun
|
||||
high purist
|
||||
hairnet devil
|
||||
ice trowel
|
||||
killer beet
|
||||
feather golem
|
||||
lounge worm
|
||||
mountain lymph
|
||||
pager golem
|
||||
pie fiend
|
||||
prophylactic worm
|
||||
sock mole
|
||||
rogue piercer
|
||||
seesawing sphere
|
||||
simile mimic
|
||||
moldier ant
|
||||
stain vortex
|
||||
scone giant
|
||||
umbrella hulk
|
||||
vampire mace
|
||||
verbal jabberwock
|
||||
water lemon
|
||||
water melon
|
||||
winged grizzly
|
||||
yellow wight
|
||||
@@ -0,0 +1,82 @@
|
||||
# Random engravings on the floor
|
||||
#
|
||||
Elbereth
|
||||
# trap engravings
|
||||
Vlad was here
|
||||
ad aerarium
|
||||
|
||||
# take-offs and other famous engravings
|
||||
Owlbreath
|
||||
Galadriel
|
||||
Kilroy was here
|
||||
|
||||
# Journey to the Center of the Earth
|
||||
A.S. ->
|
||||
<- A.S.
|
||||
# Adventure
|
||||
You won't get it up the steps
|
||||
# Inferno
|
||||
Lasciate ogni speranza o voi ch'entrate.
|
||||
# Prisoner
|
||||
Well Come
|
||||
# So Long...
|
||||
We apologize for the inconvenience.
|
||||
# Thriller
|
||||
See you next Wednesday
|
||||
# Smokey Stover
|
||||
notary sojak
|
||||
|
||||
For a good time call 8?7-5309
|
||||
# Various zoos around the world
|
||||
Please don't feed the animals.
|
||||
# A palindrome
|
||||
Madam, in Eden, I'm Adam.
|
||||
# Siskel & Ebert
|
||||
Two thumbs up!
|
||||
# The First C Program
|
||||
Hello, World!
|
||||
^?MAIL
|
||||
# AOL
|
||||
You've got mail!
|
||||
^.
|
||||
# Clueless
|
||||
As if!
|
||||
# 200x incarnation of Dr.Who
|
||||
BAD WOLF
|
||||
|
||||
# Gang tag
|
||||
Arooo! Werewolves of Yendor!
|
||||
|
||||
# Strategy and pun
|
||||
Dig for Victory here
|
||||
|
||||
# Pompeii
|
||||
Gaius Julius Primigenius was here. Why are you late?
|
||||
|
||||
# Helpful guiding
|
||||
Don't go this way
|
||||
Go left --->
|
||||
<--- Go right
|
||||
X marks the spot
|
||||
X <--- You are here.
|
||||
Here be dragons
|
||||
Save now, and do your homework!
|
||||
There was a hole here. It's gone now.
|
||||
The Vibrating Square
|
||||
This is a pit!
|
||||
This is not the dungeon you are looking for.
|
||||
Watch out, there's a gnome with a wand of death behind that door!
|
||||
|
||||
# Misc fun
|
||||
This square deliberately left blank.
|
||||
|
||||
# Viking graffiti
|
||||
Haermund Hardaxe carved these runes
|
||||
|
||||
# Advertising
|
||||
Need a light? Come visit the Minetown branch of Izchak's Lighting Store!
|
||||
Snakes on the Astral Plane - Soon in a dungeon near you
|
||||
You are the one millionth visitor to this place! Please wait 200 turns for your wand of wishing.
|
||||
|
||||
# DnD
|
||||
Warning, Exploding runes!
|
||||
+396
@@ -0,0 +1,396 @@
|
||||
# Epitaphs for random headstones
|
||||
#
|
||||
#
|
||||
Rest in peace
|
||||
R.I.P.
|
||||
Rest In Pieces
|
||||
Note -- there are NO valuable items in this grave
|
||||
1994-1995. The Longest-Lived Hacker Ever
|
||||
The Grave of the Unknown Hacker
|
||||
We weren't sure who this was, but we buried him here anyway
|
||||
Sparky -- he was a very good dog
|
||||
Beware of Electric Third Rail
|
||||
Made in Taiwan
|
||||
Og friend. Og good dude. Og died. Og now food
|
||||
Beetlejuice Beetlejuice Beetlejuice
|
||||
Look out below!
|
||||
Please don't dig me up. I'm perfectly happy down here. -- Resident
|
||||
Postman, please note forwarding address: Gehennom, Asmodeus's Fortress, fifth lemure on the left
|
||||
Mary had a little lamb/Its fleece was white as snow/When Mary was in trouble/The lamb was first to go
|
||||
Be careful, or this could happen to you!
|
||||
Soon you'll join this fellow in hell! -- the Wizard of Yendor
|
||||
Caution! This grave contains toxic waste
|
||||
Sum quod eris
|
||||
Here lies an Atheist, all dressed up and no place to go
|
||||
Here lies Ezekiel, age 102. The good die young.
|
||||
Here lies my wife: Here let her lie! Now she's at rest and so am I.
|
||||
Here lies Johnny Yeast. Pardon me for not rising.
|
||||
He always lied while on the earth and now he's lying in it
|
||||
I made an ash of myself
|
||||
Soon ripe. Soon rotten. Soon gone. But not forgotten.
|
||||
Here lies the body of Jonathan Blake. Stepped on the gas instead of the brake.
|
||||
Go away!
|
||||
Alas fair Death, 'twas missed in life - some peace and quiet from my wife
|
||||
Applaud, my friends, the comedy is finished.
|
||||
At last... a nice long sleep.
|
||||
Audi Partem Alteram
|
||||
Basil, assaulted by bears
|
||||
Burninated
|
||||
Confusion will be my epitaph
|
||||
Do not open until Christmas
|
||||
Don't be daft, they couldn't hit an elephant at this dist-
|
||||
Don't forget to stop and smell the roses
|
||||
Don't let this happen to you!
|
||||
Dulce et decorum est pro patria mori
|
||||
Et in Arcadia ego
|
||||
Fatty and skinny went to bed. Fatty rolled over and skinny was dead. Skinny Smith 1983-2000.
|
||||
Finally I am becoming stupider no more
|
||||
Follow me to hell
|
||||
...for famous men have the whole earth as their memorial
|
||||
Game over, man. Game over.
|
||||
Go away! I'm trying to take a nap in here! Bloody adventurers...
|
||||
Gone fishin'
|
||||
Good night, sweet prince: And flights of angels sing thee to thy rest!
|
||||
Go Team Ant!
|
||||
He farmed his way here
|
||||
Here lies a programmer. Killed by a fatal error.
|
||||
Here lies Bob - decided to try an acid blob
|
||||
Here lies Dudley, killed by another %&#@#& newt.
|
||||
Here lies Gregg, choked on an egg
|
||||
Here lies Lies. It's True
|
||||
Here lies The Lady's maid, died of a Vorpal Blade
|
||||
Here lies the left foot of Jack, killed by a land mine. Let us know if you find any more of him
|
||||
He waited too long
|
||||
I'd rather be sailing
|
||||
If a man's deeds do not outlive him, of what value is a mark in stone?
|
||||
I'm gonna make it!
|
||||
I took both pills!
|
||||
I will survive!
|
||||
Killed by a black dragon -- This grave is empty
|
||||
Let me out of here!
|
||||
Lookin' good, Medusa.
|
||||
Mrs. Smith, choked on an apple. She left behind grieving husband, daughter, and granddaughter.
|
||||
Nobody believed her when she said her feet were killing her
|
||||
No! I don't want to see my damn conduct!
|
||||
One corpse, sans head
|
||||
On the whole, I'd rather be in Minetown
|
||||
On vacation
|
||||
Oops.
|
||||
Out to Lunch
|
||||
SOLD
|
||||
Someone set us up the bomb!
|
||||
Take my stuff, I don't need it anymore
|
||||
Taking a year dead for tax reasons
|
||||
The reports of my demise are completely accurate
|
||||
(This space for sale)
|
||||
This was actually just a pit, but since there was a corpse, we filled it
|
||||
This way to the crypt
|
||||
Tu quoque, Brute?
|
||||
VACANCY
|
||||
Welcome!
|
||||
Wish you were here!
|
||||
Yea, it got me too
|
||||
You should see the other guy
|
||||
...and they made me engrave my own headstone too!
|
||||
...but the blood has stopped pumping and I am left to decay...
|
||||
<Expletive Deleted>
|
||||
A masochist is never satisfied.
|
||||
Ach, 'twas a wee monster in the loch
|
||||
Adapt. Enjoy. Survive.
|
||||
Adventure, hah! Excitement, hah!
|
||||
After all, what are friends for...
|
||||
After this, nothing will shock me
|
||||
After three days, fish and guests stink
|
||||
Age and treachery will always overcome youth and skill
|
||||
Ageing is not so bad. The real killer is when you stop.
|
||||
Ain't I a stinker?
|
||||
Algernon
|
||||
All else failed...
|
||||
All hail RNG
|
||||
All right, we'll call it a draw!
|
||||
All's well that end well
|
||||
Alone at last!
|
||||
Always attack a floating eye from behind!
|
||||
Am I having fun yet?
|
||||
And I can still crawl, I'm not dead yet!
|
||||
And all I wanted was a free lunch
|
||||
And all of the signs were right there on your face
|
||||
And don't give me that innocent look either!
|
||||
And everyone died. Boo hoo hoo.
|
||||
And here I go again...
|
||||
And nobody cares until somebody famous dies...
|
||||
And so it ends?
|
||||
And so... it begins.
|
||||
And sometimes the bear eats you.
|
||||
And then 'e nailed me 'ead to the floor!
|
||||
And they said it couldn't be done!
|
||||
And what do I look like? The living?
|
||||
And yes, it was ALL his fault!
|
||||
And you said it was pretty here...
|
||||
Another lost soul
|
||||
Any day above ground is a good day!
|
||||
Any more of this and I'll die of a stroke before I'm 30.
|
||||
Anybody seen my head?
|
||||
Anyone for deathmatch?
|
||||
Anything for a change.
|
||||
Anything that kills you makes you ... well, dead
|
||||
Anything worth doing is worth overdoing.
|
||||
Are unicorns supposedly peaceful if you're a virgin? Hah!
|
||||
Are we all being disintegrated, or is it just me?
|
||||
At least I'm good at something
|
||||
Attempted suicide
|
||||
Auri sacra fames
|
||||
Auribus teneo lupum
|
||||
Be prepared
|
||||
Beauty survives
|
||||
Been Here. Now Gone. Had a Good Time.
|
||||
Been through Hell, eh? What did you bring me?
|
||||
Beg your pardon, didn't recognize you, I've changed a lot.
|
||||
Being dead builds character
|
||||
Beloved daughter, a treasure, buried here.
|
||||
Best friends come and go... Mine just die.
|
||||
Better be dead than a fat slave
|
||||
Better luck next time
|
||||
Beware of Discordians bearing answers
|
||||
Beware the ...
|
||||
Bloody Hell...
|
||||
Bloody barbarians!
|
||||
Blown upward out of sight: He sought the leak by candlelight
|
||||
Brains... Brains... Fresh human brains...
|
||||
Buried the cat. Took an hour. Damn thing kept fighting.
|
||||
But I disarmed the trap!
|
||||
CONNECT 1964 - NO CARRIER 1994
|
||||
Call me if you need my phone number!
|
||||
Can YOU fly?
|
||||
Can you believe that thing is STILL moving?
|
||||
Can you come up with some better ending for this?
|
||||
Can you feel anything when I do this?
|
||||
Can you give me mouth to mouth, you just took my breath away.
|
||||
Can't I just have a LITTLE peril?
|
||||
Can't eat, can't sleep, had to bury the husband here.
|
||||
Can't you hit me?!
|
||||
Chaos, panic and disorder. My work here is done.
|
||||
Check enclosed.
|
||||
Check this out! It's my brain!
|
||||
Chivalry is only reasonably dead
|
||||
Coffin for sale. Lifetime guarantee.
|
||||
Come Monday, I'll be all right.
|
||||
Come and see the violence inherent in the system
|
||||
Come back here! I'll bite your bloody knees off!
|
||||
Commodore Business Machines, Inc. Died for our sins.
|
||||
Complain to one who can help you
|
||||
Confess my sins to god? Which one?
|
||||
Confusion will be my epitaph
|
||||
Cooties? Ain't no cooties on me!
|
||||
Could somebody get this noose off me?
|
||||
Could you check again? My name MUST be there.
|
||||
Could you please take a breath mint?
|
||||
Couldn't I be sedated for this?
|
||||
Courage is looking at your setbacks with serenity
|
||||
Cover me, I'm going in!
|
||||
Crash course in brain surgery
|
||||
Cross my fingers for me.
|
||||
Curse god and die
|
||||
Cut to fit
|
||||
De'Ath
|
||||
Dead Again? Pardon me for not getting it right the first time!
|
||||
Dead and loving every moment!
|
||||
Dear wife of mine. Died of a broken heart, after I took it out of her.
|
||||
Don't tread on me!
|
||||
Dragon? What dragon?
|
||||
Drawn and quartered
|
||||
Either I'm dead or my watch has stopped.
|
||||
Eliza -- Was I really alive, or did I just think I was?
|
||||
Elvis
|
||||
Enter not into the path of the wicked
|
||||
Eris? I don't need Eris
|
||||
Eternal Damnation, Come and stay a long while!
|
||||
Even The Dead pay taxes (and they aren't Grateful).
|
||||
Even a tomb stone will say good things when you're down!
|
||||
Ever notice that live is evil backwards?
|
||||
Every day is starting to look like Monday
|
||||
Every day, in every way, I am getting better and better.
|
||||
Every survival kit should include a sense of humor
|
||||
Evil I did dwell; lewd did I live
|
||||
Ex post fucto
|
||||
Excellent day to have a rotten day.
|
||||
Excuse me for not standing up.
|
||||
Experience isn't everything. First, You've got to survive
|
||||
First shalt thou pull out the Holy Pin
|
||||
For a Breath, I Tarry...
|
||||
For recreational use only.
|
||||
For sale: One soul, slightly used. Asking for 3 wishes.
|
||||
For some moments in life, there are no words.
|
||||
Forget Disney World, I'm going to Hell!
|
||||
Forget about the dog, Beware of my wife.
|
||||
Funeral - Real fun.
|
||||
Gawd, it's depressing in here, isn't it?
|
||||
Genuine Exploding Gravestone. (c)Acme Gravestones Inc.
|
||||
Get back here! I'm not finished yet...
|
||||
Go ahead, I dare you to!
|
||||
Go ahead, it's either you or him.
|
||||
Goldilocks -- This casket is just right
|
||||
Gone But Not Forgotten
|
||||
Gone Underground For Good
|
||||
Gone away owin' more than he could pay.
|
||||
Gone, but not forgiven
|
||||
Got a life. Didn't know what to do with it.
|
||||
Grave? But I was cremated!
|
||||
Greetings from Hell - Wish you were here.
|
||||
HELP! It's dark in here... Oh, my eyes are closed - sorry
|
||||
Ha! I NEVER pay income tax!
|
||||
Have you come to raise the dead?
|
||||
Having a good time can be deadly.
|
||||
Having a great time. Where am I exactly??
|
||||
He died of the flux.
|
||||
He died today... May we rest in peace!
|
||||
He got the upside, I got the downside.
|
||||
He lost his face when he was beheaded.
|
||||
He missed me first.
|
||||
He's not dead, he just smells that way.
|
||||
Help! I've fallen and I can't get up!
|
||||
Help, I can't wake up!
|
||||
Here lies Pinocchio
|
||||
Here lies the body of John Round. Lost at sea and never found.
|
||||
Here there be dragons
|
||||
Hey, I didn't write this stuff!
|
||||
Hodie mihi, cras tibi
|
||||
Hold my calls
|
||||
Home Sweet Hell
|
||||
Humpty Dumpty, a Bad Egg. He was pushed off the wall.
|
||||
I KNEW this would happen if I lived long enough.
|
||||
I TOLD you I was sick!
|
||||
I ain't broke but I am badly bent.
|
||||
I ain't old. I'm chronologically advantaged.
|
||||
I am NOT a vampire. I just like to bite..nibble, really!
|
||||
I am here. Wish you were fine.
|
||||
I am not dead yet, but watch for further reports.
|
||||
I believe them bones are me.
|
||||
I broke his brain.
|
||||
I can feel it. My mind. It's going. I can feel it.
|
||||
I can't go to Hell. They're afraid I'm gonna take over!
|
||||
I can't go to hell, they don't want me.
|
||||
I didn't believe in reincarnation the last time, either.
|
||||
I didn't mean it when I said 'Bite me'
|
||||
I died laughing
|
||||
I disbelieved in reincarnation in my last life, too.
|
||||
I hacked myself to death
|
||||
I have all the time in the world
|
||||
I knew I'd find a use for this gravestone!
|
||||
I know my mind. And it's around here someplace.
|
||||
I lied! I'll never be alright!
|
||||
I like it better in the dark.
|
||||
I like to be here when I can.
|
||||
I may rise but I refuse to shine.
|
||||
I never get any either.
|
||||
I said hit HIM with the fireball, not me!
|
||||
I told you I would never say goodbye.
|
||||
I used to be amusing. Now I'm just disgusting.
|
||||
I used up all my sick days, so now I'm calling in dead.
|
||||
I was killed by <illegible scrawl>
|
||||
I was somebody. Who, is no business of yours.
|
||||
I will not go quietly.
|
||||
I'd give you a piece of my mind... but I can't find it.
|
||||
I'd rather be breathing
|
||||
I'll be back!
|
||||
I'll be mellow when I'm dead. For now, let's PARTY!
|
||||
I'm doing this only for tax purposes.
|
||||
I'm not afraid of Death! What's he gonna do? Kill me?
|
||||
I'm not getting enough money, so I'm not going to engrave anything useful here.
|
||||
I'm not saying anything.
|
||||
I'm weeth stupeed --->
|
||||
If you thought you had problems...
|
||||
Ignorance kills daily.
|
||||
Ignore me... I'm just here for my looks!
|
||||
Ilene Toofar -- Fell off a cliff
|
||||
Is that all?
|
||||
Is there life before Death?
|
||||
Is this a joke, or a grave matter?
|
||||
It happens sometimes. People just explode.
|
||||
It must be Thursday. I never could get the hang of Thursdays.
|
||||
It wasn't a fair fight
|
||||
It wasn't so easy.
|
||||
It's Loot, Pillage and THEN Burn...
|
||||
Just doing my job here
|
||||
Killed by diarrhea of mouth and constipation of brain.
|
||||
Let her RIP
|
||||
Let it be; I am dead.
|
||||
Let's play Hide the Corpse
|
||||
Life is NOT a dream
|
||||
Madge Ination -- It wasn't all in my head
|
||||
Meet me in Heaven
|
||||
Move on, there's nothing to see here.
|
||||
Mr. Flintstone -- Yabba-dabba-done
|
||||
My heart is not in this
|
||||
No one ever died from it
|
||||
No, you want room 12A, next door.
|
||||
Nope. No trap on that chest. I swear.
|
||||
Not again!
|
||||
Not every soil can bear all things
|
||||
Now I have a life
|
||||
Now I lay thee down to sleep... wanna join me?
|
||||
OK, here is a question: Where ARE your tanlines?
|
||||
Obesa Cantavit
|
||||
Oh! An untimely death.
|
||||
Oh, by the way, how was my funeral?
|
||||
Oh, honey..I missed you! She said, and fired again.
|
||||
Ok, so the light does go off. Now let me out of here.
|
||||
One stone brain
|
||||
Ooh! Somebody STOP me!
|
||||
Oops!
|
||||
Out for the night. Leave a message.
|
||||
Ow! Do that again!
|
||||
Pardon my dust.
|
||||
Part of me still works.
|
||||
Please, not in front of those orcs!
|
||||
Prepare to meet me in Heaven
|
||||
R2D2 -- Rest, Tin Piece
|
||||
Relax. Nothing ever happens on the first level.
|
||||
Res omnia mea culpa est
|
||||
Rest In Pieces
|
||||
Rest, rest, perturbed spirit.
|
||||
Rip Torn
|
||||
She always said her feet were killing her but nobody believed her.
|
||||
She died of a chest cold.
|
||||
So let it be written, so let it be done!
|
||||
So then I says, How do I know you're the real angel of death?
|
||||
Some patients insist on dying.
|
||||
Some people have it dead easy, don't they?
|
||||
Some things are better left buried.
|
||||
Sure, trust me, I'm a lawyer...
|
||||
Thank God I wore my corset, because I think my sides have split.
|
||||
That is all
|
||||
The Gods DO have a sense of humor: I'm living proof!
|
||||
The frog's dead. He Kermitted suicide.
|
||||
This dungeon is a pushover
|
||||
This elevator doesn't go to Heaven
|
||||
This gravestone is shareware. To register, please send me 10 zorkmids
|
||||
This gravestone provided by The Yendorian Grave Services Inc.
|
||||
This is not an important part of my life.
|
||||
This one's on me.
|
||||
This side up
|
||||
Tim Burr -- Smashed by a tree
|
||||
Tone it down a bit, I'm trying to get some rest here.
|
||||
Virtually Alive
|
||||
We Will Meet Again.
|
||||
Weep not, he is at rest
|
||||
Welcome to Dante's. What level please?
|
||||
Well, at least they listened to my sermon...
|
||||
Went to be an angel.
|
||||
What are you doing over there?
|
||||
What are you smiling at?
|
||||
What can you say, Death's got appeal...!
|
||||
What health care?
|
||||
What pit?
|
||||
When the gods want to punish you, they answer your prayers.
|
||||
Where e'er you be let your wind go free. Keeping it in was the death of me!
|
||||
Where's my refund?
|
||||
Will let you know for sure in a day or two...
|
||||
Wizards are wimps
|
||||
Worms at work, do not disturb!
|
||||
Would you mind moving a bit? I'm short of breath down here.
|
||||
Would you quit being evil over my shoulder?
|
||||
Ya really had me going baby, but now I'm gone.
|
||||
Yes Dear, just a few more minutes...
|
||||
You said it wasn't poisonous!
|
||||
You set my heart aflame. You gave me heartburn.
|
||||
+102
-40
@@ -1,4 +1,4 @@
|
||||
NetHack History file for release 3.4
|
||||
NetHack History file for release 3.6
|
||||
|
||||
Behold, mortal, the origins of NetHack...
|
||||
|
||||
@@ -120,7 +120,6 @@ publicly 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.
|
||||
|
||||
|
||||
The 3.4 development team initially consisted of Michael Allison, Ken Arromdee,
|
||||
David Cohrs, Jessie Collet, Kevin Hugo, Ken Lorber, Dean Luick, Pat Rankin,
|
||||
Mike Stephenson, Janet Walz, and Paul Winner, with Warwick Allison joining
|
||||
@@ -150,7 +149,69 @@ Amiga port of 3.5 after Janne Salmijarvi resurrected it for 3.3.1.
|
||||
Christian `Marvin' Bressler maintained 3.5 for the Atari after he
|
||||
resurrected it for 3.3.1.
|
||||
|
||||
There is a NetHack web site maintained by Ken Lorber at http://www.nethack.org/.
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
In January 2015, preparation began for the release of NetHack 3.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.
|
||||
|
||||
3.6.0 <FIXME> - insert apprpriate description of 3.6.0 here
|
||||
|
||||
The development team, as well as Steve VanDevender and Kevin Smolkowski
|
||||
ensured that NetHack 3.6.0 continued to operate on various Unix flavors
|
||||
as well as maintaining the X11 interface.
|
||||
|
||||
Ken Lorber, Haoyang Wang, Pat Rankin, and Dean Luick maintained the port
|
||||
of NetHack 3.6.0 for Mac.
|
||||
|
||||
Michael Allison, Derek S. Ray, Yitzhak Sapir, Alex Kompel, and David Cohrs
|
||||
maintained the port of NetHack 3.6.0 for Microsoft Windows.
|
||||
|
||||
Jeff Bailey created and maintained a port of NetHack 3.6.0 for Chrome.
|
||||
|
||||
Alex Kompel maintained a port of NetHack 3.6.0 to Windows Phone. <FIXME>?
|
||||
|
||||
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 Terry Pratchett,
|
||||
passed away. This version of the game is dedicated to <FIXME>
|
||||
|
||||
|
||||
An official NetHack web site continues to be maintained by Ken Lorber at
|
||||
http://www.nethack.org/.
|
||||
|
||||
--
|
||||
SHOUT-OUTS
|
||||
|
||||
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.
|
||||
<FIXME> write up something for Robin, M. Drew Streib, Pasi Kallinen
|
||||
|
||||
- - - - - - - - - -
|
||||
|
||||
@@ -159,41 +220,42 @@ 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 Passaretti
|
||||
Alex Kompel J. Ali Harlow Mike Stephenson
|
||||
Andreas Dorn Janet Walz Norm Meluch
|
||||
Andy Church Janne Salmijarvi Olaf Seibert
|
||||
Andy Swanson Jean-Christophe Collet Pasi Kallinen
|
||||
Ari Huttunen Jochen Erwied Pat Rankin
|
||||
Barton House John Kallen Paul Winner
|
||||
Benson I. Margulies John Rupley Pierre Martineau
|
||||
Bill Dyer John S. Bien Ralf Brown
|
||||
Boudewijn Waijers Johnny Lee Ray Chason
|
||||
Bruce Cox Jon W{tte Richard Addison
|
||||
Bruce Holloway Jonathan Handler Richard Beigel
|
||||
Bruce Mewborne Joshua Delahunty Richard P. Hughey
|
||||
Carl Schelin Keizo Yamamoto Rob Menke
|
||||
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
|
||||
Deron Meranda Kevin Smolkowski Scott Bigham
|
||||
Dion Nicolaas Kevin Sweet Scott R. Turner
|
||||
Dylan O'Donnell Lars Huttar Stephen Spackman
|
||||
Eric Backus Leon Arnott 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
|
||||
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
|
||||
Ari Huttunen Jochen Erwied Paul Winner
|
||||
Barton House John Kallen Pierre Martineau
|
||||
Benson I. Margulies John Rupley Ralf Brown
|
||||
Bill Dyer John S. Bien Ray Chason
|
||||
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
|
||||
|
||||
|
||||
+46
-40
@@ -3,10 +3,10 @@
|
||||
.ds h0 "NetHack Guidebook
|
||||
.ds h1
|
||||
.ds h2 %
|
||||
.ds vr "NetHack 3.5
|
||||
.ds vr "NetHack 3.6
|
||||
.ds f0 "\*(vr
|
||||
.ds f1
|
||||
.ds f2 "April 7, 2012
|
||||
.ds f2 "March 16, 2015
|
||||
.\" labeled paragraph start (should be part of tmac.n, but I don't want to
|
||||
.\" make changes to that file)
|
||||
.\" .PS word
|
||||
@@ -58,7 +58,7 @@ A Guide to the Mazes of Menace
|
||||
(Guidebook for NetHack)
|
||||
.au
|
||||
Eric S. Raymond
|
||||
(Extensively edited and expanded for 3.5)
|
||||
(Edited and expanded for 3.6)
|
||||
.hn 1
|
||||
Introduction
|
||||
|
||||
@@ -2053,6 +2053,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 +2100,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.
|
||||
@@ -3205,43 +3210,44 @@ in this, the list of Dungeoneers:
|
||||
center;
|
||||
c c c.
|
||||
.\"TABLE_START
|
||||
Adam Aronow Izchak Miller Mike Passaretti
|
||||
Alex Kompel J. Ali Harlow Mike Stephenson
|
||||
Andreas Dorn Janet Walz Norm Meluch
|
||||
Andy Church Janne Salmijarvi Olaf Seibert
|
||||
Andy Swanson Jean-Christophe Collet Pasi Kallinen
|
||||
Ari Huttunen Jochen Erwied Pat Rankin
|
||||
Barton House John Kallen Paul Winner
|
||||
Benson I. Margulies John Rupley Pierre Martineau
|
||||
Bill Dyer John S. Bien Ralf Brown
|
||||
Boudewijn Waijers Johnny Lee Ray Chason
|
||||
Bruce Cox Jon W{tte Richard Addison
|
||||
Bruce Holloway Jonathan Handler Richard Beigel
|
||||
Bruce Mewborne Joshua Delahunty Richard P. Hughey
|
||||
Carl Schelin Keizo Yamamoto Rob Menke
|
||||
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
|
||||
Deron Meranda Kevin Smolkowski Scott Bigham
|
||||
Dion Nicolaas Kevin Sweet Scott R. Turner
|
||||
Dylan O'Donnell Lars Huttar Stephen Spackman
|
||||
Eric Backus Leon Arnott 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
|
||||
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
|
||||
Ari Huttunen Jochen Erwied Paul Winner
|
||||
Barton House John Kallen Pierre Martineau
|
||||
Benson I. Margulies John Rupley Ralf Brown
|
||||
Bill Dyer John S. Bien Ray Chason
|
||||
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
|
||||
.\"TABLE_END Do not delete this line.
|
||||
.TE
|
||||
|
||||
|
||||
+41
-40
@@ -33,7 +33,7 @@
|
||||
\begin{document}
|
||||
%
|
||||
% input file: guidebook.mn
|
||||
% $Revision: 1.121 $ $Date: 2012/04/09 02:56:37 $
|
||||
% $Revision: 1.122 $ $Date: 2015/03/16 06:00:00 $
|
||||
%
|
||||
%.ds h0 "
|
||||
%.ds h1 %.ds h2 \%
|
||||
@@ -45,8 +45,8 @@
|
||||
|
||||
%.au
|
||||
\author{Eric S. Raymond\\
|
||||
(Extensively edited and expanded for 3.5)}
|
||||
\date{April 7, 2012}
|
||||
(Edited and expanded for 3.6)}
|
||||
\date{March 16, 2015}
|
||||
|
||||
\maketitle
|
||||
|
||||
@@ -3801,43 +3801,44 @@ in this, the list of Dungeoneers:
|
||||
\begin{center}
|
||||
\begin{tabular}{lll}
|
||||
%TABLE_START
|
||||
Adam Aronow & Izchak Miller & Mike Passaretti\\
|
||||
Alex Kompel & J. Ali Harlow & Mike Stephenson\\
|
||||
Andreas Dorn & Janet Walz & Norm Meluch\\
|
||||
Andy Church & Janne Salmij\"{a}rvi & Olaf Seibert\\
|
||||
Andy Swanson & Jean-Christophe Collet & Pasi Kallinen\\
|
||||
Ari Huttunen & Jochen Erwied & Pat Rankin\\
|
||||
Barton House & John Kallen & Paul Winner\\
|
||||
Benson I. Margulies & John Rupley & Pierre Martineau\\
|
||||
Bill Dyer & John S. Bien & Ralf Brown\\
|
||||
Boudewijn Waijers & Johnny Lee & Ray Chason\\
|
||||
Bruce Cox & Jon W\{tte & Richard Addison\\
|
||||
Bruce Holloway & Jonathan Handler & Richard Beigel\\
|
||||
Bruce Mewborne & Joshua Delahunty & Richard P. Hughey\\
|
||||
Carl Schelin & Keizo Yamamoto & Rob Menke\\
|
||||
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\\
|
||||
Deron Meranda & Kevin Smolkowski & Scott Bigham\\
|
||||
Dion Nicolaas & Kevin Sweet & Scott R. Turner\\
|
||||
Dylan O'Donnell & Lars Huttar & Stephen Spackman\\
|
||||
Eric Backus & Leon Arnott & 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
|
||||
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\\
|
||||
Ari Huttunen & Jochen Erwied & Paul Winner\\
|
||||
Barton House & John Kallen & Pierre Martineau\\
|
||||
Benson I. Margulies & John Rupley & Ralf Brown\\
|
||||
Bill Dyer & John S. Bien & Ray Chason\\
|
||||
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
|
||||
%TABLE_END Do not delete this line.
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
||||
@@ -855,6 +855,7 @@ fix "object lost" panic (or even crash) when dropping multiple items while
|
||||
levitating and a lit potion of oil explodes and destroys some inventory
|
||||
fix "object_is_local" panic when saving bones after hero is killed by explosion
|
||||
produced by dropped or thrown lit potion of oil
|
||||
gold dropped on altar by hero wouldn't stack with gold dropped there by monster
|
||||
if lava burns up the player's water walking boots, the player falls in
|
||||
the messages for lava burning items up are always printed
|
||||
fix used-up magic trap trying to hit steed.
|
||||
@@ -878,6 +879,12 @@ 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
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
@@ -1088,6 +1095,7 @@ change command X to twoweapon toggle
|
||||
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
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific New Features
|
||||
@@ -1124,6 +1132,7 @@ adopt/adapt/improve the Paranoid_Quit patch; default is paranoid_confirm:pray
|
||||
paranoid_confirm:pray y to confirm #pray; supersedes prayconfirm
|
||||
paranoid_confirm:Remove always pick from inventory for 'R' and 'T'
|
||||
adopt/adapt/improve Dungeon Overview
|
||||
Aardvark Joe's Extended Logfile
|
||||
|
||||
|
||||
Code Cleanup and Reorganization
|
||||
|
||||
@@ -105,6 +105,15 @@ Generate the
|
||||
file.
|
||||
.br
|
||||
.TP
|
||||
.B -s
|
||||
Generate the
|
||||
.I bogusmon
|
||||
,
|
||||
.I engrave
|
||||
and
|
||||
.IR epitaph files.
|
||||
.br
|
||||
.TP
|
||||
.B -h
|
||||
Generate the
|
||||
.B oracles
|
||||
|
||||
@@ -187,6 +187,7 @@
|
||||
#endif
|
||||
|
||||
#define LOGFILE "logfile" /* larger file for debugging purposes */
|
||||
#define XLOGFILE "xlogfile" /* even larger logfile */
|
||||
#define NEWS "news" /* the file containing the latest hack news */
|
||||
#define PANICLOG "paniclog" /* log of panic and impossible events */
|
||||
|
||||
|
||||
+10
-3
@@ -67,6 +67,8 @@ E struct dgn_topology { /* special dungeon levels for speed */
|
||||
xchar d_mines_dnum, d_quest_dnum;
|
||||
d_level d_qstart_level, d_qlocate_level, d_nemesis_level;
|
||||
d_level d_knox_level;
|
||||
d_level d_mineend_level;
|
||||
d_level d_sokoend_level;
|
||||
} dungeon_topology;
|
||||
/* macros for accesing the dungeon levels by their old names */
|
||||
#define oracle_level (dungeon_topology.d_oracle_level)
|
||||
@@ -97,6 +99,8 @@ E struct dgn_topology { /* special dungeon levels for speed */
|
||||
#define qlocate_level (dungeon_topology.d_qlocate_level)
|
||||
#define nemesis_level (dungeon_topology.d_nemesis_level)
|
||||
#define knox_level (dungeon_topology.d_knox_level)
|
||||
#define mineend_level (dungeon_topology.d_mineend_level)
|
||||
#define sokoend_level (dungeon_topology.d_sokoend_level)
|
||||
|
||||
E NEARDATA stairway dnstair, upstair; /* stairs up and down */
|
||||
#define xdnstair (dnstair.sx)
|
||||
@@ -180,6 +184,7 @@ E NEARDATA struct kinfo {
|
||||
|
||||
E long done_money;
|
||||
E const char *configfile;
|
||||
E char lastconfigfile[BUFSZ]; /* used for messaging */
|
||||
E NEARDATA char plname[PL_NSIZ];
|
||||
E NEARDATA char dogname[];
|
||||
E NEARDATA char catname[];
|
||||
@@ -240,6 +245,7 @@ E NEARDATA anything zeroany; /* init'd and defined in decl.c */
|
||||
#include "you.h"
|
||||
E NEARDATA struct you u;
|
||||
E NEARDATA time_t ubirthday;
|
||||
E NEARDATA struct u_realtime urealtime;
|
||||
|
||||
#include "onames.h"
|
||||
#ifndef PM_H /* (pm.h has already been included via youprop.h) */
|
||||
@@ -357,9 +363,10 @@ E const char * const monexplain[], invisexplain[], * const oclass_names[];
|
||||
#define DATAPREFIX 4 /* this one must match hardcoded value in dlb.c */
|
||||
#define SCOREPREFIX 5
|
||||
#define LOCKPREFIX 6
|
||||
#define CONFIGPREFIX 7
|
||||
#define TROUBLEPREFIX 8
|
||||
#define PREFIX_COUNT 9
|
||||
#define SYSCONFPREFIX 7
|
||||
#define CONFIGPREFIX 8
|
||||
#define TROUBLEPREFIX 9
|
||||
#define PREFIX_COUNT 10
|
||||
/* used in files.c; xxconf.h can override if needed */
|
||||
# ifndef FQN_MAX_FILENAME
|
||||
#define FQN_MAX_FILENAME 512
|
||||
|
||||
@@ -122,6 +122,8 @@ typedef struct branch {
|
||||
#define Is_qlocate(x) (on_level(x, &qlocate_level))
|
||||
#define Is_nemesis(x) (on_level(x, &nemesis_level))
|
||||
#define Is_knox(x) (on_level(x, &knox_level))
|
||||
#define Is_mineend_level(x) (on_level(x, &mineend_level))
|
||||
#define Is_sokoend_level(x) (on_level(x, &sokoend_level))
|
||||
|
||||
#define In_sokoban(x) ((x)->dnum == sokoban_dnum)
|
||||
#define Inhell In_hell(&u.uz) /* now gehennom */
|
||||
|
||||
+15
-7
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 extern.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.390 $ */
|
||||
/* NetHack 3.5 extern.h $NHDT-Date: 1426966688 2015/03/21 19:38:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.411 $ */
|
||||
/* NetHack 3.5 extern.h $Date: 2013/11/05 00:57:53 $ $Revision: 1.380 $ */
|
||||
/* Copyright (c) Steve Creps, 1988. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -26,6 +26,7 @@ E void NDECL(stop_occupation);
|
||||
E void NDECL(display_gamewindows);
|
||||
E void NDECL(newgame);
|
||||
E void FDECL(welcome, (BOOLEAN_P));
|
||||
E time_t NDECL(get_realtime);
|
||||
|
||||
/* ### apply.c ### */
|
||||
|
||||
@@ -386,7 +387,7 @@ E char *FDECL(Adjmonnam, (struct monst *,const char *));
|
||||
E char *FDECL(Amonnam, (struct monst *));
|
||||
E char *FDECL(a_monnam, (struct monst *));
|
||||
E char *FDECL(distant_monnam, (struct monst *,int,char *));
|
||||
E const char *NDECL(rndmonnam);
|
||||
E char *FDECL(rndmonnam, (char *));
|
||||
E const char *FDECL(hcolor, (const char *));
|
||||
E const char *NDECL(rndcolor);
|
||||
E const char *NDECL(roguename);
|
||||
@@ -738,9 +739,15 @@ E void FDECL(free_saved_games, (char**));
|
||||
#ifdef SELF_RECOVER
|
||||
E boolean NDECL(recover_savefile);
|
||||
#endif
|
||||
#ifdef SYSCF_FILE
|
||||
E void NDECL(assure_syscf_file);
|
||||
#endif
|
||||
#ifdef HOLD_LOCKFILE_OPEN
|
||||
E void NDECL(really_close);
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
E boolean FDECL(showdebug, (const char *));
|
||||
#endif
|
||||
|
||||
/* ### fountain.c ### */
|
||||
|
||||
@@ -809,6 +816,7 @@ E void FDECL(copynchars, (char *,const char *,int));
|
||||
E char FDECL(chrcasecpy, (int,int));
|
||||
E char *FDECL(strcasecpy, (char *,const char *));
|
||||
E char *FDECL(s_suffix, (const char *));
|
||||
E char *FDECL(ing_suffix, (const char *));
|
||||
E char *FDECL(xcrypt, (const char *,char *));
|
||||
E boolean FDECL(onlyspace, (const char *));
|
||||
E char *FDECL(tabexpand, (char *));
|
||||
@@ -903,7 +911,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);
|
||||
@@ -1170,7 +1178,7 @@ E struct obj *FDECL(mkobj_at, (CHAR_P,int,int,BOOLEAN_P));
|
||||
E struct obj *FDECL(mksobj_at, (int,int,int,BOOLEAN_P,BOOLEAN_P));
|
||||
E struct obj *FDECL(mkobj, (CHAR_P,BOOLEAN_P));
|
||||
E int NDECL(rndmonnum);
|
||||
E boolean FDECL(bogon_is_pname, (const char *));
|
||||
E boolean FDECL(bogon_is_pname, (CHAR_P));
|
||||
E struct obj *FDECL(splitobj, (struct obj *,long));
|
||||
E void FDECL(replace_object, (struct obj *,struct obj *));
|
||||
E void FDECL(bill_dummy_object, (struct obj *));
|
||||
@@ -1930,6 +1938,7 @@ E const char *NDECL(Goodbye);
|
||||
/* ### rumors.c ### */
|
||||
|
||||
E char *FDECL(getrumor, (int,char *, BOOLEAN_P));
|
||||
E char *FDECL(get_rnd_text, (const char *, char *));
|
||||
E void FDECL(outrumor, (int,int));
|
||||
E void FDECL(outoracle, (BOOLEAN_P, BOOLEAN_P));
|
||||
E void FDECL(save_oracles, (int,int));
|
||||
@@ -2065,6 +2074,8 @@ E void FDECL(play_sound_for_message, (const char *));
|
||||
|
||||
/* ### sys.c ### */
|
||||
|
||||
E void NDECL(sys_early_init);
|
||||
E void NDECL(sysopt_release);
|
||||
E void FDECL(sysopt_seduce_set,(int));
|
||||
|
||||
/* ### sys/msdos/sound.c ### */
|
||||
@@ -2283,9 +2294,6 @@ E void NDECL(port_help);
|
||||
E void FDECL(sethanguphandler, (void (*)(int)));
|
||||
E boolean NDECL(authorize_wizard_mode);
|
||||
E boolean FDECL(check_user_string, (char *));
|
||||
# ifdef SYSCF_FILE
|
||||
E void NDECL(assure_syscf_file);
|
||||
# endif
|
||||
#endif /* UNIX */
|
||||
|
||||
/* ### unixtty.c ### */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#define OPTIONFILE "opthelp" /* file explaining runtime options */
|
||||
#define OPTIONS_USED "options" /* compile-time options, for #version */
|
||||
#define SYMBOLS "symbols" /* replacement symbol sets */
|
||||
#define EPITAPHFILE "epitaph" /* random epitaphs on graves */
|
||||
#define ENGRAVEFILE "engrave" /* random engravings on the floor */
|
||||
#define BOGUSMONFILE "bogusmon" /* hallucinatory monsters */
|
||||
#define LEV_EXT ".lev" /* extension for special level files */
|
||||
|
||||
|
||||
|
||||
+15
-25
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 hack.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 hack.h $NHDT-Date: 1426465431 2015/03/16 00:23:51 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.52 $ */
|
||||
/* NetHack 3.5 hack.h $Date: 2009/05/06 10:44:46 $ $Revision: 1.49 $ */
|
||||
/* SCCS Id: @(#)hack.h 3.5 2008/03/19 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
@@ -11,32 +11,22 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
/* [DEBUG shouldn't be defined unless you know what you're doing...] */
|
||||
#ifdef DEBUG
|
||||
/* due to strstr(), mon.c matches makemon.c */
|
||||
# define showdebug() (sysopt.debugfiles && \
|
||||
((sysopt.debugfiles[0] == '*') || \
|
||||
(strstr( __FILE__ , sysopt.debugfiles))))
|
||||
|
||||
/* GCC understands this syntax */
|
||||
# ifdef __GNUC__
|
||||
/* ... but whines about it anyway without these pragmas. */
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wvariadic-macros"
|
||||
# define debugpline(args...) \
|
||||
do { if (showdebug()) pline( args ); } while(0);
|
||||
# pragma GCC diagnostic pop
|
||||
# endif
|
||||
|
||||
/* and Visual Studio understands this one */
|
||||
# ifdef _MSC_VER
|
||||
# define debugpline(...) \
|
||||
do { if (showdebug()) pline(__VA_ARGS__); } while(0);
|
||||
# endif
|
||||
|
||||
# define ifdebug(stmt) do { if (showdebug(__FILE__)) stmt; } while (0)
|
||||
/* these don't require compiler support for C99 variadic macros */
|
||||
# define debugpline0(str) ifdebug(pline(str))
|
||||
# define debugpline1(fmt,arg) ifdebug(pline(fmt,arg))
|
||||
# define debugpline2(fmt,a1,a2) ifdebug(pline(fmt,a1,a2))
|
||||
# define debugpline3(fmt,a1,a2,a3) ifdebug(pline(fmt,a1,a2,a3))
|
||||
# define debugpline4(fmt,a1,a2,a3,a4) ifdebug(pline(fmt,a1,a2,a3,a4))
|
||||
#else
|
||||
# define showdebug() (0)
|
||||
# define debugpline(...)
|
||||
#endif
|
||||
# define debugpline0(str) /*empty*/
|
||||
# define debugpline1(fmt,arg) /*empty*/
|
||||
# define debugpline2(fmt,a1,a2) /*empty*/
|
||||
# define debugpline3(fmt,a1,a2,a3) /*empty*/
|
||||
# define debugpline4(fmt,a1,a2,a3,a4) /*empty*/
|
||||
#endif /*DEBUG*/
|
||||
|
||||
#define TELL 1
|
||||
#define NOTELL 0
|
||||
|
||||
+4
-1
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 ntconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 ntconf.h $NHDT-Date: 1426966690 2015/03/21 19:38:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.37 $ */
|
||||
/* NetHack 3.5 ntconf.h $Date: 2012/01/15 19:11:38 $ $Revision: 1.35 $ */
|
||||
/* SCCS Id: @(#)ntconf.h 3.5 2002/03/10 */
|
||||
/* Copyright (c) NetHack PC Development Team 1993, 1994. */
|
||||
@@ -25,6 +25,9 @@
|
||||
|
||||
#define SELF_RECOVER /* Allow the game itself to recover from an aborted game */
|
||||
|
||||
#define SYSCF /* Use a global configuration */
|
||||
#define SYSCF_FILE "sysconf" /* Use a file to hold the SYSCF configuration */
|
||||
|
||||
#define USER_SOUNDS
|
||||
|
||||
#ifdef WIN32CON
|
||||
|
||||
+4
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 obj.h $NHDT-Date: 1426470329 2015/03/16 01:45:29 $ $NHDT-Branch: derek-farming $:$NHDT-Revision: 1.35 $ */
|
||||
/* NetHack 3.5 obj.h $NHDT-Date: 1426949157 2015/03/21 14:45:57 $ $NHDT-Branch: master $:$NHDT-Revision: 1.36 $ */
|
||||
/* NetHack 3.5 obj.h $Date: 2012/01/10 17:47:16 $ $Revision: 1.31 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -107,8 +107,10 @@ struct obj {
|
||||
|
||||
int corpsenm; /* type of corpse is mons[corpsenm] */
|
||||
#define leashmon corpsenm /* gets m_id of attached pet */
|
||||
#define spestudied corpsenm /* # of times a spellbook has been studied */
|
||||
#define fromsink corpsenm /* a potion from a sink */
|
||||
#define record_achieve_special corpsenm
|
||||
int usecount; /* overloaded for various things that tally */
|
||||
#define spestudied usecount /* # of times a spellbook has been studied */
|
||||
unsigned oeaten; /* nutrition left in food, if partly eaten */
|
||||
long age; /* creation date */
|
||||
long owornmask;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 patchlevel.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 patchlevel.h $NHDT-Date: 1426948844 2015/03/21 14:40:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.95 $ */
|
||||
/* NetHack 3.5 patchlevel.h $Date: 2012/04/14 08:31:03 $ $Revision: 1.93 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -14,10 +14,10 @@
|
||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||
* and save files.
|
||||
*/
|
||||
#define EDITLEVEL 56
|
||||
#define EDITLEVEL 58
|
||||
|
||||
#define COPYRIGHT_BANNER_A \
|
||||
"NetHack, Copyright 1985-2012"
|
||||
"NetHack, Copyright 1985-2015"
|
||||
#define COPYRIGHT_BANNER_B \
|
||||
" By Stichting Mathematisch Centrum and M. Stephenson."
|
||||
/* COPYRIGHT_BANNER_C is generated by makedefs into date.h */
|
||||
|
||||
+8
-6
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 sys.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 sys.h $NHDT-Date: 1426544796 2015/03/16 22:26:36 $ $NHDT-Branch: master $:$NHDT-Revision: 1.13 $ */
|
||||
/* NetHack 3.5 sys.h $Date: 2012/01/27 20:15:26 $ $Revision: 1.9 $ */
|
||||
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -6,16 +6,17 @@
|
||||
#ifndef SYS_H
|
||||
#define SYS_H
|
||||
|
||||
#define E extern
|
||||
|
||||
E void NDECL(sys_early_init);
|
||||
|
||||
struct sysopt {
|
||||
char *support; /* local support contact */
|
||||
char *recover; /* how to run recover - may be overridden by win port */
|
||||
char *wizards;
|
||||
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")
|
||||
* so sysconf's DEBUGFILES shouldn't override it;
|
||||
* 0: getenv() hasn't been attempted yet;
|
||||
* -1: getenv() didn't find a value for DEBUGFILES.
|
||||
*/
|
||||
int maxplayers;
|
||||
/* record file */
|
||||
int persmax;
|
||||
@@ -34,7 +35,8 @@ struct sysopt {
|
||||
#endif
|
||||
int seduce;
|
||||
};
|
||||
E struct sysopt sysopt;
|
||||
|
||||
extern struct sysopt sysopt;
|
||||
|
||||
#define SYSOPT_SEDUCE sysopt.seduce
|
||||
|
||||
|
||||
@@ -53,6 +53,26 @@ struct u_event {
|
||||
Bitfield(ascended,1); /* has offered the Amulet */
|
||||
};
|
||||
|
||||
struct u_achieve {
|
||||
Bitfield(amulet,1); /* touched Amulet */
|
||||
Bitfield(bell,1); /* touched Bell */
|
||||
Bitfield(book,1); /* touched Book */
|
||||
Bitfield(menorah,1); /* touched Candelabrum */
|
||||
Bitfield(enter_gehennom,1); /* entered Gehennom (or Valley) by any means */
|
||||
Bitfield(ascended,1); /* not quite the same as u.uevent.ascended */
|
||||
Bitfield(mines_luckstone,1); /* got a luckstone at end of mines */
|
||||
Bitfield(finish_sokoban,1); /* obtained the sokoban prize */
|
||||
|
||||
Bitfield(killed_medusa,1);
|
||||
};
|
||||
|
||||
struct u_realtime {
|
||||
time_t realtime; /* actual playing time up until the last restore */
|
||||
time_t restored; /* time the game was started or restored */
|
||||
time_t endtime;
|
||||
};
|
||||
|
||||
|
||||
/* KMH, conduct --
|
||||
* These are voluntary challenges. Each field denotes the number of
|
||||
* times a challenge has been violated.
|
||||
@@ -306,6 +326,7 @@ struct you {
|
||||
/* 1 free bit! */
|
||||
|
||||
unsigned udg_cnt; /* how long you have been demigod */
|
||||
struct u_achieve uachieve; /* achievements */
|
||||
struct u_event uevent; /* certain events have happened */
|
||||
struct u_have uhave; /* you're carrying special objects */
|
||||
struct u_conduct uconduct; /* KMH, conduct */
|
||||
|
||||
@@ -533,6 +533,13 @@ newgame()
|
||||
#endif
|
||||
program_state.something_worth_saving++; /* useful data now exists */
|
||||
|
||||
urealtime.realtime = (time_t)0L;
|
||||
#if defined(BSD) && !defined(POSIX_TYPES)
|
||||
(void) time((long *)&urealtime.restored);
|
||||
#else
|
||||
(void) time(&urealtime.restored);
|
||||
#endif
|
||||
|
||||
/* Success! */
|
||||
welcome(TRUE);
|
||||
return;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 apply.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 apply.c $NHDT-Date: 1426465431 2015/03/16 00:23:51 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.173 $ */
|
||||
/* NetHack 3.5 apply.c $Date: 2012/05/01 02:22:32 $ $Revision: 1.168 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1770,7 +1770,7 @@ long timeout;
|
||||
char monnambuf[BUFSZ], carriedby[BUFSZ];
|
||||
|
||||
if (!figurine) {
|
||||
debugpline("null figurine in fig_transform()");
|
||||
debugpline0("null figurine in fig_transform()");
|
||||
return;
|
||||
}
|
||||
silent = (timeout != monstermoves); /* happened while away */
|
||||
|
||||
+13
-12
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 attrib.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 attrib.c $NHDT-Date: 1426465433 2015/03/16 00:23:53 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.34 $ */
|
||||
/* NetHack 3.5 attrib.c $Date: 2011/10/01 00:25:55 $ $Revision: 1.30 $ */
|
||||
/* Copyright 1988, 1989, 1990, 1992, M. Stephenson */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -347,7 +347,7 @@ exercise(i, inc_or_dec)
|
||||
int i;
|
||||
boolean inc_or_dec;
|
||||
{
|
||||
debugpline("Exercise:");
|
||||
debugpline0("Exercise:");
|
||||
if (i == A_INT || i == A_CHA) return; /* can't exercise these */
|
||||
|
||||
/* no physical exercise while polymorphed; the body's temporary */
|
||||
@@ -364,7 +364,7 @@ boolean inc_or_dec;
|
||||
* Note: *YES* ACURR is the right one to use.
|
||||
*/
|
||||
AEXE(i) += (inc_or_dec) ? (rn2(19) > ACURR(i)) : -rn2(2);
|
||||
debugpline("%s, %s AEXE = %d",
|
||||
debugpline3("%s, %s AEXE = %d",
|
||||
(i == A_STR) ? "Str" : (i == A_WIS) ? "Wis" :
|
||||
(i == A_DEX) ? "Dex" : "Con",
|
||||
(inc_or_dec) ? "inc" : "dec", AEXE(i));
|
||||
@@ -392,7 +392,7 @@ exerper()
|
||||
(u.uhunger > 50) ? HUNGRY :
|
||||
(u.uhunger > 0) ? WEAK : FAINTING;
|
||||
|
||||
debugpline("exerper: Hunger checks");
|
||||
debugpline0("exerper: Hunger checks");
|
||||
switch (hs) {
|
||||
case SATIATED: exercise(A_DEX, FALSE);
|
||||
if (Role_if(PM_MONK))
|
||||
@@ -408,7 +408,7 @@ exerper()
|
||||
}
|
||||
|
||||
/* Encumberance Checks */
|
||||
debugpline("exerper: Encumber checks");
|
||||
debugpline0("exerper: Encumber checks");
|
||||
switch (near_capacity()) {
|
||||
case MOD_ENCUMBER: exercise(A_STR, TRUE); break;
|
||||
case HVY_ENCUMBER: exercise(A_STR, TRUE);
|
||||
@@ -421,7 +421,7 @@ exerper()
|
||||
|
||||
/* status checks */
|
||||
if(!(moves % 5)) {
|
||||
debugpline("exerper: Status checks");
|
||||
debugpline0("exerper: Status checks");
|
||||
if ((HClairvoyant & (INTRINSIC|TIMEOUT)) &&
|
||||
!BClairvoyant) exercise(A_WIS, TRUE);
|
||||
if (HRegeneration) exercise(A_STR, TRUE);
|
||||
@@ -453,10 +453,10 @@ exerchk()
|
||||
exerper();
|
||||
|
||||
if(moves >= context.next_attrib_check)
|
||||
debugpline("exerchk: ready to test. multi = %d.", multi);
|
||||
debugpline1("exerchk: ready to test. multi = %d.", multi);
|
||||
/* Are we ready for a test? */
|
||||
if(moves >= context.next_attrib_check && !multi) {
|
||||
debugpline("exerchk: testing.");
|
||||
debugpline0("exerchk: testing.");
|
||||
/*
|
||||
* Law of diminishing returns (Part II):
|
||||
*
|
||||
@@ -483,7 +483,7 @@ exerchk()
|
||||
exercise/abuse gradually wears off without impact then */
|
||||
if (Upolyd && i != A_WIS) goto nextattrib;
|
||||
|
||||
debugpline("exerchk: testing %s (%d).",
|
||||
debugpline2("exerchk: testing %s (%d).",
|
||||
(i == A_STR) ? "Str" : (i == A_INT) ? "Int?" :
|
||||
(i == A_WIS) ? "Wis" : (i == A_DEX) ? "Dex" :
|
||||
(i == A_CON) ? "Con" : (i == A_CHA) ? "Cha?" : "???",
|
||||
@@ -497,9 +497,9 @@ exerchk()
|
||||
if (rn2(AVAL) > ((i != A_WIS) ? (abs(ax) * 2 / 3) : abs(ax)))
|
||||
goto nextattrib;
|
||||
|
||||
debugpline("exerchk: changing %d.", i);
|
||||
debugpline1("exerchk: changing %d.", i);
|
||||
if(adjattrib(i, mod_val, -1)) {
|
||||
debugpline("exerchk: changed %d.", i);
|
||||
debugpline1("exerchk: changed %d.", i);
|
||||
/* if you actually changed an attrib - zero accumulation */
|
||||
AEXE(i) = ax = 0;
|
||||
/* then print an explanation */
|
||||
@@ -513,7 +513,8 @@ exerchk()
|
||||
AEXE(i) = (abs(ax) / 2) * mod_val;
|
||||
}
|
||||
context.next_attrib_check += rn1(200,800);
|
||||
debugpline("exerchk: next check at %ld.", context.next_attrib_check);
|
||||
debugpline1("exerchk: next check at %ld.",
|
||||
context.next_attrib_check);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 bones.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 bones.c $NHDT-Date: 1426465433 2015/03/16 00:23:53 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.45 $ */
|
||||
/* NetHack 3.5 bones.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.39 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -584,7 +584,7 @@ getbones()
|
||||
if (has_mname(mtmp)) sanitize_name(MNAME(mtmp));
|
||||
if (mtmp->mhpmax == DEFUNCT_MONSTER) {
|
||||
if (wizard)
|
||||
debugpline("Removing defunct monster %s from bones.",
|
||||
debugpline1("Removing defunct monster %s from bones.",
|
||||
mtmp->data->mname);
|
||||
mongone(mtmp);
|
||||
} else
|
||||
|
||||
+26
-25
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 dbridge.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 dbridge.c $NHDT-Date: 1426465433 2015/03/16 00:23:53 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.23 $ */
|
||||
/* NetHack 3.5 dbridge.c $Date: 2012/02/01 00:49:16 $ $Revision: 1.21 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -267,7 +267,7 @@ int x, y;
|
||||
(occupants[entitycnt].ex == x) &&
|
||||
(occupants[entitycnt].ey == y))
|
||||
break;
|
||||
debugpline("entitycnt = %d", entitycnt);
|
||||
debugpline1("entitycnt = %d", entitycnt);
|
||||
#ifdef D_DEBUG
|
||||
wait_synch();
|
||||
#endif
|
||||
@@ -467,7 +467,7 @@ boolean chunks;
|
||||
int misses;
|
||||
|
||||
if (chunks)
|
||||
debugpline("Do chunks miss?");
|
||||
debugpline0("Do chunks miss?");
|
||||
if (automiss(etmp))
|
||||
return(TRUE);
|
||||
|
||||
@@ -487,7 +487,7 @@ boolean chunks;
|
||||
if (is_db_wall(etmp->ex, etmp->ey))
|
||||
misses -= 3; /* less airspace */
|
||||
|
||||
debugpline("Miss chance = %d (out of 8)", misses);
|
||||
debugpline1("Miss chance = %d (out of 8)", misses);
|
||||
|
||||
return((boolean)((misses >= rnd(8))? TRUE : FALSE));
|
||||
}
|
||||
@@ -516,7 +516,8 @@ struct entity *etmp;
|
||||
if (is_db_wall(etmp->ex, etmp->ey))
|
||||
tmp -= 2; /* less room to maneuver */
|
||||
|
||||
debugpline("%s to jump (%d chances in 10)", E_phrase(etmp, "try"), tmp);
|
||||
debugpline2("%s to jump (%d chances in 10)",
|
||||
E_phrase(etmp, "try"), tmp);
|
||||
return((boolean)((tmp >= rnd(10))? TRUE : FALSE));
|
||||
}
|
||||
|
||||
@@ -550,12 +551,11 @@ struct entity *etmp;
|
||||
pline_The("portcullis misses %s!",
|
||||
e_nam(etmp));
|
||||
else
|
||||
debugpline("The drawbridge misses %s!",
|
||||
e_nam(etmp));
|
||||
debugpline1("The drawbridge misses %s!", e_nam(etmp));
|
||||
if (e_survives_at(etmp, oldx, oldy))
|
||||
return;
|
||||
else {
|
||||
debugpline("Mon can't survive here");
|
||||
debugpline0("Mon can't survive here");
|
||||
if (at_portcullis)
|
||||
must_jump = TRUE;
|
||||
else
|
||||
@@ -574,7 +574,7 @@ struct entity *etmp;
|
||||
if (at_portcullis) {
|
||||
if (e_jumps(etmp)) {
|
||||
relocates = TRUE;
|
||||
debugpline("Jump succeeds!");
|
||||
debugpline0("Jump succeeds!");
|
||||
} else {
|
||||
if (e_inview)
|
||||
pline("%s crushed by the falling portcullis!",
|
||||
@@ -587,7 +587,7 @@ struct entity *etmp;
|
||||
}
|
||||
} else { /* tries to jump off bridge to original square */
|
||||
relocates = !e_jumps(etmp);
|
||||
debugpline("Jump %s!", (relocates)? "fails" : "succeeds");
|
||||
debugpline1("Jump %s!", (relocates)? "fails" : "succeeds");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -597,13 +597,13 @@ struct entity *etmp;
|
||||
* would be inaccessible (i.e. etmp started on drawbridge square) or
|
||||
* unnecessary (i.e. etmp started here) in such a situation.
|
||||
*/
|
||||
debugpline("Doing relocation.");
|
||||
debugpline0("Doing relocation.");
|
||||
newx = oldx;
|
||||
newy = oldy;
|
||||
(void)find_drawbridge(&newx, &newy);
|
||||
if ((newx == oldx) && (newy == oldy))
|
||||
get_wall_for_db(&newx, &newy);
|
||||
debugpline("Checking new square for occupancy.");
|
||||
debugpline0("Checking new square for occupancy.");
|
||||
if (relocates && (e_at(newx, newy))) {
|
||||
|
||||
/*
|
||||
@@ -614,22 +614,22 @@ struct entity *etmp;
|
||||
struct entity *other;
|
||||
|
||||
other = e_at(newx, newy);
|
||||
debugpline("New square is occupied by %s", e_nam(other));
|
||||
debugpline1("New square is occupied by %s", e_nam(other));
|
||||
if (e_survives_at(other, newx, newy) && automiss(other)) {
|
||||
relocates = FALSE; /* "other" won't budge */
|
||||
debugpline("%s suicide.", E_phrase(etmp, "commit"));
|
||||
debugpline1("%s suicide.", E_phrase(etmp, "commit"));
|
||||
} else {
|
||||
|
||||
debugpline("Handling %s", e_nam(other));
|
||||
debugpline1("Handling %s", e_nam(other));
|
||||
while ((e_at(newx, newy) != 0) &&
|
||||
(e_at(newx, newy) != etmp))
|
||||
do_entity(other);
|
||||
debugpline("Checking existence of %s", e_nam(etmp));
|
||||
debugpline1("Checking existence of %s", e_nam(etmp));
|
||||
#ifdef D_DEBUG
|
||||
wait_synch();
|
||||
#endif
|
||||
if (e_at(oldx, oldy) != etmp) {
|
||||
debugpline("%s moved or died in recursion somewhere",
|
||||
debugpline1("%s moved or died in recursion somewhere",
|
||||
E_phrase(etmp, "have"));
|
||||
#ifdef D_DEBUG
|
||||
wait_synch();
|
||||
@@ -639,7 +639,7 @@ struct entity *etmp;
|
||||
}
|
||||
}
|
||||
if (relocates && !e_at(newx, newy)) {/* if e_at() entity = worm tail */
|
||||
debugpline("Moving %s", e_nam(etmp));
|
||||
debugpline1("Moving %s", e_nam(etmp));
|
||||
if (!is_u(etmp)) {
|
||||
remove_monster(etmp->ex, etmp->ey);
|
||||
place_monster(etmp->emon, newx, newy);
|
||||
@@ -652,12 +652,12 @@ struct entity *etmp;
|
||||
etmp->ey = newy;
|
||||
e_inview = e_canseemon(etmp);
|
||||
}
|
||||
debugpline("Final disposition of %s", e_nam(etmp));
|
||||
debugpline1("Final disposition of %s", e_nam(etmp));
|
||||
#ifdef D_DEBUG
|
||||
wait_synch();
|
||||
#endif
|
||||
if (is_db_wall(etmp->ex, etmp->ey)) {
|
||||
debugpline("%s in portcullis chamber", E_phrase(etmp, "are"));
|
||||
debugpline1("%s in portcullis chamber", E_phrase(etmp, "are"));
|
||||
#ifdef D_DEBUG
|
||||
wait_synch();
|
||||
#endif
|
||||
@@ -678,9 +678,9 @@ struct entity *etmp;
|
||||
e_died(etmp, 0, CRUSHING); /* no message */
|
||||
return;
|
||||
}
|
||||
debugpline("%s in here", E_phrase(etmp, "survive"));
|
||||
debugpline1("%s in here", E_phrase(etmp, "survive"));
|
||||
} else {
|
||||
debugpline("%s on drawbridge square", E_phrase(etmp, "are"));
|
||||
debugpline1("%s on drawbridge square", E_phrase(etmp, "are"));
|
||||
if (is_pool(etmp->ex, etmp->ey) && !e_inview)
|
||||
if (!Deaf)
|
||||
You_hear("a splash.");
|
||||
@@ -691,7 +691,8 @@ struct entity *etmp;
|
||||
E_phrase(etmp, "fall"));
|
||||
return;
|
||||
}
|
||||
debugpline("%s cannot survive on the drawbridge square",E_phrase(etmp, NULL));
|
||||
debugpline1("%s cannot survive on the drawbridge square",
|
||||
E_phrase(etmp, NULL));
|
||||
if (is_pool(etmp->ex, etmp->ey) || is_lava(etmp->ex, etmp->ey))
|
||||
if (e_inview && !is_u(etmp)) {
|
||||
/* drown() will supply msgs if nec. */
|
||||
@@ -907,7 +908,7 @@ int x,y;
|
||||
if (etmp1->edata) {
|
||||
e_inview = e_canseemon(etmp1);
|
||||
if (e_missed(etmp1, TRUE)) {
|
||||
debugpline("%s spared!", E_phrase(etmp1, "are"));
|
||||
debugpline1("%s spared!", E_phrase(etmp1, "are"));
|
||||
/* if there is water or lava here, fall in now */
|
||||
if (is_u(etmp1))
|
||||
spoteffects(FALSE);
|
||||
@@ -925,7 +926,7 @@ int x,y;
|
||||
if (!Deaf && !is_u(etmp1) && !is_pool(x,y))
|
||||
You_hear("a crushing sound.");
|
||||
else
|
||||
debugpline("%s from shrapnel",
|
||||
debugpline1("%s from shrapnel",
|
||||
E_phrase(etmp1, "die"));
|
||||
}
|
||||
killer.format = KILLED_BY_AN;
|
||||
|
||||
+5
-2
@@ -136,6 +136,7 @@ NEARDATA struct sysflag sysflags = DUMMY;
|
||||
NEARDATA struct instance_flags iflags = DUMMY;
|
||||
NEARDATA struct you u = DUMMY;
|
||||
NEARDATA time_t ubirthday = DUMMY;
|
||||
NEARDATA struct u_realtime urealtime = DUMMY;
|
||||
|
||||
|
||||
schar lastseentyp[COLNO][ROWNO] = {DUMMY}; /* last seen/touched dungeon typ */
|
||||
@@ -267,12 +268,14 @@ char toplines[TBUFSZ];
|
||||
struct tc_gbl_data tc_gbl_data = { 0,0, 0,0 }; /* AS,AE, LI,CO */
|
||||
|
||||
char *fqn_prefix[PREFIX_COUNT] = { (char *)0, (char *)0, (char *)0, (char *)0,
|
||||
(char *)0, (char *)0, (char *)0, (char *)0, (char *)0 };
|
||||
(char *)0, (char *)0, (char *)0, (char *)0,
|
||||
(char *)0 , (char *)0 };
|
||||
|
||||
#ifdef PREFIXES_IN_USE
|
||||
char *fqn_prefix_names[PREFIX_COUNT] = { "hackdir", "leveldir", "savedir",
|
||||
"bonesdir", "datadir", "scoredir",
|
||||
"lockdir", "configdir", "troubledir" };
|
||||
"lockdir", "sysconfdir", "configdir",
|
||||
"troubledir" };
|
||||
#endif
|
||||
|
||||
NEARDATA struct savefile_info sfcap = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 dig.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 dig.c $NHDT-Date: 1426465434 2015/03/16 00:23:54 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.73 $ */
|
||||
/* NetHack 3.5 dig.c $Date: 2012/02/16 03:01:37 $ $Revision: 1.67 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1689,7 +1689,7 @@ bury_an_obj(otmp)
|
||||
struct obj *otmp2;
|
||||
boolean under_ice;
|
||||
|
||||
debugpline("bury_an_obj: %s", xname(otmp));
|
||||
debugpline1("bury_an_obj: %s", xname(otmp));
|
||||
if (otmp == uball) {
|
||||
unpunish();
|
||||
u.utrap = rn1(50,20);
|
||||
@@ -1752,7 +1752,7 @@ int x, y;
|
||||
struct obj *otmp, *otmp2;
|
||||
|
||||
if(level.objects[x][y] != (struct obj *)0)
|
||||
debugpline("bury_objs: at %d, %d", x, y);
|
||||
debugpline2("bury_objs: at <%d,%d>", x, y);
|
||||
for (otmp = level.objects[x][y]; otmp; otmp = otmp2)
|
||||
otmp2 = bury_an_obj(otmp);
|
||||
|
||||
@@ -1769,7 +1769,7 @@ int x, y;
|
||||
struct obj *otmp, *otmp2, *bball;
|
||||
coord cc;
|
||||
|
||||
debugpline("unearth_objs: at %d, %d", x, y);
|
||||
debugpline2("unearth_objs: at <%d,%d>", x, y);
|
||||
cc.x = x; cc.y = y;
|
||||
bball = buried_ball(&cc);
|
||||
for (otmp = level.buriedobjlist; otmp; otmp = otmp2) {
|
||||
@@ -1878,7 +1878,7 @@ void
|
||||
bury_monst(mtmp)
|
||||
struct monst *mtmp;
|
||||
{
|
||||
debugpline("bury_monst: %s", mon_nam(mtmp));
|
||||
debugpline1("bury_monst: %s", mon_nam(mtmp));
|
||||
if(canseemon(mtmp)) {
|
||||
if(is_flyer(mtmp->data) || is_floater(mtmp->data)) {
|
||||
pline_The("%s opens up, but %s is not swallowed!",
|
||||
@@ -1897,7 +1897,7 @@ struct monst *mtmp;
|
||||
void
|
||||
bury_you()
|
||||
{
|
||||
debugpline("bury_you");
|
||||
debugpline0("bury_you");
|
||||
if (!Levitation && !Flying) {
|
||||
if(u.uswallow)
|
||||
You_feel("a sensation like falling into a trap!");
|
||||
@@ -1914,7 +1914,7 @@ bury_you()
|
||||
void
|
||||
unearth_you()
|
||||
{
|
||||
debugpline("unearth_you");
|
||||
debugpline0("unearth_you");
|
||||
u.uburied = FALSE;
|
||||
under_ground(0);
|
||||
if(!uamul || uamul->otyp != AMULET_OF_STRANGULATION)
|
||||
@@ -1925,7 +1925,7 @@ unearth_you()
|
||||
void
|
||||
escape_tomb()
|
||||
{
|
||||
debugpline("escape_tomb");
|
||||
debugpline0("escape_tomb");
|
||||
if ((Teleportation || can_teleport(youmonst.data)) &&
|
||||
(Teleport_control || rn2(3) < Luck+2)) {
|
||||
You("attempt a teleport spell.");
|
||||
@@ -1957,7 +1957,7 @@ bury_obj(otmp)
|
||||
struct obj *otmp;
|
||||
{
|
||||
|
||||
debugpline("bury_obj");
|
||||
debugpline0("bury_obj");
|
||||
if(cansee(otmp->ox, otmp->oy))
|
||||
pline_The("objects on the %s tumble into a hole!",
|
||||
surface(otmp->ox, otmp->oy));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 do.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 do.c $NHDT-Date: 1426991040 2015/03/22 02:24:00 $ $NHDT-Branch: master $:$NHDT-Revision: 1.111 $ */
|
||||
/* NetHack 3.5 do.c $Date: 2014/11/18 03:10:39 $ $Revision: 1.101 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -230,10 +230,15 @@ doaltarobj(obj) /* obj is an object dropped on an altar */
|
||||
if (Blind)
|
||||
return;
|
||||
|
||||
/* KMH, conduct */
|
||||
u.uconduct.gnostic++;
|
||||
if (obj->oclass != COIN_CLASS) {
|
||||
/* KMH, conduct */
|
||||
u.uconduct.gnostic++;
|
||||
} else {
|
||||
/* coins don't have bless/curse status */
|
||||
obj->blessed = obj->cursed = 0;
|
||||
}
|
||||
|
||||
if ((obj->blessed || obj->cursed) && obj->oclass != COIN_CLASS) {
|
||||
if (obj->blessed || obj->cursed) {
|
||||
There("is %s flash as %s %s the altar.",
|
||||
an(hcolor(obj->blessed ? NH_AMBER : NH_BLACK)),
|
||||
doname(obj), otense(obj, "hit"));
|
||||
@@ -241,7 +246,7 @@ doaltarobj(obj) /* obj is an object dropped on an altar */
|
||||
} else {
|
||||
pline("%s %s on the altar.", Doname2(obj),
|
||||
otense(obj, "land"));
|
||||
obj->bknown = 1;
|
||||
if (obj->oclass != COIN_CLASS) obj->bknown = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1017,15 +1022,18 @@ boolean at_stairs, falling, portal;
|
||||
|
||||
/* If you have the amulet and are trying to get out of Gehennom, going
|
||||
* up a set of stairs sometimes does some very strange things!
|
||||
* Biased against law and towards chaos, but not nearly as strongly
|
||||
* as it used to be (prior to 3.2.0).
|
||||
* Odds: old new
|
||||
* "up" L N C "up" L N C
|
||||
* +1 75.0 75.0 75.0 +1 75.0 75.0 75.0
|
||||
* 0 0.0 12.5 25.0 0 6.25 8.33 12.5
|
||||
* -1 8.33 4.17 0.0 -1 6.25 8.33 12.5
|
||||
* -2 8.33 4.17 0.0 -2 6.25 8.33 0.0
|
||||
* -3 8.33 4.17 0.0 -3 6.25 0.0 0.0
|
||||
* Biased against law and towards chaos. (The chance to be sent
|
||||
* down multiple levels when attempting to go up are significantly
|
||||
* less than the corresponding comment in older versions indicated
|
||||
* due to overlooking the effect of the call to assign_rnd_lvl().)
|
||||
*
|
||||
* Odds for making it to the next level up, or of being sent down:
|
||||
* "up" L N C
|
||||
* +1 75.0 75.0 75.0
|
||||
* 0 6.25 8.33 12.5
|
||||
* -1 11.46 12.50 12.5
|
||||
* -2 5.21 4.17 0.0
|
||||
* -3 2.08 0.0 0.0
|
||||
*/
|
||||
if (Inhell && up && u.uhave.amulet && !newdungeon && !portal &&
|
||||
(dunlev(&u.uz) < dunlevs_in_dungeon(&u.uz)-3)) {
|
||||
@@ -1324,6 +1332,7 @@ boolean at_stairs, falling, portal;
|
||||
#endif
|
||||
You_hear("groans and moans everywhere.");
|
||||
} else pline("It is hot here. You smell smoke...");
|
||||
u.uachieve.enter_gehennom = 1;
|
||||
}
|
||||
/* in case we've managed to bypass the Valley's stairway down */
|
||||
if (Inhell && !Is_valley(&u.uz)) u.uevent.gehennom_entered = 1;
|
||||
|
||||
+49
-101
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 do_name.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 do_name.c $NHDT-Date: 1426558927 2015/03/17 02:22:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.53 $ */
|
||||
/* NetHack 3.5 do_name.c $Date: 2012/01/29 03:00:17 $ $Revision: 1.49 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -56,8 +56,8 @@ const char *goal;
|
||||
}
|
||||
|
||||
int
|
||||
getpos(cc, force, goal)
|
||||
coord *cc;
|
||||
getpos(ccp, force, goal)
|
||||
coord *ccp;
|
||||
boolean force;
|
||||
const char *goal;
|
||||
{
|
||||
@@ -75,8 +75,8 @@ const char *goal;
|
||||
pline("(For instructions type a ?)");
|
||||
msg_given = TRUE;
|
||||
}
|
||||
cx = cc->x;
|
||||
cy = cc->y;
|
||||
cx = ccp->x;
|
||||
cy = ccp->y;
|
||||
#ifdef CLIPPING
|
||||
cliparound(cx, cy);
|
||||
#endif
|
||||
@@ -97,6 +97,7 @@ const char *goal;
|
||||
int sym = 0;
|
||||
char tmpbuf[BUFSZ];
|
||||
const char *firstmatch = NULL;
|
||||
|
||||
cc.x = cx;
|
||||
cc.y = cy;
|
||||
if (do_screen_description(cc, TRUE, sym, tmpbuf, &firstmatch)) {
|
||||
@@ -203,9 +204,25 @@ const char *goal;
|
||||
lo_x = (pass == 0 && ty == lo_y) ? cx + 1 : 1;
|
||||
hi_x = (pass == 1 && ty == hi_y) ? cx : COLNO - 1;
|
||||
for (tx = lo_x; tx <= hi_x; tx++) {
|
||||
k = levl[tx][ty].glyph;
|
||||
/* look at dungeon feature, not at user-visible glyph */
|
||||
k = back_to_glyph(tx,ty);
|
||||
/* uninteresting background glyph */
|
||||
if (glyph_is_cmap(k) &&
|
||||
matching[glyph_to_cmap(k)]) {
|
||||
(IS_DOOR(levl[tx][ty].typ) ||
|
||||
glyph_to_cmap(k) == S_room ||
|
||||
glyph_to_cmap(k) == S_corr ||
|
||||
glyph_to_cmap(k) == S_litcorr)) {
|
||||
/* what the hero remembers to be at tx,ty */
|
||||
k = glyph_at(tx, ty);
|
||||
}
|
||||
if (glyph_is_cmap(k) &&
|
||||
matching[glyph_to_cmap(k)] &&
|
||||
levl[tx][ty].seenv &&
|
||||
(!IS_WALL(levl[tx][ty].typ)) &&
|
||||
(levl[tx][ty].typ != SDOOR) &&
|
||||
glyph_to_cmap(k) != S_room &&
|
||||
glyph_to_cmap(k) != S_corr &&
|
||||
glyph_to_cmap(k) != S_litcorr) {
|
||||
cx = tx, cy = ty;
|
||||
if (msg_given) {
|
||||
clear_nhwindow(WIN_MESSAGE);
|
||||
@@ -250,8 +267,8 @@ const char *goal;
|
||||
lock_mouse_cursor(FALSE);
|
||||
#endif
|
||||
if (msg_given) clear_nhwindow(WIN_MESSAGE);
|
||||
cc->x = cx;
|
||||
cc->y = cy;
|
||||
ccp->x = cx;
|
||||
ccp->y = cy;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -792,10 +809,10 @@ boolean called;
|
||||
/* Put the actual monster name or type into the buffer now */
|
||||
/* Be sure to remember whether the buffer starts with a name */
|
||||
if (do_hallu) {
|
||||
const char *rname = rndmonnam();
|
||||
|
||||
char rnamecode;
|
||||
char *rname = rndmonnam(&rnamecode);
|
||||
Strcat(buf, rname);
|
||||
name_at_start = bogon_is_pname(rname);
|
||||
name_at_start = bogon_is_pname(rnamecode);
|
||||
} else if (has_mname(mtmp)) {
|
||||
char *name = MNAME(mtmp);
|
||||
|
||||
@@ -989,113 +1006,44 @@ char *outbuf;
|
||||
return outbuf;
|
||||
}
|
||||
|
||||
/*
|
||||
* Name prefix codes (same as shknam.c):
|
||||
* dash - female, personal name
|
||||
* underscore _ female, general name
|
||||
* plus + male, personal name
|
||||
* vertical bar | male, general name
|
||||
* equals = gender not specified, personal name
|
||||
*/
|
||||
|
||||
static const char * const bogusmons[] = {
|
||||
"jumbo shrimp", "giant pigmy", "gnu", "killer penguin",
|
||||
"giant cockroach", "giant slug", "maggot", "pterodactyl",
|
||||
"tyrannosaurus rex", "basilisk", "beholder", "nightmare",
|
||||
"efreeti", "marid", "rot grub", "bookworm", "master lichen",
|
||||
"shadow", "hologram", "jester", "attorney", "sleazoid",
|
||||
"killer tomato", "amazon", "robot", "battlemech",
|
||||
"rhinovirus", "harpy", "lion-dog", "rat-ant", "Y2K bug",
|
||||
/* misc. */
|
||||
"grue", "Christmas-tree monster", "luck sucker", "paskald",
|
||||
"brogmoid", "dornbeast", /* Quendor (Zork, &c.) */
|
||||
"Ancient Multi-Hued Dragon", "+Evil Iggy",
|
||||
/* Moria */
|
||||
"emu", "kestrel", "xeroc", "venus flytrap",
|
||||
/* Rogue */
|
||||
"creeping coins", /* Wizardry */
|
||||
"hydra", "siren", /* Greek legend */
|
||||
"killer bunny", /* Monty Python */
|
||||
"rodent of unusual size", /* The Princess Bride */
|
||||
"were-rabbit", /* Wallace & Gromit */
|
||||
"+Smokey Bear", /* "Only you can prevent forest fires!" */
|
||||
"Luggage", /* Discworld */
|
||||
"Ent", /* Lord of the Rings */
|
||||
"tangle tree", "nickelpede", "wiggle", /* Xanth */
|
||||
"white rabbit", "snark", /* Lewis Carroll */
|
||||
"pushmi-pullyu", /* Dr. Dolittle */
|
||||
"smurf", /* The Smurfs */
|
||||
"tribble", "Klingon", "Borg", /* Star Trek */
|
||||
"Ewok", /* Star Wars */
|
||||
"Totoro", /* Tonari no Totoro */
|
||||
"ohmu", /* Nausicaa */
|
||||
"youma", /* Sailor Moon */
|
||||
"nyaasu", /* Pokemon (Meowth) */
|
||||
"-Godzilla", "+King Kong", /* monster movies */
|
||||
"earthquake beast", /* old L of SH */
|
||||
"Invid", /* Robotech */
|
||||
"Terminator", /* The Terminator */
|
||||
"boomer", /* Bubblegum Crisis */
|
||||
"Dalek", /* Dr. Who ("Exterminate!") */
|
||||
"microscopic space fleet", "Ravenous Bugblatter Beast of Traal",
|
||||
/* HGttG */
|
||||
"teenage mutant ninja turtle", /* TMNT */
|
||||
"samurai rabbit", /* Usagi Yojimbo */
|
||||
"aardvark", /* Cerebus */
|
||||
"=Audrey II", /* Little Shop of Horrors */
|
||||
"witch doctor", "one-eyed one-horned flying purple people eater",
|
||||
/* 50's rock 'n' roll */
|
||||
"+Barney the dinosaur", /* saccharine kiddy TV */
|
||||
"+Morgoth", /* Angband */
|
||||
"Vorlon", /* Babylon 5 */
|
||||
"questing beast", /* King Arthur */
|
||||
"Predator", /* Movie */
|
||||
"mother-in-law" /* common pest */
|
||||
};
|
||||
|
||||
|
||||
#define BOGUSMONSIZE 100 /* arbitrary */
|
||||
/* return a random monster name, for hallucination */
|
||||
const char *
|
||||
rndmonnam()
|
||||
char *
|
||||
rndmonnam(code)
|
||||
char *code;
|
||||
{
|
||||
const char *mname;
|
||||
static char buf[BUFSZ];
|
||||
char *mname = buf;
|
||||
int name;
|
||||
|
||||
if (code) *code = '\0';
|
||||
|
||||
do {
|
||||
name = rn1(SPECIAL_PM + SIZE(bogusmons) - LOW_PM, LOW_PM);
|
||||
name = rn1(SPECIAL_PM + BOGUSMONSIZE - LOW_PM, LOW_PM);
|
||||
} while (name < SPECIAL_PM &&
|
||||
(type_is_pname(&mons[name]) || (mons[name].geno & G_NOGEN)));
|
||||
|
||||
if (name >= SPECIAL_PM) {
|
||||
mname = bogusmons[name - SPECIAL_PM];
|
||||
get_rnd_text(BOGUSMONFILE, buf);
|
||||
/* strip prefix if present */
|
||||
if (!letter(*mname)) ++mname;
|
||||
if (!letter(*mname)) {
|
||||
if (code) *code = *mname;
|
||||
++mname;
|
||||
}
|
||||
} else {
|
||||
mname = mons[name].mname;
|
||||
Strcpy(buf, mons[name].mname);
|
||||
}
|
||||
return mname;
|
||||
}
|
||||
#undef BOGUSMONSIZE
|
||||
|
||||
/* scan bogusmons to check whether this name is in the list and has a prefix */
|
||||
boolean
|
||||
bogon_is_pname(mname)
|
||||
const char *mname;
|
||||
bogon_is_pname(code)
|
||||
char code;
|
||||
{
|
||||
const char *bname;
|
||||
int name;
|
||||
|
||||
if (!mname || !*mname) return FALSE;
|
||||
if (!strncmpi(mname, "the ", 4)) mname += 4;
|
||||
/* scan the bogusmons[] list; case sensitive here */
|
||||
for (name = 0; name < SIZE(bogusmons); name++) {
|
||||
bname = bogusmons[name];
|
||||
/* we can skip all ordinary entries */
|
||||
if (letter(*bname)) continue;
|
||||
/* starts with a classification code; does rest of name match? */
|
||||
if (!strcmp(mname, bname + 1))
|
||||
return index("-+=", *bname) ? TRUE : FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
if (!code) return FALSE;
|
||||
return index("-+=", code) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
const char *
|
||||
|
||||
+1
-1
@@ -391,7 +391,7 @@ Helmet_on(VOID_ARGS)
|
||||
properties, including levitation; uarmh could get
|
||||
dropped or destroyed here */
|
||||
uchangealign((u.ualign.type != A_NEUTRAL) ? -u.ualign.type :
|
||||
rn2(2) ? A_CHAOTIC : A_LAWFUL, 1);
|
||||
(uarmh->o_id % 2) ? A_CHAOTIC : A_LAWFUL, 1);
|
||||
/* makeknown(uarmh->otyp); -- moved below, after xname() */
|
||||
/*FALLTHRU*/
|
||||
case DUNCE_CAP:
|
||||
|
||||
+4
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 dungeon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 dungeon.c $NHDT-Date: 1426465434 2015/03/16 00:23:54 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.39 $ */
|
||||
/* NetHack 3.5 dungeon.c $Date: 2012/04/14 08:31:05 $ $Revision: 1.34 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -81,7 +81,7 @@ dumpit()
|
||||
s_level *x;
|
||||
branch *br;
|
||||
|
||||
if (!showdebug()) return;
|
||||
if (!showdebug(__FILE__)) return;
|
||||
|
||||
for(i = 0; i < n_dgns; i++) {
|
||||
fprintf(stderr, "\n#%d \"%s\" (%s):\n", i,
|
||||
@@ -672,6 +672,8 @@ struct level_map {
|
||||
{ "wizard1", &wiz1_level },
|
||||
{ "wizard2", &wiz2_level },
|
||||
{ "wizard3", &wiz3_level },
|
||||
{ "minend", &mineend_level },
|
||||
{ "soko1", &sokoend_level },
|
||||
{ X_START, &qstart_level },
|
||||
{ X_LOCATE, &qlocate_level },
|
||||
{ X_GOAL, &nemesis_level },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 eat.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 eat.c $NHDT-Date: 1426465435 2015/03/16 00:23:55 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.123 $ */
|
||||
/* NetHack 3.5 eat.c $Date: 2012/02/01 00:49:16 $ $Revision: 1.116 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -284,11 +284,11 @@ recalc_wt()
|
||||
{
|
||||
struct obj *piece = context.victual.piece;
|
||||
|
||||
debugpline("Old weight = %d", piece->owt);
|
||||
debugpline("Used time = %d, Req'd time = %d",
|
||||
context.victual.usedtime, context.victual.reqtime);
|
||||
debugpline1("Old weight = %d", piece->owt);
|
||||
debugpline2("Used time = %d, Req'd time = %d",
|
||||
context.victual.usedtime, context.victual.reqtime);
|
||||
piece->owt = weight(piece);
|
||||
debugpline("New weight = %d", piece->owt);
|
||||
debugpline1("New weight = %d", piece->owt);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -298,7 +298,7 @@ reset_eat() /* called when eating interrupted by an event */
|
||||
* the round is spent eating.
|
||||
*/
|
||||
if(context.victual.eating && !context.victual.doreset) {
|
||||
debugpline("reset_eat...");
|
||||
debugpline0("reset_eat...");
|
||||
context.victual.doreset = TRUE;
|
||||
}
|
||||
return;
|
||||
@@ -313,7 +313,7 @@ register struct obj *otmp;
|
||||
(void) splitobj(otmp, otmp->quan - 1L);
|
||||
else
|
||||
otmp = splitobj(otmp, 1L);
|
||||
debugpline("split object,");
|
||||
debugpline0("split object,");
|
||||
}
|
||||
|
||||
if (!otmp->oeaten) {
|
||||
@@ -374,7 +374,7 @@ struct obj *old_obj, *new_obj;
|
||||
STATIC_OVL void
|
||||
do_reset_eat()
|
||||
{
|
||||
debugpline("do_reset_eat...");
|
||||
debugpline0("do_reset_eat...");
|
||||
if (context.victual.piece) {
|
||||
context.victual.o_id = 0;
|
||||
context.victual.piece = touchfood(context.victual.piece);
|
||||
@@ -717,39 +717,39 @@ register struct permonst *ptr;
|
||||
switch (type) {
|
||||
case FIRE_RES:
|
||||
res = (ptr->mconveys & MR_FIRE) != 0;
|
||||
if (res) debugpline("can get fire resistance");
|
||||
if (res) debugpline0("can get fire resistance");
|
||||
break;
|
||||
case SLEEP_RES:
|
||||
res = (ptr->mconveys & MR_SLEEP) != 0;
|
||||
if (res) debugpline("can get sleep resistance");
|
||||
if (res) debugpline0("can get sleep resistance");
|
||||
break;
|
||||
case COLD_RES:
|
||||
res = (ptr->mconveys & MR_COLD) != 0;
|
||||
if (res) debugpline("can get cold resistance");
|
||||
if (res) debugpline0("can get cold resistance");
|
||||
break;
|
||||
case DISINT_RES:
|
||||
res = (ptr->mconveys & MR_DISINT) != 0;
|
||||
if (res) debugpline("can get disintegration resistance");
|
||||
if (res) debugpline0("can get disintegration resistance");
|
||||
break;
|
||||
case SHOCK_RES: /* shock (electricity) resistance */
|
||||
res = (ptr->mconveys & MR_ELEC) != 0;
|
||||
if (res) debugpline("can get shock resistance");
|
||||
if (res) debugpline0("can get shock resistance");
|
||||
break;
|
||||
case POISON_RES:
|
||||
res = (ptr->mconveys & MR_POISON) != 0;
|
||||
if (res) debugpline("can get poison resistance");
|
||||
if (res) debugpline0("can get poison resistance");
|
||||
break;
|
||||
case TELEPORT:
|
||||
res = can_teleport(ptr);
|
||||
if (res) debugpline("can get teleport");
|
||||
if (res) debugpline0("can get teleport");
|
||||
break;
|
||||
case TELEPORT_CONTROL:
|
||||
res = control_teleport(ptr);
|
||||
if (res) debugpline("can get teleport control");
|
||||
if (res) debugpline0("can get teleport control");
|
||||
break;
|
||||
case TELEPAT:
|
||||
res = telepathic(ptr);
|
||||
if (res) debugpline("can get telepathy");
|
||||
if (res) debugpline0("can get telepathy");
|
||||
break;
|
||||
default:
|
||||
/* res stays 0 */
|
||||
@@ -768,7 +768,7 @@ register struct permonst *ptr;
|
||||
{
|
||||
register int chance;
|
||||
|
||||
debugpline("Attempting to give intrinsic %d", type);
|
||||
debugpline1("Attempting to give intrinsic %d", type);
|
||||
/* some intrinsics are easier to get than others */
|
||||
switch (type) {
|
||||
case POISON_RES:
|
||||
@@ -797,7 +797,7 @@ register struct permonst *ptr;
|
||||
|
||||
switch (type) {
|
||||
case FIRE_RES:
|
||||
debugpline("Trying to give fire resistance");
|
||||
debugpline0("Trying to give fire resistance");
|
||||
if(!(HFire_resistance & FROMOUTSIDE)) {
|
||||
You(Hallucination ? "be chillin'." :
|
||||
"feel a momentary chill.");
|
||||
@@ -805,21 +805,21 @@ register struct permonst *ptr;
|
||||
}
|
||||
break;
|
||||
case SLEEP_RES:
|
||||
debugpline("Trying to give sleep resistance");
|
||||
debugpline0("Trying to give sleep resistance");
|
||||
if(!(HSleep_resistance & FROMOUTSIDE)) {
|
||||
You_feel("wide awake.");
|
||||
HSleep_resistance |= FROMOUTSIDE;
|
||||
}
|
||||
break;
|
||||
case COLD_RES:
|
||||
debugpline("Trying to give cold resistance");
|
||||
debugpline0("Trying to give cold resistance");
|
||||
if(!(HCold_resistance & FROMOUTSIDE)) {
|
||||
You_feel("full of hot air.");
|
||||
HCold_resistance |= FROMOUTSIDE;
|
||||
}
|
||||
break;
|
||||
case DISINT_RES:
|
||||
debugpline("Trying to give disintegration resistance");
|
||||
debugpline0("Trying to give disintegration resistance");
|
||||
if(!(HDisint_resistance & FROMOUTSIDE)) {
|
||||
You_feel(Hallucination ?
|
||||
"totally together, man." :
|
||||
@@ -828,7 +828,7 @@ register struct permonst *ptr;
|
||||
}
|
||||
break;
|
||||
case SHOCK_RES: /* shock (electricity) resistance */
|
||||
debugpline("Trying to give shock resistance");
|
||||
debugpline0("Trying to give shock resistance");
|
||||
if(!(HShock_resistance & FROMOUTSIDE)) {
|
||||
if (Hallucination)
|
||||
You_feel("grounded in reality.");
|
||||
@@ -838,7 +838,7 @@ register struct permonst *ptr;
|
||||
}
|
||||
break;
|
||||
case POISON_RES:
|
||||
debugpline("Trying to give poison resistance");
|
||||
debugpline0("Trying to give poison resistance");
|
||||
if(!(HPoison_resistance & FROMOUTSIDE)) {
|
||||
You_feel(Poison_resistance ?
|
||||
"especially healthy." : "healthy.");
|
||||
@@ -846,7 +846,7 @@ register struct permonst *ptr;
|
||||
}
|
||||
break;
|
||||
case TELEPORT:
|
||||
debugpline("Trying to give teleport");
|
||||
debugpline0("Trying to give teleport");
|
||||
if(!(HTeleportation & FROMOUTSIDE)) {
|
||||
You_feel(Hallucination ? "diffuse." :
|
||||
"very jumpy.");
|
||||
@@ -854,7 +854,7 @@ register struct permonst *ptr;
|
||||
}
|
||||
break;
|
||||
case TELEPORT_CONTROL:
|
||||
debugpline("Trying to give teleport control");
|
||||
debugpline0("Trying to give teleport control");
|
||||
if(!(HTeleport_control & FROMOUTSIDE)) {
|
||||
You_feel(Hallucination ?
|
||||
"centered in your personal space." :
|
||||
@@ -863,7 +863,7 @@ register struct permonst *ptr;
|
||||
}
|
||||
break;
|
||||
case TELEPAT:
|
||||
debugpline("Trying to give telepathy");
|
||||
debugpline0("Trying to give telepathy");
|
||||
if(!(HTelepat & FROMOUTSIDE)) {
|
||||
You_feel(Hallucination ?
|
||||
"in touch with the cosmos." :
|
||||
@@ -874,7 +874,7 @@ register struct permonst *ptr;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
debugpline("Tried to give an impossible intrinsic");
|
||||
debugpline0("Tried to give an impossible intrinsic");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1005,7 +1005,7 @@ register int pm;
|
||||
case PM_DISENCHANTER:
|
||||
/* picks an intrinsic at random and removes it; there's
|
||||
no feedback if hero already lacks the chosen ability */
|
||||
debugpline("using attrcurse to strip an intrinsic");
|
||||
debugpline0("using attrcurse to strip an intrinsic");
|
||||
attrcurse();
|
||||
break;
|
||||
case PM_MIND_FLAYER:
|
||||
@@ -1045,7 +1045,7 @@ register int pm;
|
||||
if (conveys_STR) {
|
||||
count = 1;
|
||||
tmp = -1; /* use -1 as fake prop index for STR */
|
||||
debugpline("\"Intrinsic\" strength, %d", tmp);
|
||||
debugpline1("\"Intrinsic\" strength, %d", tmp);
|
||||
}
|
||||
for (i = 1; i <= LAST_PROP; i++) {
|
||||
if (!intrinsic_possible(i, ptr)) continue;
|
||||
@@ -1055,7 +1055,7 @@ register int pm;
|
||||
of keeping the old choice (note that 1 in 1 and
|
||||
0 in 1 are what we want for the first candidate) */
|
||||
if (!rn2(count)) {
|
||||
debugpline("Intrinsic %d replacing %d", i, tmp);
|
||||
debugpline2("Intrinsic %d replacing %d", i, tmp);
|
||||
tmp = i;
|
||||
}
|
||||
}
|
||||
@@ -1252,7 +1252,7 @@ const char *mesg;
|
||||
what = "chicken";
|
||||
which = 1; /* suppress pluralization */
|
||||
} else if (Hallucination) {
|
||||
what = rndmonnam();
|
||||
what = rndmonnam(NULL);
|
||||
} else {
|
||||
what = mons[mnum].mname;
|
||||
if (the_unique_pm(&mons[mnum])) which = 2;
|
||||
@@ -1599,11 +1599,12 @@ start_eating(otmp) /* called as you start to eat */
|
||||
{
|
||||
const char *old_nomovemsg, *save_nomovemsg;
|
||||
|
||||
debugpline("start_eating: %p (victual = %p)", otmp, context.victual.piece);
|
||||
debugpline("reqtime = %d", context.victual.reqtime);
|
||||
debugpline("(original reqtime = %d)", objects[otmp->otyp].oc_delay);
|
||||
debugpline("nmod = %d", context.victual.nmod);
|
||||
debugpline("oeaten = %d", otmp->oeaten);
|
||||
debugpline2("start_eating: %lx (victual = %lx)",
|
||||
(unsigned long)otmp, (unsigned long)context.victual.piece);
|
||||
debugpline1("reqtime = %d", context.victual.reqtime);
|
||||
debugpline1("(original reqtime = %d)", objects[otmp->otyp].oc_delay);
|
||||
debugpline1("nmod = %d", context.victual.nmod);
|
||||
debugpline1("oeaten = %d", otmp->oeaten);
|
||||
context.victual.fullwarn = context.victual.doreset = FALSE;
|
||||
context.victual.eating = TRUE;
|
||||
|
||||
@@ -2443,11 +2444,14 @@ doeat() /* generic "eat" command funtion (see cmd.c) */
|
||||
if (otmp->otyp == CORPSE) basenutrit = mons[otmp->corpsenm].cnutrit;
|
||||
else basenutrit = objects[otmp->otyp].oc_nutrition;
|
||||
|
||||
debugpline("before rounddiv: context.victual.reqtime == %d", context.victual.reqtime);
|
||||
debugpline("oeaten == %d, basenutrit == %d", otmp->oeaten, basenutrit);
|
||||
debugpline1("before rounddiv: context.victual.reqtime == %d",
|
||||
context.victual.reqtime);
|
||||
debugpline2("oeaten == %d, basenutrit == %d",
|
||||
otmp->oeaten, basenutrit);
|
||||
context.victual.reqtime = (basenutrit == 0 ? 0 :
|
||||
rounddiv(context.victual.reqtime * (long)otmp->oeaten, basenutrit));
|
||||
debugpline("after rounddiv: context.victual.reqtime == %d", context.victual.reqtime);
|
||||
debugpline1("after rounddiv: context.victual.reqtime == %d",
|
||||
context.victual.reqtime);
|
||||
/* calculate the modulo value (nutrit. units per round eating)
|
||||
* note: this isn't exact - you actually lose a little nutrition
|
||||
* due to this method.
|
||||
@@ -2549,7 +2553,7 @@ register int num;
|
||||
{
|
||||
/* See comments in newuhs() for discussion on force_save_hs */
|
||||
boolean iseating = (occupation == eatfood) || force_save_hs;
|
||||
debugpline("lesshungry(%d)", num);
|
||||
debugpline1("lesshungry(%d)", num);
|
||||
u.uhunger += num;
|
||||
if(u.uhunger >= 2000) {
|
||||
if (!iseating || context.victual.canchoke) {
|
||||
|
||||
@@ -911,6 +911,7 @@ die:
|
||||
topten figure it out separately and possibly getting different
|
||||
time or even day if player is slow responding to --More-- */
|
||||
endtime = getnow();
|
||||
urealtime.realtime += (endtime - urealtime.restored);
|
||||
|
||||
/* Sometimes you die on the first move. Life's not fair.
|
||||
* On those rare occasions you get hosed immediately, go out
|
||||
|
||||
+9
-64
@@ -9,33 +9,6 @@
|
||||
|
||||
STATIC_VAR NEARDATA struct engr *head_engr;
|
||||
|
||||
/* random engravings */
|
||||
static const char *random_mesg[] = {
|
||||
"Elbereth",
|
||||
/* trap engravings */
|
||||
"Vlad was here", "ad aerarium",
|
||||
/* take-offs and other famous engravings */
|
||||
"Owlbreath", "Galadriel",
|
||||
"Kilroy was here",
|
||||
"A.S. ->", "<- A.S.", /* Journey to the Center of the Earth */
|
||||
"You won't get it up the steps", /* Adventure */
|
||||
"Lasciate ogni speranza o voi ch'entrate.", /* Inferno */
|
||||
"Well Come", /* Prisoner */
|
||||
"We apologize for the inconvenience.", /* So Long... */
|
||||
"See you next Wednesday", /* Thriller */
|
||||
"notary sojak", /* Smokey Stover */
|
||||
"For a good time call 8?7-5309",
|
||||
"Please don't feed the animals.", /* Various zoos around the world */
|
||||
"Madam, in Eden, I'm Adam.", /* A palindrome */
|
||||
"Two thumbs up!", /* Siskel & Ebert */
|
||||
"Hello, World!", /* The First C Program */
|
||||
#ifdef MAIL
|
||||
"You've got mail!", /* AOL */
|
||||
#endif
|
||||
"As if!", /* Clueless */
|
||||
"BAD WOLF", /* 200x incarnation of Dr.Who */
|
||||
};
|
||||
|
||||
char *
|
||||
random_engraving(outbuf)
|
||||
char *outbuf;
|
||||
@@ -44,8 +17,10 @@ char *outbuf;
|
||||
|
||||
/* a random engraving may come from the "rumors" file,
|
||||
or from the list above */
|
||||
if (!rn2(4) || !(rumor = getrumor(0, outbuf, TRUE)) || !*rumor)
|
||||
Strcpy(outbuf, random_mesg[rn2(SIZE(random_mesg))]);
|
||||
if (!rn2(4) || !(rumor = getrumor(0, outbuf, TRUE)) || !*rumor) {
|
||||
char buf[BUFSZ];
|
||||
Strcpy(outbuf, get_rnd_text(ENGRAVEFILE, buf));
|
||||
}
|
||||
|
||||
wipeout_text(outbuf, (int)(strlen(outbuf) / 4), 0);
|
||||
return outbuf;
|
||||
@@ -1232,39 +1207,6 @@ struct engr *ep;
|
||||
}
|
||||
|
||||
|
||||
/* Epitaphs for random headstones */
|
||||
static const char *epitaphs[] = {
|
||||
"Rest in peace",
|
||||
"R.I.P.",
|
||||
"Rest In Pieces",
|
||||
"Note -- there are NO valuable items in this grave",
|
||||
"1994-1995. The Longest-Lived Hacker Ever",
|
||||
"The Grave of the Unknown Hacker",
|
||||
"We weren't sure who this was, but we buried him here anyway",
|
||||
"Sparky -- he was a very good dog",
|
||||
"Beware of Electric Third Rail",
|
||||
"Made in Taiwan",
|
||||
"Og friend. Og good dude. Og died. Og now food",
|
||||
"Beetlejuice Beetlejuice Beetlejuice",
|
||||
"Look out below!",
|
||||
"Please don't dig me up. I'm perfectly happy down here. -- Resident",
|
||||
"Postman, please note forwarding address: Gehennom, Asmodeus's Fortress, fifth lemure on the left",
|
||||
"Mary had a little lamb/Its fleece was white as snow/When Mary was in trouble/The lamb was first to go",
|
||||
"Be careful, or this could happen to you!",
|
||||
"Soon you'll join this fellow in hell! -- the Wizard of Yendor",
|
||||
"Caution! This grave contains toxic waste",
|
||||
"Sum quod eris",
|
||||
"Here lies an Atheist, all dressed up and no place to go",
|
||||
"Here lies Ezekiel, age 102. The good die young.",
|
||||
"Here lies my wife: Here let her lie! Now she's at rest and so am I.",
|
||||
"Here lies Johnny Yeast. Pardon me for not rising.",
|
||||
"He always lied while on the earth and now he's lying in it",
|
||||
"I made an ash of myself",
|
||||
"Soon ripe. Soon rotten. Soon gone. But not forgotten.",
|
||||
"Here lies the body of Jonathan Blake. Stepped on the gas instead of the brake.",
|
||||
"Go away!"
|
||||
};
|
||||
|
||||
/* Create a headstone at the given location.
|
||||
* The caller is responsible for newsym(x, y).
|
||||
*/
|
||||
@@ -1280,9 +1222,12 @@ const char *str;
|
||||
levl[x][y].typ = GRAVE;
|
||||
|
||||
/* Engrave the headstone */
|
||||
if (!str) str = epitaphs[rn2(SIZE(epitaphs))];
|
||||
del_engr_at(x, y);
|
||||
make_engr_at(x, y, str, 0L, HEADSTONE);
|
||||
if (str) make_engr_at(x, y, str, 0L, HEADSTONE);
|
||||
else {
|
||||
char buf[BUFSZ];
|
||||
make_engr_at(x, y, get_rnd_text(EPITAPHFILE, buf), 0L, HEADSTONE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -283,7 +283,7 @@ int expltype;
|
||||
so avoid any which begins with a capital letter) */
|
||||
do {
|
||||
Sprintf(hallu_buf, "%s explosion",
|
||||
s_suffix(rndmonnam()));
|
||||
s_suffix(rndmonnam(NULL)));
|
||||
} while (*hallu_buf != lowc(*hallu_buf));
|
||||
str = hallu_buf;
|
||||
}
|
||||
@@ -365,7 +365,7 @@ int expltype;
|
||||
if (do_hallu) { /* (see explanation above) */
|
||||
do {
|
||||
Sprintf(hallu_buf, "%s explosion",
|
||||
s_suffix(rndmonnam()));
|
||||
s_suffix(rndmonnam(NULL)));
|
||||
} while (*hallu_buf != lowc(*hallu_buf));
|
||||
str = hallu_buf;
|
||||
}
|
||||
|
||||
+135
-14
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 files.c $NHDT-Date: 1426545233 2015/03/16 22:33:53 $ $NHDT-Branch: derek-farming $:$NHDT-Revision: 1.133 $ */
|
||||
/* NetHack 3.5 files.c $NHDT-Date: 1426969026 2015/03/21 20:17:06 $ $NHDT-Branch: master $:$NHDT-Revision: 1.137 $ */
|
||||
/* NetHack 3.5 files.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.124 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -362,7 +362,9 @@ char *reasonbuf; /* reasonbuf must be at least BUFSZ, supplied by caller */
|
||||
#if defined(NOCWD_ASSUMPTIONS)
|
||||
for (prefcnt = 1; prefcnt < PREFIX_COUNT; prefcnt++) {
|
||||
/* don't test writing to configdir or datadir; they're readonly */
|
||||
if (prefcnt == CONFIGPREFIX || prefcnt == DATAPREFIX) continue;
|
||||
if (prefcnt == SYSCONFPREFIX ||
|
||||
prefcnt == CONFIGPREFIX ||
|
||||
prefcnt == DATAPREFIX) continue;
|
||||
filename = fqname("validate", prefcnt, 3);
|
||||
if ((fp = fopen(filename, "w"))) {
|
||||
fclose(fp);
|
||||
@@ -1811,6 +1813,8 @@ const char *configfile =
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* used for messaging */
|
||||
char lastconfigfile[BUFSZ];
|
||||
|
||||
#ifdef MSDOS
|
||||
/* conflict with speed-dial under windows
|
||||
@@ -1857,8 +1861,15 @@ int src;
|
||||
/* fall through to standard names */
|
||||
} else
|
||||
#endif
|
||||
if ((fp = fopenp(filename, "r")) != (FILE *)0) {
|
||||
configfile = filename;
|
||||
#ifdef PREFIXES_IN_USE
|
||||
if (src == SET_IN_SYS) {
|
||||
(void) strncpy(lastconfigfile,
|
||||
fqname(filename, SYSCONFPREFIX, 0), BUFSZ-1);
|
||||
} else
|
||||
#endif
|
||||
(void) strncpy(lastconfigfile, filename, BUFSZ-1);
|
||||
lastconfigfile[BUFSZ-1] = '\0';
|
||||
if ((fp = fopenp(lastconfigfile, "r")) != (FILE *)0) {
|
||||
return(fp);
|
||||
#if defined(UNIX) || defined(VMS)
|
||||
} else {
|
||||
@@ -1876,6 +1887,13 @@ int src;
|
||||
/* user's home directory should be where we look first here, too */
|
||||
envp = nh_getenv("USERPROFILE");
|
||||
# endif
|
||||
/*
|
||||
* TODO: uncomment this when you figure out where to put it
|
||||
(void) strncpy(lastconfigfile,
|
||||
fqname(configfile, CONFIGPREFIX, 0), BUFSZ-1);
|
||||
lastconfigfile[BUFSZ-1] = '\0';
|
||||
if ((fp = fopenp(lastconfigfile, "r")) != (FILE *)0) {
|
||||
*/
|
||||
# ifdef WIN32
|
||||
if (!envp) {
|
||||
Strcpy(tmp_config, configfile);
|
||||
@@ -1908,13 +1926,15 @@ int src;
|
||||
#else
|
||||
/* constructed full path names don't need fqname() */
|
||||
# ifdef VMS
|
||||
if ((fp = fopenp(fqname("nethackini", CONFIGPREFIX, 0), "r"))
|
||||
!= (FILE *)0) {
|
||||
configfile = "nethackini";
|
||||
(void) strncpy(lastconfigfile, fqname("nethackini", CONFIGPREFIX, 0),
|
||||
BUFSZ-1);
|
||||
lastconfigfile[BUFSZ-1] = '\0';
|
||||
if ((fp = fopenp(lastconfigfile, "r")) != (FILE *)0) {
|
||||
return(fp);
|
||||
}
|
||||
if ((fp = fopenp("sys$login:nethack.ini", "r")) != (FILE *)0) {
|
||||
configfile = "nethack.ini";
|
||||
(void) strncpy(lastconfigfile,"sys$login:nethack.ini", BUFSZ-1);
|
||||
lastconfigfile[BUFSZ-1] = '\0';
|
||||
if ((fp = fopenp(lastconfigfile, "r")) != (FILE *)0) {
|
||||
return(fp);
|
||||
}
|
||||
|
||||
@@ -1923,6 +1943,9 @@ int src;
|
||||
Strcpy(tmp_config, "NetHack.cnf");
|
||||
else
|
||||
Sprintf(tmp_config, "%s%s", envp, "NetHack.cnf");
|
||||
|
||||
(void) strncpy(lastconfigfile, tmp_config, BUFSZ-1);
|
||||
lastconfigfile[BUFSZ-1] = '\0';
|
||||
if ((fp = fopenp(tmp_config, "r")) != (FILE *)0)
|
||||
return(fp);
|
||||
# else /* should be only UNIX left */
|
||||
@@ -1931,18 +1954,25 @@ int src;
|
||||
Strcpy(tmp_config, ".nethackrc");
|
||||
else
|
||||
Sprintf(tmp_config, "%s/%s", envp, ".nethackrc");
|
||||
if ((fp = fopenp(tmp_config, "r")) != (FILE *)0)
|
||||
|
||||
(void) strncpy(lastconfigfile, tmp_config, BUFSZ-1);
|
||||
lastconfigfile[BUFSZ-1] = '\0';
|
||||
if ((fp = fopenp(lastconfigfile, "r")) != (FILE *)0)
|
||||
return(fp);
|
||||
# if defined(__APPLE__)
|
||||
/* try an alternative */
|
||||
if (envp) {
|
||||
Sprintf(tmp_config, "%s/%s", envp,
|
||||
"Library/Preferences/NetHack Defaults");
|
||||
if ((fp = fopenp(tmp_config, "r")) != (FILE *)0)
|
||||
(void) strncpy(lastconfigfile, tmp_config, BUFSZ-1);
|
||||
lastconfigfile[BUFSZ-1] = '\0';
|
||||
if ((fp = fopenp(lastconfigfile, "r")) != (FILE *)0)
|
||||
return(fp);
|
||||
Sprintf(tmp_config, "%s/%s", envp,
|
||||
"Library/Preferences/NetHack Defaults.txt");
|
||||
if ((fp = fopenp(tmp_config, "r")) != (FILE *)0)
|
||||
(void) strncpy(lastconfigfile, tmp_config, BUFSZ-1);
|
||||
lastconfigfile[BUFSZ-1] = '\0';
|
||||
if ((fp = fopenp(lastconfigfile, "r")) != (FILE *)0)
|
||||
return(fp);
|
||||
}
|
||||
# endif
|
||||
@@ -1957,7 +1987,7 @@ int src;
|
||||
# endif
|
||||
details = "";
|
||||
raw_printf("Couldn't open default config file %s %s(%d).",
|
||||
tmp_config, details, errno);
|
||||
lastconfigfile, details, errno);
|
||||
wait_synch();
|
||||
}
|
||||
# endif /* Unix */
|
||||
@@ -2182,7 +2212,11 @@ int src;
|
||||
sysopt.shellers = dupstr(bufp);
|
||||
} else if (src == SET_IN_SYS && match_varname(buf, "DEBUGFILES", 5)) {
|
||||
if (sysopt.debugfiles) free(sysopt.debugfiles);
|
||||
sysopt.debugfiles = dupstr(bufp);
|
||||
/* if showdebug() has already been called (perhaps we've added
|
||||
some debugpline() calls to option processing) and has found
|
||||
a value for getenv("DEBUGFILES"), don't override that */
|
||||
if (sysopt.env_dbgfl == 0)
|
||||
sysopt.debugfiles = dupstr(bufp);
|
||||
} else if (src == SET_IN_SYS && match_varname(buf, "SUPPORT", 7)) {
|
||||
if (sysopt.support) free(sysopt.support);
|
||||
sysopt.support = dupstr(bufp);
|
||||
@@ -3220,4 +3254,91 @@ int ifd, ofd;
|
||||
/* ---------- END INTERNAL RECOVER ----------- */
|
||||
#endif /*SELF_RECOVER*/
|
||||
|
||||
/* ---------- OTHER ----------- */
|
||||
|
||||
#ifdef SYSCF
|
||||
# ifdef SYSCF_FILE
|
||||
void
|
||||
assure_syscf_file() {
|
||||
/* All we really care about is the end result - can we read the file?
|
||||
* So just check that directly. */
|
||||
int fd;
|
||||
fd = open(SYSCF_FILE, O_RDONLY);
|
||||
if(fd >= 0){
|
||||
/* readable */
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
raw_printf("Unable to open SYSCF_FILE.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
# endif /* SYSCF_FILE */
|
||||
#endif /* SYSCF */
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
/* used by debugpline() to decide whether to issue a message
|
||||
from a partiular source file; caller passes __FILE__ and we check
|
||||
whether it is in the source file list supplied by SYSCF's DEBUGFILES */
|
||||
boolean
|
||||
showdebug(filename)
|
||||
const char *filename;
|
||||
{
|
||||
const char *debugfiles, *p;
|
||||
|
||||
if (!filename || !*filename) return FALSE; /* sanity precaution */
|
||||
|
||||
if (sysopt.env_dbgfl == 0) {
|
||||
/* check once for DEBUGFILES in the environment;
|
||||
if found, it supersedes the sysconf value
|
||||
[note: getenv() rather than nh_getenv() since a long value
|
||||
is valid and doesn't pose any sort of overflow risk here] */
|
||||
if ((p = getenv("DEBUGFILES")) != 0) {
|
||||
if (sysopt.debugfiles) free(sysopt.debugfiles);
|
||||
sysopt.debugfiles = dupstr(p);
|
||||
sysopt.env_dbgfl = 1;
|
||||
} else
|
||||
sysopt.env_dbgfl = -1;
|
||||
}
|
||||
|
||||
debugfiles = sysopt.debugfiles;
|
||||
/* usual case: sysopt.debugfiles will be empty */
|
||||
if (!debugfiles || !*debugfiles) return FALSE;
|
||||
|
||||
/* strip filename's path if present */
|
||||
# ifdef UNIX
|
||||
if ((p = rindex(filename, '/')) != 0) filename = p + 1;
|
||||
# endif
|
||||
# ifdef VMS
|
||||
filename = vms_basename(filename);
|
||||
/* vms_basename strips off 'type' suffix as well as path and version;
|
||||
we want to put suffix back (".c" assumed); since it always returns
|
||||
a pointer to a static buffer, we can safely modify its result */
|
||||
Strcat((char *)filename, ".c");
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Wildcard match will only work if there's a single pattern (which
|
||||
* might be a single file name without any wildcarding) rather than
|
||||
* a space-separated list.
|
||||
* [to NOT do: We could step through the space-separated list and
|
||||
* attempt a wildcard match against each element, but that would be
|
||||
* overkill for the intended usage.]
|
||||
*/
|
||||
if (pmatch(debugfiles, filename))
|
||||
return TRUE;
|
||||
|
||||
/* check whether filename is an element of the list */
|
||||
if ((p = strstr(debugfiles, filename)) != 0) {
|
||||
int l = (int)strlen(filename);
|
||||
|
||||
if ((p == debugfiles || p[-1] == ' ' || p[-1] == '/')
|
||||
&& (p[l] == ' ' || p[l] == '\0'))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#endif /*DEBUG*/
|
||||
|
||||
/*files.c*/
|
||||
|
||||
+10
-8
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 fountain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 fountain.c $NHDT-Date: 1426953330 2015/03/21 15:55:30 $ $NHDT-Branch: master $:$NHDT-Revision: 1.40 $ */
|
||||
/* NetHack 3.5 fountain.c $Date: 2011/08/20 00:22:20 $ $Revision: 1.32 $ */
|
||||
/* Copyright Scott R. Turner, srt@ucla, 10/27/86 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -39,7 +39,7 @@ dowatersnakes() /* Fountain of snakes! */
|
||||
if (!(mvitals[PM_WATER_MOCCASIN].mvflags & G_GONE)) {
|
||||
if (!Blind)
|
||||
pline("An endless stream of %s pours forth!",
|
||||
Hallucination ? makeplural(rndmonnam()) : "snakes");
|
||||
Hallucination ? makeplural(rndmonnam(NULL)) : "snakes");
|
||||
else
|
||||
You_hear("%s hissing!", something);
|
||||
while(num-- > 0)
|
||||
@@ -402,12 +402,14 @@ register struct obj *obj;
|
||||
if(in_town(u.ux, u.uy))
|
||||
(void) angry_guards(FALSE);
|
||||
return;
|
||||
} else if (water_damage(obj, NULL, TRUE) != ER_NOTHING) {
|
||||
if (obj->otyp == POT_ACID) { /* Acid and water don't mix */
|
||||
useup(obj);
|
||||
return;
|
||||
} else if (!rn2(2)) /* no further effect */
|
||||
return;
|
||||
} else {
|
||||
int er = water_damage(obj, NULL, TRUE);
|
||||
if (obj->otyp == POT_ACID && er != ER_DESTROYED) { /* Acid and water don't mix */
|
||||
useup(obj);
|
||||
return;
|
||||
} else if (er != ER_NOTHING && !rn2(2)) { /* no further effect */
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
switch (rnd(30)) {
|
||||
|
||||
+7
-2
@@ -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;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ NetHack, except that rounddiv may call panic().
|
||||
char chrcasecpy (int,int)
|
||||
char * strcasecpy (char *,const char *)
|
||||
char * s_suffix (const char *)
|
||||
char * ing_suffix (const char *)
|
||||
char * xcrypt (const char *, char *)
|
||||
boolean onlyspace (const char *)
|
||||
char * tabexpand (char *)
|
||||
@@ -235,6 +236,39 @@ s_suffix(s) /* return a name converted to possessive */
|
||||
return buf;
|
||||
}
|
||||
|
||||
char *
|
||||
ing_suffix(s)
|
||||
const char *s;
|
||||
{
|
||||
const char *vowel = "aeiouy";
|
||||
static char buf[BUFSZ];
|
||||
char onoff[10];
|
||||
char *p;
|
||||
Strcpy(buf, s);
|
||||
p = eos(buf);
|
||||
onoff[0] = *p = *(p+1) = '\0';
|
||||
if ((strlen(buf) > 4) &&
|
||||
(!strcmpi(p-3, " on") ||
|
||||
!strcmpi(p-4, " off") ||
|
||||
!strcmpi(p-5, " with"))) {
|
||||
p = strrchr(buf, ' ');
|
||||
Strcpy(onoff, p);
|
||||
}
|
||||
if (!index(vowel, *(p-1)) && index(vowel, *(p-2)) && !index(vowel, *(p-3))) {
|
||||
/* tip -> tipp + ing */
|
||||
*p = *(p-1);
|
||||
*(p+1) = '\0';
|
||||
} else if (!strcmpi(p-2, "ie")) { /* vie -> vy + ing */
|
||||
*(p-2) = 'y';
|
||||
*(p-1) = '\0';
|
||||
} else if (*(p-1) == 'e') /* grease -> greas + ing */
|
||||
*(p-1) = '\0';
|
||||
Strcat(buf, "ing");
|
||||
if (onoff[0]) Strcat(buf, onoff);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
xcrypt(str, buf) /* trivial text encryption routine (see makedefs) */
|
||||
const char *str;
|
||||
|
||||
+47
-8
@@ -240,15 +240,19 @@ struct obj *obj;
|
||||
} else if (obj->otyp == AMULET_OF_YENDOR) {
|
||||
if (u.uhave.amulet) impossible("already have amulet?");
|
||||
u.uhave.amulet = 1;
|
||||
u.uachieve.amulet = 1;
|
||||
} else if (obj->otyp == CANDELABRUM_OF_INVOCATION) {
|
||||
if (u.uhave.menorah) impossible("already have candelabrum?");
|
||||
u.uhave.menorah = 1;
|
||||
u.uachieve.menorah = 1;
|
||||
} else if (obj->otyp == BELL_OF_OPENING) {
|
||||
if (u.uhave.bell) impossible("already have silver bell?");
|
||||
u.uhave.bell = 1;
|
||||
u.uachieve.bell = 1;
|
||||
} else if (obj->otyp == SPE_BOOK_OF_THE_DEAD) {
|
||||
if (u.uhave.book) impossible("already have the book?");
|
||||
u.uhave.book = 1;
|
||||
u.uachieve.book = 1;
|
||||
} else if (obj->oartifact) {
|
||||
if (is_quest_artifact(obj)) {
|
||||
if (u.uhave.questart)
|
||||
@@ -258,6 +262,15 @@ struct obj *obj;
|
||||
}
|
||||
set_artifact_intrinsic(obj, 1, W_ART);
|
||||
}
|
||||
if(obj->otyp == LUCKSTONE && obj->record_achieve_special) {
|
||||
u.uachieve.mines_luckstone = 1;
|
||||
obj->record_achieve_special = 0;
|
||||
} else if((obj->otyp == AMULET_OF_REFLECTION ||
|
||||
obj->otyp == BAG_OF_HOLDING) &&
|
||||
obj->record_achieve_special) {
|
||||
u.uachieve.finish_sokoban = 1;
|
||||
obj->record_achieve_special = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -971,7 +984,21 @@ register const char *let,*word;
|
||||
return((struct obj *)0);
|
||||
}
|
||||
if(ilet == '-') {
|
||||
return(allownone ? &zeroobj : (struct obj *) 0);
|
||||
if (!allownone) {
|
||||
char *suf = NULL;
|
||||
strcpy(buf, word);
|
||||
if ((bp = strstr(buf, " on the ")) != NULL) { /* rub on the stone[s] */
|
||||
*bp = '\0';
|
||||
suf = (bp + 1);
|
||||
}
|
||||
if ((bp = strstr(buf, " or ")) != NULL) {
|
||||
*bp = '\0';
|
||||
bp = (rn2(2) ? buf : (bp + 4));
|
||||
} else bp = buf;
|
||||
You("mime %s something%s%s.", ing_suffix(bp),
|
||||
suf ? " " : "", suf ? suf : "");
|
||||
}
|
||||
return(allownone ? &zeroobj : (struct obj *) 0);
|
||||
}
|
||||
if(ilet == def_oc_syms[COIN_CLASS].sym) {
|
||||
if (!usegold) {
|
||||
@@ -1774,7 +1801,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;
|
||||
@@ -1848,7 +1875,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;
|
||||
@@ -1976,7 +2003,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++;
|
||||
}
|
||||
|
||||
@@ -1994,7 +2021,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
|
||||
@@ -2686,10 +2713,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;
|
||||
@@ -2702,7 +2731,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 */
|
||||
@@ -2712,6 +2742,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;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 light.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 light.c $NHDT-Date: 1426465436 2015/03/16 00:23:56 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.17 $ */
|
||||
/* NetHack 3.5 light.c $Date: 2009/05/06 10:46:38 $ $Revision: 1.15 $ */
|
||||
/* SCCS Id: @(#)light.c 3.5 2009/01/20 */
|
||||
/* Copyright (c) Dean Luick, 1994 */
|
||||
@@ -394,13 +394,13 @@ write_ls(fd, ls)
|
||||
ls->id = zeroany;
|
||||
ls->id.a_uint = otmp->o_id;
|
||||
if (find_oid((unsigned)ls->id.a_uint) != otmp)
|
||||
debugpline("write_ls: can't find obj #%u!", ls->id.a_uint);
|
||||
impossible("write_ls: can't find obj #%u!", ls->id.a_uint);
|
||||
} else { /* ls->type == LS_MONSTER */
|
||||
mtmp = (struct monst *)ls->id.a_monst;
|
||||
ls->id = zeroany;
|
||||
ls->id.a_uint = mtmp->m_id;
|
||||
if (find_mid((unsigned)ls->id.a_uint, FM_EVERYWHERE) != mtmp)
|
||||
debugpline("write_ls: can't find mon #%u!", ls->id.a_uint);
|
||||
impossible("write_ls: can't find mon #%u!", ls->id.a_uint);
|
||||
}
|
||||
ls->flags |= LSF_NEEDS_FIXUP;
|
||||
bwrite(fd, (genericptr_t)ls, sizeof(light_source));
|
||||
|
||||
+9
-8
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 makemon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* 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 $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. */
|
||||
@@ -93,7 +93,7 @@ register int x, y, n;
|
||||
int cnttmp,cntdiv;
|
||||
|
||||
cnttmp = cnt;
|
||||
debugpline("init group call x=%d,y=%d,n=%d,cnt=%d.", x, y, n, cnt);
|
||||
debugpline4("init group call <%d,%d>, n=%d, cnt=%d.", x, y, n, cnt);
|
||||
cntdiv = ((u.ulevel < 3) ? 4 : (u.ulevel < 5) ? 2 : 1);
|
||||
#endif
|
||||
/* Tuning: cut down on swarming at low character levels [mrs] */
|
||||
@@ -758,7 +758,7 @@ boolean ghostly;
|
||||
mvitals[mndx].born++;
|
||||
if ((int) mvitals[mndx].born >= lim && !(mons[mndx].geno & G_NOGEN) &&
|
||||
!(mvitals[mndx].mvflags & G_EXTINCT)) {
|
||||
if (wizard) debugpline("Automatically extinguished %s.",
|
||||
if (wizard) debugpline1("Automatically extinguished %s.",
|
||||
makeplural(mons[mndx].mname));
|
||||
mvitals[mndx].mvflags |= G_EXTINCT;
|
||||
reset_rndmonst(mndx);
|
||||
@@ -903,8 +903,8 @@ register int mmflags;
|
||||
already been genocided, return */
|
||||
if (mvitals[mndx].mvflags & G_GENOD) return((struct monst *) 0);
|
||||
if (wizard && (mvitals[mndx].mvflags & G_EXTINCT))
|
||||
debugpline("Explicitly creating extinct monster %s.",
|
||||
mons[mndx].mname);
|
||||
debugpline1("Explicitly creating extinct monster %s.",
|
||||
mons[mndx].mname);
|
||||
} else {
|
||||
/* make a random (common) monster that can survive here.
|
||||
* (the special levels ask for random monsters at specific
|
||||
@@ -916,7 +916,7 @@ register int mmflags;
|
||||
|
||||
do {
|
||||
if(!(ptr = rndmonst())) {
|
||||
debugpline("Warning: no monster.");
|
||||
debugpline0("Warning: no monster.");
|
||||
return((struct monst *) 0); /* no more monsters! */
|
||||
}
|
||||
fakemon.data = ptr; /* set up for goodpos */
|
||||
@@ -1252,7 +1252,7 @@ rndmonst()
|
||||
}
|
||||
if (mndx == SPECIAL_PM) {
|
||||
/* evidently they've all been exterminated */
|
||||
debugpline("rndmonst: no common mons!");
|
||||
debugpline0("rndmonst: no common mons!");
|
||||
return (struct permonst *)0;
|
||||
} /* else `mndx' now ready for use below */
|
||||
zlevel = level_difficulty();
|
||||
@@ -1290,7 +1290,8 @@ rndmonst()
|
||||
|
||||
if (rndmonst_state.choice_count <= 0) {
|
||||
/* maybe no common mons left, or all are too weak or too strong */
|
||||
debugpline("rndmonst: choice_count=%d", rndmonst_state.choice_count);
|
||||
debugpline1("rndmonst: choice_count=%d",
|
||||
rndmonst_state.choice_count);
|
||||
return (struct permonst *)0;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 mklev.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mklev.c $NHDT-Date: 1426465436 2015/03/16 00:23:56 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.25 $ */
|
||||
/* NetHack 3.5 mklev.c $Date: 2012/02/15 01:55:33 $ $Revision: 1.20 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -684,7 +684,7 @@ makelevel()
|
||||
/* make a secret treasure vault, not connected to the rest */
|
||||
if(do_vault()) {
|
||||
xchar w,h;
|
||||
debugpline("trying to make a vault...");
|
||||
debugpline0("trying to make a vault...");
|
||||
w = 1;
|
||||
h = 1;
|
||||
if (check_room(&vault_x, &w, &vault_y, &h, TRUE)) {
|
||||
@@ -1560,7 +1560,7 @@ xchar x, y;
|
||||
*source = u.uz;
|
||||
insert_branch(br, TRUE);
|
||||
|
||||
debugpline("Made knox portal.");
|
||||
debugpline0("Made knox portal.");
|
||||
place_branch(br, x, y);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 mkmaze.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mkmaze.c $NHDT-Date: 1426465437 2015/03/16 00:23:57 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.20 $ */
|
||||
/* NetHack 3.5 mkmaze.c $Date: 2009/05/06 10:46:56 $ $Revision: 1.18 $ */
|
||||
/* SCCS Id: @(#)mkmaze.c 3.5 2007/06/18 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
@@ -589,7 +589,7 @@ register const char *s;
|
||||
|
||||
if (x_range <= INVPOS_X_MARGIN || y_range <= INVPOS_Y_MARGIN ||
|
||||
(x_range * y_range) <= (INVPOS_DISTANCE * INVPOS_DISTANCE))
|
||||
debugpline("inv_pos: maze is too small! (%d x %d)",
|
||||
debugpline2("inv_pos: maze is too small! (%d x %d)",
|
||||
x_maze_max, y_maze_max);
|
||||
inv_pos.x = inv_pos.y = 0; /*{occupied() => invocation_pos()}*/
|
||||
do {
|
||||
@@ -877,7 +877,7 @@ register xchar x, y, todnum, todlevel;
|
||||
impossible("portal on top of portal??");
|
||||
return;
|
||||
}
|
||||
debugpline("mkportal: at (%d,%d), to %s, level %d",
|
||||
debugpline4("mkportal: at <%d,%d>, to %s, level %d",
|
||||
x, y, dungeons[todnum].dname, todlevel);
|
||||
ttmp->dst.dnum = todnum;
|
||||
ttmp->dst.dlevel = todlevel;
|
||||
|
||||
+7
-6
@@ -1529,10 +1529,9 @@ struct obj *otmp;
|
||||
/* Adjust the age; must be same as obj_timer_checks() for off ice*/
|
||||
age = monstermoves - otmp->age;
|
||||
retval += age * (ROT_ICE_ADJUSTMENT-1) / ROT_ICE_ADJUSTMENT;
|
||||
debugpline("The %s age has ice modifications:otmp->age = %ld, returning %ld.",
|
||||
s_suffix(doname(otmp)),otmp->age, retval);
|
||||
debugpline("Effective age of corpse: %ld.",
|
||||
monstermoves - retval);
|
||||
debugpline3("The %s age has ice modifications: otmp->age = %ld, returning %ld.",
|
||||
s_suffix(doname(otmp)), otmp->age, retval);
|
||||
debugpline1("Effective age of corpse: %ld.", monstermoves - retval);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
@@ -1561,7 +1560,8 @@ int force; /* 0 = no force so do checks, <0 = force off, >0 force on */
|
||||
|
||||
/* mark the corpse as being on ice */
|
||||
otmp->on_ice = 1;
|
||||
debugpline("%s is now on ice at %d,%d.", The(xname(otmp)),x,y);
|
||||
debugpline3("%s is now on ice at <%d,%d>.",
|
||||
The(xname(otmp)), x, y);
|
||||
/* Adjust the time remaining */
|
||||
tleft *= ROT_ICE_ADJUSTMENT;
|
||||
restart_timer = TRUE;
|
||||
@@ -1587,7 +1587,8 @@ int force; /* 0 = no force so do checks, <0 = force off, >0 force on */
|
||||
long age;
|
||||
|
||||
otmp->on_ice = 0;
|
||||
debugpline("%s is no longer on ice at %d,%d.", The(xname(otmp)),x,y);
|
||||
debugpline3("%s is no longer on ice at <%d,%d>.",
|
||||
The(xname(otmp)), x, y);
|
||||
/* Adjust the remaining time */
|
||||
tleft /= ROT_ICE_ADJUSTMENT;
|
||||
restart_timer = TRUE;
|
||||
|
||||
+12
-4
@@ -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. */
|
||||
@@ -408,9 +408,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));
|
||||
|
||||
|
||||
@@ -1279,7 +1279,7 @@ register struct monst *mtmp, *mtmp2;
|
||||
/* transfer the monster's inventory */
|
||||
for (otmp = mtmp2->minvent; otmp; otmp = otmp->nobj) {
|
||||
if (otmp->where != OBJ_MINVENT || otmp->ocarry != mtmp)
|
||||
debugpline("replmon: minvent inconsistency");
|
||||
debugpline0("replmon: minvent inconsistency");
|
||||
otmp->ocarry = mtmp2;
|
||||
}
|
||||
mtmp->minvent = 0;
|
||||
@@ -1623,6 +1623,8 @@ register struct monst *mtmp;
|
||||
}
|
||||
if(mtmp->iswiz) wizdead();
|
||||
if(mtmp->data->msound == MS_NEMESIS) nemdead();
|
||||
if(mtmp->data == &mons[PM_MEDUSA])
|
||||
u.uachieve.killed_medusa = 1;
|
||||
if(glyph_is_invisible(levl[mtmp->mx][mtmp->my].glyph))
|
||||
unmap_object(mtmp->mx, mtmp->my);
|
||||
m_detach(mtmp, mptr);
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ struct obj *obj;
|
||||
if (vis) {
|
||||
pline("As %s opens the bottle, an enormous %s emerges!",
|
||||
mon_nam(mon),
|
||||
Hallucination ? rndmonnam() : (const char *)"ghost");
|
||||
Hallucination ? rndmonnam(NULL) : (const char *)"ghost");
|
||||
pline("%s is frightened to death, and unable to move.",
|
||||
Monnam(mon));
|
||||
}
|
||||
|
||||
+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;
|
||||
|
||||
+1
-1
@@ -1693,7 +1693,7 @@ static struct sing_plur one_off[] = {
|
||||
static const char *const as_is[] = {
|
||||
/* makesingular() leaves these plural due to how they're used */
|
||||
"boots", "shoes",
|
||||
"gloves", "lenses", "scales",
|
||||
"gloves", "lenses", "scales", "eyes",
|
||||
"gauntlets",
|
||||
"iron bars",
|
||||
/* both singular and plural are spelled the same */
|
||||
|
||||
+10
-8
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 options.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.158 $ */
|
||||
/* NetHack 3.5 options.c $NHDT-Date: 1427073746 2015/03/23 01:22:26 $ $NHDT-Branch: master $:$NHDT-Revision: 1.164 $ */
|
||||
/* NetHack 3.5 options.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.153 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -139,8 +139,10 @@ 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},
|
||||
@@ -798,10 +800,10 @@ rejectoption(optname)
|
||||
const char *optname;
|
||||
{
|
||||
#ifdef MICRO
|
||||
pline("\"%s\" settable only from %s.", optname, configfile);
|
||||
pline("\"%s\" settable only from %s.", optname, lastconfigfile);
|
||||
#else
|
||||
pline("%s can be set only from NETHACKOPTIONS or %s.", optname,
|
||||
configfile);
|
||||
lastconfigfile);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -821,7 +823,7 @@ const char *opts;
|
||||
#endif
|
||||
|
||||
if(from_file)
|
||||
raw_printf("Bad syntax in OPTIONS in %s: %s.", configfile, opts);
|
||||
raw_printf("Bad syntax in OPTIONS in %s: %s.", lastconfigfile, opts);
|
||||
else
|
||||
raw_printf("Bad syntax in NETHACKOPTIONS: %s.", opts);
|
||||
|
||||
@@ -2484,7 +2486,7 @@ goodfruit:
|
||||
|
||||
#if defined(BACKWARD_COMPAT)
|
||||
fullname = "DECgraphics";
|
||||
if (match_optname(opts, fullname, 10, TRUE)) {
|
||||
if (match_optname(opts, fullname, 3, TRUE)) {
|
||||
boolean badflag = FALSE;
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if (!negated) {
|
||||
@@ -2508,7 +2510,7 @@ goodfruit:
|
||||
return;
|
||||
}
|
||||
fullname = "IBMgraphics";
|
||||
if (match_optname(opts, fullname, 10, TRUE)) {
|
||||
if (match_optname(opts, fullname, 3, TRUE)) {
|
||||
const char *sym_name = fullname;
|
||||
boolean badflag = FALSE;
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
@@ -2542,7 +2544,7 @@ goodfruit:
|
||||
#endif
|
||||
#ifdef MAC_GRAPHICS_ENV
|
||||
fullname = "MACgraphics";
|
||||
if (match_optname(opts, fullname, 11, TRUE)) {
|
||||
if (match_optname(opts, fullname, 3, TRUE)) {
|
||||
boolean badflag = FALSE;
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if (!negated) {
|
||||
@@ -4070,7 +4072,7 @@ option_help()
|
||||
winid datawin;
|
||||
|
||||
datawin = create_nhwindow(NHW_TEXT);
|
||||
Sprintf(buf, "Set options as OPTIONS=<options> in %s", configfile);
|
||||
Sprintf(buf, "Set options as OPTIONS=<options> in %s", lastconfigfile);
|
||||
opt_intro[CONFIG_SLOT] = (const char *) buf;
|
||||
for (i = 0; opt_intro[i]; i++)
|
||||
putstr(datawin, 0, opt_intro[i]);
|
||||
|
||||
+13
-9
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 pickup.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: master $:$NHDT-Revision: 1.126 $ */
|
||||
/* NetHack 3.5 pickup.c $NHDT-Date: 1426558927 2015/03/17 02:22:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.131 $ */
|
||||
/* NetHack 3.5 pickup.c $Date: 2012/02/16 03:01:38 $ $Revision: 1.123 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -897,7 +899,7 @@ int how; /* type of query */
|
||||
(*pick_list)->item.a_int = curr->oclass;
|
||||
return 1;
|
||||
} else {
|
||||
debugpline("query_category: no single object match");
|
||||
debugpline0("query_category: no single object match");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -1515,7 +1519,7 @@ doloot() /* loot a container on the floor or loot saddle from mon. */
|
||||
lootcont:
|
||||
|
||||
if (container_at(cc.x, cc.y, FALSE)) {
|
||||
boolean any = FALSE;
|
||||
boolean anyfound = FALSE;
|
||||
int num_conts = 0;
|
||||
|
||||
if (!able_to_loot(cc.x, cc.y, TRUE)) return 0;
|
||||
@@ -1563,14 +1567,14 @@ lootcont:
|
||||
cobj, doname, ansimpleoname, "a container"));
|
||||
if (c == 'q') return (timepassed);
|
||||
if (c == 'n') continue;
|
||||
any = TRUE;
|
||||
anyfound = TRUE;
|
||||
|
||||
timepassed |= do_loot_cont(&cobj);
|
||||
/* might have triggered chest trap or magic bag explosion */
|
||||
if (multi < 0 || !cobj) return 1;
|
||||
}
|
||||
}
|
||||
if (any) c = 'y';
|
||||
if (anyfound) c = 'y';
|
||||
}
|
||||
} else if (IS_GRAVE(levl[cc.x][cc.y].typ)) {
|
||||
You("need to dig up the grave to effectively loot it...");
|
||||
@@ -2040,7 +2044,7 @@ struct obj *box;
|
||||
(void) add_to_container(box, deadcat);
|
||||
}
|
||||
pline_The("%s inside the box is dead!",
|
||||
Hallucination ? rndmonnam() : "housecat");
|
||||
Hallucination ? rndmonnam(NULL) : "housecat");
|
||||
}
|
||||
box->owt = weight(box);
|
||||
return;
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 potion.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 potion.c $NHDT-Date: 1426953330 2015/03/21 15:55:30 $ $NHDT-Branch: master $:$NHDT-Revision: 1.99 $ */
|
||||
/* NetHack 3.5 potion.c $Date: 2013/11/05 00:57:55 $ $Revision: 1.91 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -371,7 +371,7 @@ ghost_from_bottle()
|
||||
return;
|
||||
}
|
||||
pline("As you open the bottle, an enormous %s emerges!",
|
||||
Hallucination ? rndmonnam() : (const char *)"ghost");
|
||||
Hallucination ? rndmonnam(NULL) : (const char *)"ghost");
|
||||
if(flags.verbose)
|
||||
You("are frightened to death, and unable to move.");
|
||||
nomul(-3);
|
||||
@@ -1664,8 +1664,8 @@ dodip()
|
||||
rider_cant_reach(); /* not skilled enough to reach */
|
||||
} else {
|
||||
if (obj->otyp == POT_ACID) obj->in_use = 1;
|
||||
(void) water_damage(obj, 0, TRUE);
|
||||
if (obj->in_use) useup(obj);
|
||||
if (water_damage(obj, 0, TRUE) != ER_DESTROYED && obj->in_use)
|
||||
useup(obj);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1373,6 +1373,7 @@ dosacrifice()
|
||||
done(ESCAPED);
|
||||
} else { /* super big win */
|
||||
adjalign(10);
|
||||
u.uachieve.ascended = 1;
|
||||
pline("An invisible choir sings, and you are bathed in radiance...");
|
||||
godvoice(altaralign, "Congratulations, mortal!");
|
||||
display_nhwindow(WIN_MESSAGE, FALSE);
|
||||
|
||||
+3
-2
@@ -284,13 +284,14 @@ char *pname; /* caller-supplied output buffer */
|
||||
boolean do_hallu = Hallucination,
|
||||
aligned_priest = mon->data == &mons[PM_ALIGNED_PRIEST],
|
||||
high_priest = mon->data == &mons[PM_HIGH_PRIEST];
|
||||
const char *what = do_hallu ? rndmonnam() : mon->data->mname;
|
||||
char whatcode = '\0';
|
||||
const char *what = do_hallu ? rndmonnam(&whatcode) : mon->data->mname;
|
||||
|
||||
if (!mon->ispriest && !mon->isminion) /* should never happen... */
|
||||
return strcpy(pname, what); /* caller must be confused */
|
||||
|
||||
*pname = '\0';
|
||||
if (!do_hallu || !bogon_is_pname(what)) Strcat(pname, "the ");
|
||||
if (!do_hallu || !bogon_is_pname(whatcode)) Strcat(pname, "the ");
|
||||
if (mon->minvis) Strcat(pname, "invisible ");
|
||||
if (mon->isminion && EMIN(mon)->renegade)
|
||||
Strcat(pname, "renegade ");
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 questpgr.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 questpgr.c $NHDT-Date: 1426465439 2015/03/16 00:23:59 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.18 $ */
|
||||
/* NetHack 3.5 questpgr.c $Date: 2012/02/02 09:18:14 $ $Revision: 1.14 $ */
|
||||
/* Copyright 1991, M. Stephenson */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -47,7 +47,7 @@ dump_qtlist() /* dump the character msg list to check appearance */
|
||||
{
|
||||
struct qtmsg *msg;
|
||||
|
||||
if (!showdebug()) return;
|
||||
if (!showdebug(__FILE__)) return;
|
||||
|
||||
for (msg = qt_list.chrole; msg->msgnum > 0; msg++) {
|
||||
pline("msgnum %d: delivery %c",
|
||||
|
||||
+16
-5
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 restore.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 restore.c $NHDT-Date: 1426465439 2015/03/16 00:23:59 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.77 $ */
|
||||
/* NetHack 3.5 restore.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.71 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -551,9 +551,20 @@ unsigned int *stuckid, *steedid;
|
||||
amii_setpens(amii_numcolors); /* use colors from save file */
|
||||
#endif
|
||||
mread(fd, (genericptr_t) &u, sizeof(struct you));
|
||||
mread(fd, (genericptr_t) timebuf, 14);
|
||||
timebuf[14] = '\0';
|
||||
ubirthday = time_from_yyyymmddhhmmss(timebuf);
|
||||
|
||||
#define ReadTimebuf(foo) mread(fd, (genericptr_t) timebuf, 14); \
|
||||
timebuf[14] = '\0'; \
|
||||
foo = time_from_yyyymmddhhmmss(timebuf);
|
||||
|
||||
ReadTimebuf(ubirthday);
|
||||
ReadTimebuf(urealtime.realtime);
|
||||
ReadTimebuf(urealtime.restored);
|
||||
#if defined(BSD) && !defined(POSIX_TYPES)
|
||||
(void) time((long *)&urealtime.restored);
|
||||
#else
|
||||
(void) time(&urealtime.restored);
|
||||
#endif
|
||||
|
||||
|
||||
set_uasmon();
|
||||
#ifdef CLIPPING
|
||||
@@ -1153,7 +1164,7 @@ register int fd;
|
||||
++msgcount;
|
||||
}
|
||||
if (msgcount) putmsghistory((char *)0, TRUE);
|
||||
debugpline("Read %d messages from savefile.", msgcount);
|
||||
debugpline1("Read %d messages from savefile.", msgcount);
|
||||
}
|
||||
|
||||
/* Clear all structures for object and monster ID mapping. */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 rnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 rnd.c $NHDT-Date: 1426465440 2015/03/16 00:24:00 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.8 $ */
|
||||
/* NetHack 3.5 rnd.c $Date: 2009/05/06 10:47:41 $ $Revision: 1.7 $ */
|
||||
/* SCCS Id: @(#)rnd.c 3.5 2004/08/27 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -24,7 +24,7 @@ register int x;
|
||||
{
|
||||
#ifdef BETA
|
||||
if (x <= 0) {
|
||||
debugpline("rn2(%d) attempted", x);
|
||||
debugpline1("rn2(%d) attempted", x);
|
||||
return(0);
|
||||
}
|
||||
x = RND(x);
|
||||
@@ -42,7 +42,7 @@ register int x; /* good luck approaches 0, bad luck approaches (x-1) */
|
||||
|
||||
#ifdef BETA
|
||||
if (x <= 0) {
|
||||
debugpline("rnl(%d) attempted", x);
|
||||
debugpline1("rnl(%d) attempted", x);
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
@@ -81,7 +81,7 @@ register int x;
|
||||
{
|
||||
#ifdef BETA
|
||||
if (x <= 0) {
|
||||
debugpline("rnd(%d) attempted", x);
|
||||
debugpline1("rnd(%d) attempted", x);
|
||||
return(1);
|
||||
}
|
||||
x = RND(x)+1;
|
||||
@@ -99,7 +99,7 @@ register int n, x;
|
||||
|
||||
#ifdef BETA
|
||||
if (x < 0 || n < 0 || (x == 0 && n != 0)) {
|
||||
debugpline("d(%d,%d) attempted", n, x);
|
||||
debugpline2("d(%d,%d) attempted", n, x);
|
||||
return(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
+11
-9
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 role.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 role.c $NHDT-Date: 1426558928 2015/03/17 02:22:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.21 $ */
|
||||
/* NetHack 3.5 role.c $Date: 2012/02/16 03:01:38 $ $Revision: 1.18 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1333,14 +1333,16 @@ plnamesuffix()
|
||||
int i;
|
||||
|
||||
#ifdef GENERIC_USERNAMES
|
||||
/* some generic user names will be ignored in favor of prompting */
|
||||
i = (int)strlen(plname);
|
||||
eptr = GENERIC_USERNAMES;
|
||||
sptr = strstri(eptr, plname);
|
||||
if (sptr
|
||||
&& (sptr == eptr || sptr[-1] == ' ')
|
||||
&& (sptr[i] == ' ' || sptr[i] == '\0'))
|
||||
*plname = '\0'; /* call askname() */
|
||||
{
|
||||
/* some generic user names will be ignored in favor of prompting */
|
||||
const char *uptr = GENERIC_USERNAMES;
|
||||
|
||||
i = (int)strlen(plname);
|
||||
if ((sptr = strstri(uptr, plname)) != 0
|
||||
&& (sptr == uptr || sptr[-1] == ' ')
|
||||
&& (sptr[i] == ' ' || sptr[i] == '\0'))
|
||||
*plname = '\0'; /* call askname() */
|
||||
}
|
||||
#endif
|
||||
|
||||
do {
|
||||
|
||||
@@ -266,6 +266,46 @@ rumor_check()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Gets a random line of text from file 'fname', and returns it. */
|
||||
char *
|
||||
get_rnd_text(fname, buf)
|
||||
const char *fname;
|
||||
char *buf;
|
||||
{
|
||||
dlb *fh;
|
||||
|
||||
buf[0] = '\0';
|
||||
|
||||
fh = dlb_fopen(fname, "r");
|
||||
|
||||
if (fh) {
|
||||
/* TODO: cache sizetxt, starttxt, endtxt. maybe cache file contents? */
|
||||
long sizetxt = 0, starttxt = 0, endtxt = 0, tidbit = 0;
|
||||
char *endp, line[BUFSZ], xbuf[BUFSZ];
|
||||
(void) dlb_fgets(line, sizeof line, fh); /* skip "don't edit" comment */
|
||||
|
||||
(void) dlb_fseek(fh, 0L, SEEK_CUR);
|
||||
starttxt = dlb_ftell(fh);
|
||||
(void) dlb_fseek(fh, 0L, SEEK_END);
|
||||
endtxt = dlb_ftell(fh);
|
||||
sizetxt = endtxt - starttxt;
|
||||
tidbit = Rand() % sizetxt;
|
||||
|
||||
(void) dlb_fseek(fh, starttxt + tidbit, SEEK_SET);
|
||||
(void) dlb_fgets(line, sizeof line, fh);
|
||||
if (!dlb_fgets(line, sizeof line, fh)) {
|
||||
(void) dlb_fseek(fh, starttxt, SEEK_SET);
|
||||
(void) dlb_fgets(line, sizeof line, fh);
|
||||
}
|
||||
if ((endp = index(line, '\n')) != 0) *endp = 0;
|
||||
Strcat(buf, xcrypt(line, xbuf));
|
||||
(void) dlb_fclose(fh);
|
||||
} else impossible("Can't open file %s!", fname);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
outrumor(truth, mechanism)
|
||||
int truth; /* 1=true, -1=false, 0=either */
|
||||
|
||||
+7
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 save.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: master $:$NHDT-Revision: 1.59 $ */
|
||||
/* NetHack 3.5 save.c $NHDT-Date: 1426496455 2015/03/16 09:00:55 $ $NHDT-Branch: master $:$NHDT-Revision: 1.62 $ */
|
||||
/* NetHack 3.5 save.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.53 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -307,8 +307,11 @@ register int fd, mode;
|
||||
#ifdef SYSFLAGS
|
||||
bwrite(fd, (genericptr_t) &sysflags, sizeof(struct sysflag));
|
||||
#endif
|
||||
urealtime.realtime += (getnow() - urealtime.restored);
|
||||
bwrite(fd, (genericptr_t) &u, sizeof(struct you));
|
||||
bwrite(fd, yyyymmddhhmmss(ubirthday), 14);
|
||||
bwrite(fd, yyyymmddhhmmss(urealtime.realtime), 14);
|
||||
bwrite(fd, yyyymmddhhmmss(urealtime.restored), 14);
|
||||
save_killers(fd, mode);
|
||||
|
||||
/* must come before migrating_objs and migrating_mons are freed */
|
||||
@@ -1210,7 +1213,7 @@ int fd, mode;
|
||||
}
|
||||
bwrite(fd, (genericptr_t) &minusone, sizeof(int));
|
||||
}
|
||||
debugpline("Stored %d messages into savefile.", msgcount);
|
||||
debugpline1("Stored %d messages into savefile.", msgcount);
|
||||
/* note: we don't attempt to handle release_data() here */
|
||||
}
|
||||
|
||||
@@ -1313,6 +1316,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);
|
||||
@@ -1350,6 +1354,7 @@ freedynamicdata()
|
||||
#ifdef STATUS_VIA_WINDOWPORT
|
||||
status_finish();
|
||||
#endif
|
||||
sysopt_release(); /* SYSCF strings */
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 shk.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 shk.c $NHDT-Date: 1426465441 2015/03/16 00:24:01 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.96 $ */
|
||||
/* NetHack 3.5 shk.c $Date: 2012/07/03 22:54:49 $ $Revision: 1.91 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1205,7 +1205,7 @@ dopay()
|
||||
}
|
||||
|
||||
if(!shkp) {
|
||||
debugpline("dopay: null shkp.");
|
||||
debugpline0("dopay: null shkp.");
|
||||
return(0);
|
||||
}
|
||||
proceed:
|
||||
|
||||
+6
-2
@@ -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 *
|
||||
@@ -1006,7 +1010,7 @@ dochat()
|
||||
if (!Blind) {
|
||||
if (Hallucination) {
|
||||
/* if you're hallucinating, you can't tell it's a statue */
|
||||
pline_The("%s seems not to notice you.", rndmonnam());
|
||||
pline_The("%s seems not to notice you.", rndmonnam(NULL));
|
||||
}
|
||||
else {
|
||||
pline_The("statue seems not to notice you.");
|
||||
|
||||
+18
-6
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 sp_lev.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 sp_lev.c $NHDT-Date: 1426465441 2015/03/16 00:24:01 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.25 $ */
|
||||
/* NetHack 3.5 sp_lev.c $Date: 2011/01/05 01:28:36 $ $Revision: 1.23 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -324,8 +324,8 @@ chk:
|
||||
lev = &levl[x][y];
|
||||
for (; y <= ymax; y++) {
|
||||
if (lev++->typ) {
|
||||
if(!vault)
|
||||
debugpline("strange area [%d,%d] in check_room.",x,y);
|
||||
if (!vault)
|
||||
debugpline2("strange area [%d,%d] in check_room.", x, y);
|
||||
if (!rn2(3)) return FALSE;
|
||||
if (x < *lowx)
|
||||
*lowx = x + xlim + 1;
|
||||
@@ -398,7 +398,7 @@ xchar rtype, rlit;
|
||||
r1 = rnd_rect(); /* Get a random rectangle */
|
||||
|
||||
if (!r1) { /* No more free rectangles ! */
|
||||
debugpline("No more rects...");
|
||||
debugpline0("No more rects...");
|
||||
return FALSE;
|
||||
}
|
||||
hx = r1->hx;
|
||||
@@ -1062,6 +1062,18 @@ struct mkroom *croom;
|
||||
mongone(was);
|
||||
}
|
||||
|
||||
/* Nasty hack here: try to determine if this is the Mines or Sokoban
|
||||
* "prize" and then set record_achieve_special (maps to corpsenm)
|
||||
* for the object. That field will later be checked to find out if
|
||||
* the player obtained the prize. */
|
||||
if(otmp->otyp == LUCKSTONE && Is_mineend_level(&u.uz)) {
|
||||
otmp->record_achieve_special = 1;
|
||||
} else if((otmp->otyp == AMULET_OF_REFLECTION ||
|
||||
otmp->otyp == BAG_OF_HOLDING) &&
|
||||
Is_sokoend_level(&u.uz)) {
|
||||
otmp->record_achieve_special = 1;
|
||||
}
|
||||
|
||||
stackobj(otmp);
|
||||
|
||||
} /* if (rn2(100) < o->chance) */
|
||||
@@ -1311,8 +1323,8 @@ schar ftyp, btyp;
|
||||
if (xx <= 0 || yy <= 0 || tx <= 0 || ty <= 0 ||
|
||||
xx > COLNO-1 || tx > COLNO-1 ||
|
||||
yy > ROWNO-1 || ty > ROWNO-1) {
|
||||
debugpline("dig_corridor: bad coords : (%d,%d) (%d,%d).",
|
||||
xx,yy,tx,ty);
|
||||
debugpline4("dig_corridor: bad coords <%d,%d> <%d,%d>.",
|
||||
xx, yy, tx, ty);
|
||||
return FALSE;
|
||||
}
|
||||
if (tx > xx) dx = 1;
|
||||
|
||||
@@ -1,26 +1,37 @@
|
||||
/* NetHack 3.5 sys.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 sys.c $NHDT-Date: 1426544797 2015/03/16 22:26:37 $ $NHDT-Branch: master $:$NHDT-Revision: 1.18 $ */
|
||||
/* NetHack 3.5 sys.c $Date: 2012/03/10 02:22:07 $ $Revision: 1.12 $ */
|
||||
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
/* for KR1ED config, WIZARD is 0 or 1 and WIZARD_NAME is a string;
|
||||
for usual config, WIZARD is the string; forcing WIZARD_NAME to match it
|
||||
eliminates conditional testing for which one to use in string ops */
|
||||
#ifndef SYSCF
|
||||
/* !SYSCF configurations need '#define DEBUGFILES "foo.c bar.c"'
|
||||
to enable debugging feedback for source files foo.c and bar.c;
|
||||
to activate debugpline(), set an appropriate value and uncomment */
|
||||
/* # define DEBUGFILES "*" */
|
||||
/* note: DEBUGFILES value here or in sysconf.DEBUGFILES can be overridden
|
||||
at runtime by setting up a value for "DEBUGFILES" in the environment */
|
||||
#endif
|
||||
|
||||
struct sysopt sysopt;
|
||||
|
||||
void
|
||||
sys_early_init(){
|
||||
sys_early_init()
|
||||
{
|
||||
sysopt.support = NULL;
|
||||
sysopt.recover = NULL;
|
||||
#ifdef SYSCF
|
||||
sysopt.wizards = NULL;
|
||||
#else
|
||||
sysopt.wizards = WIZARD_NAME;
|
||||
sysopt.wizards = dupstr(WIZARD_NAME);
|
||||
#endif
|
||||
#if defined(SYSCF) || !defined(DEBUGFILES)
|
||||
sysopt.debugfiles = NULL;
|
||||
#else
|
||||
sysopt.debugfiles = dupstr(DEBUGFILES);
|
||||
#endif
|
||||
sysopt.env_dbgfl = 0; /* haven't checked getenv("DEBUGFILES") yet */
|
||||
sysopt.shellers = NULL;
|
||||
sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */
|
||||
|
||||
@@ -59,6 +70,24 @@ sys_early_init(){
|
||||
sysopt_seduce_set(sysopt.seduce);
|
||||
}
|
||||
|
||||
void
|
||||
sysopt_release()
|
||||
{
|
||||
if (sysopt.support)
|
||||
free(sysopt.support), sysopt.support = NULL;
|
||||
if (sysopt.recover)
|
||||
free(sysopt.recover), sysopt.recover = NULL;
|
||||
if (sysopt.wizards)
|
||||
free(sysopt.wizards), sysopt.wizards = NULL;
|
||||
if (sysopt.debugfiles)
|
||||
free(sysopt.debugfiles), sysopt.debugfiles = NULL;
|
||||
#ifdef PANICTRACE
|
||||
if (sysopt.gdbpath)
|
||||
free(sysopt.gdbpath), sysopt.gdbpath = NULL;
|
||||
if (sysopt.greppath)
|
||||
free (sysopt.greppath), sysopt.greppath = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
extern struct attack sa_yes[NATTK];
|
||||
extern struct attack sa_no[NATTK];
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 teleport.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 teleport.c $NHDT-Date: 1426465443 2015/03/16 00:24:03 $ $NHDT-Branch: debug $:$NHDT-Revision: 1.48 $ */
|
||||
/* NetHack 3.5 teleport.c $Date: 2012/01/04 18:52:36 $ $Revision: 1.45 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -121,7 +121,7 @@ unsigned entflags;
|
||||
struct monst fakemon; /* dummy monster */
|
||||
|
||||
if (!mdat) {
|
||||
debugpline("enexto() called with mdat==0");
|
||||
debugpline0("enexto() called with null mdat");
|
||||
/* default to player's original monster type */
|
||||
mdat = &mons[u.umonster];
|
||||
}
|
||||
|
||||
+1
-1
@@ -164,7 +164,7 @@ slime_dialogue()
|
||||
if (!Blind) /* [what if you're already green?] */
|
||||
pline(buf, hcolor(NH_GREEN));
|
||||
} else
|
||||
pline(buf, an(Hallucination ? rndmonnam() : "green slime"));
|
||||
pline(buf, an(Hallucination ? rndmonnam(NULL) : "green slime"));
|
||||
} else
|
||||
pline1(buf);
|
||||
}
|
||||
|
||||
+113
-1
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 topten.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 topten.c $NHDT-Date: 1426731079 2015/03/19 02:11:19 $ $NHDT-Branch: harder_d8 $:$NHDT-Revision: 1.25 $ */
|
||||
/* NetHack 3.5 topten.c $Date: 2012/01/24 04:26:15 $ $Revision: 1.23 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -65,6 +65,9 @@ STATIC_DCL void FDECL(outentry, (int,struct toptenentry *,BOOLEAN_P));
|
||||
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(encodeconduct);
|
||||
STATIC_DCL long NDECL(encodeachieve);
|
||||
STATIC_DCL void FDECL(free_ttlist, (struct toptenentry *));
|
||||
STATIC_DCL int FDECL(classmon, (char *,BOOLEAN_P));
|
||||
STATIC_DCL int FDECL(score_wanted,
|
||||
@@ -292,6 +295,100 @@ struct toptenentry *tt;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* as tab is never used in eg. plname or death, no need to mangle those. */
|
||||
STATIC_OVL void
|
||||
writexlentry(rfile,tt)
|
||||
FILE *rfile;
|
||||
struct toptenentry *tt;
|
||||
{
|
||||
#define Fprintf (void)fprintf
|
||||
#define XLOG_SEP '\t' /* xlogfile field separator. */
|
||||
char buf[BUFSZ];
|
||||
|
||||
Sprintf(buf, "version=%d.%d.%d",
|
||||
tt->ver_major, tt->ver_minor, tt->patchlevel);
|
||||
Sprintf(eos(buf), "%cpoints=%ld%cdeathdnum=%d%cdeathlev=%d",
|
||||
XLOG_SEP, tt->points,
|
||||
XLOG_SEP, tt->deathdnum,
|
||||
XLOG_SEP, tt->deathlev);
|
||||
Sprintf(eos(buf), "%cmaxlvl=%d%chp=%d%cmaxhp=%d",
|
||||
XLOG_SEP, tt->maxlvl,
|
||||
XLOG_SEP, tt->hp,
|
||||
XLOG_SEP, tt->maxhp);
|
||||
Sprintf(eos(buf), "%cdeaths=%d%cdeathdate=%ld%cbirthdate=%ld%cuid=%d",
|
||||
XLOG_SEP, tt->deaths,
|
||||
XLOG_SEP, tt->deathdate,
|
||||
XLOG_SEP, tt->birthdate,
|
||||
XLOG_SEP, tt->uid);
|
||||
Fprintf(rfile, "%s", buf);
|
||||
Sprintf(buf, "%crole=%s%crace=%s%cgender=%s%calign=%s",
|
||||
XLOG_SEP, tt->plrole,
|
||||
XLOG_SEP, tt->plrace,
|
||||
XLOG_SEP, tt->plgend,
|
||||
XLOG_SEP, tt->plalign);
|
||||
Fprintf(rfile, "%s%cname=%s%cdeath=%s",
|
||||
buf, /* (already includes separator) */
|
||||
XLOG_SEP, plname,
|
||||
XLOG_SEP, tt->death);
|
||||
Fprintf(rfile, "%cconduct=0x%lx%cturns=%ld%cachieve=0x%lx",
|
||||
XLOG_SEP, encodeconduct(),
|
||||
XLOG_SEP, moves,
|
||||
XLOG_SEP, encodeachieve());
|
||||
Fprintf(rfile, "%crealtime=%ld%cstarttime=%ld%cendtime=%ld",
|
||||
XLOG_SEP, (long)urealtime.realtime,
|
||||
XLOG_SEP, (long)ubirthday,
|
||||
XLOG_SEP, (long)urealtime.endtime);
|
||||
Fprintf(rfile, "%cgender0=%s%calign0=%s",
|
||||
XLOG_SEP, genders[flags.initgend].filecode,
|
||||
XLOG_SEP, aligns[1 - u.ualignbase[A_ORIGINAL]].filecode);
|
||||
Fprintf(rfile, "\n");
|
||||
#undef XLOG_SEP
|
||||
}
|
||||
|
||||
STATIC_OVL long
|
||||
encodeconduct()
|
||||
{
|
||||
long e = 0L;
|
||||
|
||||
if(!u.uconduct.food) e |= 1L << 0;
|
||||
if(!u.uconduct.unvegan) e |= 1L << 1;
|
||||
if(!u.uconduct.unvegetarian) e |= 1L << 2;
|
||||
if(!u.uconduct.gnostic) e |= 1L << 3;
|
||||
if(!u.uconduct.weaphit) e |= 1L << 4;
|
||||
if(!u.uconduct.killer) e |= 1L << 5;
|
||||
if(!u.uconduct.literate) e |= 1L << 6;
|
||||
if(!u.uconduct.polypiles) e |= 1L << 7;
|
||||
if(!u.uconduct.polyselfs) e |= 1L << 8;
|
||||
if(!u.uconduct.wishes) e |= 1L << 9;
|
||||
if(!u.uconduct.wisharti) e |= 1L << 10;
|
||||
if(!num_genocides()) e |= 1L << 11;
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
STATIC_OVL long
|
||||
encodeachieve()
|
||||
{
|
||||
long r = 0L;
|
||||
|
||||
if(u.uachieve.bell) r |= 1L << 0;
|
||||
if(u.uachieve.enter_gehennom) r |= 1L << 1;
|
||||
if(u.uachieve.menorah) r |= 1L << 2;
|
||||
if(u.uachieve.book) r |= 1L << 3;
|
||||
if(u.uevent.invoked) r |= 1L << 4;
|
||||
if(u.uachieve.amulet) r |= 1L << 5;
|
||||
if(In_endgame(&u.uz)) r |= 1L << 6;
|
||||
if(Is_astralevel(&u.uz)) r |= 1L << 7;
|
||||
if(u.uachieve.ascended) r |= 1L << 8;
|
||||
if(u.uachieve.mines_luckstone) r |= 1L << 9;
|
||||
if(u.uachieve.finish_sokoban) r |= 1L << 10;
|
||||
if(u.uachieve.killed_medusa) r |= 1L << 11;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
|
||||
STATIC_OVL void
|
||||
free_ttlist(tt)
|
||||
struct toptenentry *tt;
|
||||
@@ -322,6 +419,9 @@ time_t when;
|
||||
#ifdef LOGFILE
|
||||
FILE *lfile;
|
||||
#endif /* LOGFILE */
|
||||
#ifdef XLOGFILE
|
||||
FILE *xlfile;
|
||||
#endif /* XLOGFILE */
|
||||
|
||||
/* Under DICE 3.0, this crashes the system consistently, apparently due to
|
||||
* corruption of *rfile somewhere. Until I figure this out, just cut out
|
||||
@@ -380,6 +480,7 @@ time_t when;
|
||||
t0->birthdate = yyyymmdd(ubirthday);
|
||||
t0->deathdate = yyyymmdd(when);
|
||||
t0->tt_next = 0;
|
||||
urealtime.endtime = when;
|
||||
#ifdef UPDATE_RECORD_IN_PLACE
|
||||
t0->fpos = -1L;
|
||||
#endif
|
||||
@@ -395,6 +496,17 @@ time_t when;
|
||||
unlock_file(LOGFILE);
|
||||
}
|
||||
#endif /* LOGFILE */
|
||||
#ifdef XLOGFILE
|
||||
if (lock_file(XLOGFILE, SCOREPREFIX, 10)) {
|
||||
if(!(xlfile = fopen_datafile(XLOGFILE, "a", SCOREPREFIX))) {
|
||||
HUP raw_print("Cannot open extended log file!");
|
||||
} else {
|
||||
writexlentry(xlfile, t0);
|
||||
(void) fclose(xlfile);
|
||||
}
|
||||
unlock_file(XLOGFILE);
|
||||
}
|
||||
#endif /* XLOGFILE */
|
||||
|
||||
if (wizard || discover) {
|
||||
if (how != PANICKED) HUP {
|
||||
|
||||
+47
-17
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 trap.c $NHDT-Date: 1425318721 2015/03/02 17:52:01 $ $NHDT-Branch: master $:$NHDT-Revision: 1.194 $ */
|
||||
/* NetHack 3.5 trap.c $NHDT-Date: 1426805491 2015/03/19 22:51:31 $ $NHDT-Branch: water_damage $:$NHDT-Revision: 1.198 $ */
|
||||
/* 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. */
|
||||
@@ -621,7 +621,7 @@ int *fail_reason;
|
||||
"statue");
|
||||
pline("%s %s!", upstart(statuename), comes_to_life);
|
||||
} else if (Hallucination) { /* They don't know it's a statue */
|
||||
pline_The("%s suddenly seems more animated.", rndmonnam());
|
||||
pline_The("%s suddenly seems more animated.", rndmonnam(NULL));
|
||||
} else if (cause == ANIMATE_SHATTER) {
|
||||
if (cansee(x, y))
|
||||
Sprintf(statuename, "%s%s", shk_your(tmpbuf, statue),
|
||||
@@ -3016,7 +3016,6 @@ xchar x, y;
|
||||
{
|
||||
int chance;
|
||||
struct obj *otmp, *ncobj;
|
||||
int retval = 0;
|
||||
int in_sight = !Blind && couldsee(x, y); /* Don't care if it's lit */
|
||||
int dindx;
|
||||
|
||||
@@ -3146,6 +3145,14 @@ struct obj *obj;
|
||||
erode_obj(obj, NULL, ERODE_CORRODE, EF_GREASE | EF_VERBOSE);
|
||||
}
|
||||
|
||||
/* context for water_damage(), managed by water_damage_chain();
|
||||
when more than one stack of potions of acid explode while processing
|
||||
a chain of objects, use alternate phrasing after the first message */
|
||||
static struct h2o_ctx {
|
||||
int dkn_boom, unk_boom; /* track dknown, !dknown separately */
|
||||
boolean ctx_valid;
|
||||
} acid_ctx = { 0, 0, FALSE };
|
||||
|
||||
/* Get an object wet and damage it appropriately.
|
||||
* "ostr", if present, is used instead of the object name in some
|
||||
* messages.
|
||||
@@ -3158,7 +3165,7 @@ struct obj *obj;
|
||||
const char *ostr;
|
||||
boolean force;
|
||||
{
|
||||
boolean loose_obj = (obj && obj->where == OBJ_FREE), exploded = FALSE;
|
||||
if (!obj) return ER_NOTHING;
|
||||
|
||||
if (snuff_lit(obj))
|
||||
return ER_DAMAGED;
|
||||
@@ -3202,23 +3209,36 @@ boolean force;
|
||||
return ER_DAMAGED;
|
||||
} else if (obj->oclass == POTION_CLASS) {
|
||||
if (obj->otyp == POT_ACID) {
|
||||
char *bufp, buf[BUFSZ];
|
||||
boolean one = (obj->quan == 1L);
|
||||
boolean update = carried(obj);
|
||||
char *bufp;
|
||||
boolean one = (obj->quan == 1L),
|
||||
update = carried(obj),
|
||||
exploded = FALSE;
|
||||
|
||||
bufp = strcpy(buf, "potion");
|
||||
if (!one) bufp = makeplural(bufp);
|
||||
/* [should we damage player/monster?] */
|
||||
if (Blind && !carried(obj)) obj->dknown = 0;
|
||||
if (acid_ctx.ctx_valid)
|
||||
exploded = ((obj->dknown ? acid_ctx.dkn_boom
|
||||
: acid_ctx.unk_boom) > 0);
|
||||
/* First message is
|
||||
* "a [potion|<color> potion|potion of acid] explodes"
|
||||
* depending on obj->dknown (potion has been seen) and
|
||||
* objects[POT_ACID].oc_name_known (fully discovered),
|
||||
* or "some {plural version} explode" when relevant.
|
||||
* Second and subsequent messages for same chain and
|
||||
* matching dknown status are
|
||||
* "another [potion|<color> &c] explodes" or plural
|
||||
* variant.
|
||||
*/
|
||||
bufp = simpleonames(obj);
|
||||
pline("%s %s %s!", /* "A potion explodes!" */
|
||||
!exploded ? (one ? "A" : "Some") :
|
||||
(one ? "Another" : "More"),
|
||||
(one ? "Another" : "More"),
|
||||
bufp, vtense(bufp, "explode"));
|
||||
exploded = TRUE;
|
||||
/* let caller know that obj has gone away
|
||||
[when obj is part of a list, delobj()'s
|
||||
obj_extract_self() takes care of this;
|
||||
for loose_obj, obj should always equal
|
||||
*objp and otmp should always be null] */
|
||||
if (acid_ctx.ctx_valid) {
|
||||
if (obj->dknown)
|
||||
acid_ctx.dkn_boom++;
|
||||
else
|
||||
acid_ctx.unk_boom++;
|
||||
}
|
||||
setnotworn(obj);
|
||||
delobj(obj);
|
||||
if (update)
|
||||
@@ -3250,10 +3270,20 @@ struct obj *obj;
|
||||
boolean here;
|
||||
{
|
||||
struct obj *otmp;
|
||||
|
||||
/* initialize acid context: so far, neither seen (dknown) potions of
|
||||
acid nor unseen have exploded during this water damage sequence */
|
||||
acid_ctx.dkn_boom = acid_ctx.unk_boom = 0;
|
||||
acid_ctx.ctx_valid = TRUE;
|
||||
|
||||
for (; obj; obj = otmp) {
|
||||
otmp = here ? obj->nexthere : obj->nobj;
|
||||
water_damage(obj, NULL, FALSE);
|
||||
}
|
||||
|
||||
/* reset acid context */
|
||||
acid_ctx.dkn_boom = acid_ctx.unk_boom = 0;
|
||||
acid_ctx.ctx_valid = FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -500,6 +500,7 @@ u_init()
|
||||
(void) memset((genericptr_t)&u, 0, sizeof(u));
|
||||
u.ustuck = (struct monst *)0;
|
||||
(void) memset((genericptr_t)&ubirthday, 0, sizeof(ubirthday));
|
||||
(void) memset((genericptr_t)&urealtime, 0, sizeof(urealtime));
|
||||
|
||||
#if 0 /* documentation of more zero values as desirable */
|
||||
u.usick_cause[0] = 0;
|
||||
|
||||
+1
-5
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 wield.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 wield.c $NHDT-Date: 1427062304 2015/03/22 22:11:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.34 $ */
|
||||
/* NetHack 3.5 wield.c $Date: 2009/05/06 10:48:14 $ $Revision: 1.31 $ */
|
||||
/* SCCS Id: @(#)wield.c 3.5 2009/01/20 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
@@ -349,10 +349,6 @@ dowieldquiver()
|
||||
/* will_weld(), touch_petrifies(), etc. */
|
||||
multi = 0;
|
||||
|
||||
/* Because 'Q' used to be quit... */
|
||||
if (flags.suppress_alert < FEATURE_NOTICE_VER(3,3,0))
|
||||
pline("Note: Please use #quit if you wish to exit the game.");
|
||||
|
||||
/* Prompt for a new quiver */
|
||||
if (!(newquiver = getobj(quivee_types, "ready")))
|
||||
/* Cancelled */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 zap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 zap.c $NHDT-Date: 1427249230 2015/03/25 02:07:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.197 $ */
|
||||
/* 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. */
|
||||
@@ -1708,10 +1708,11 @@ struct obj *obj, *otmp;
|
||||
* as a safeguard against any stray occurrence left in an obj
|
||||
* struct someplace, although that should never happen.
|
||||
*/
|
||||
if (context.bypasses)
|
||||
if (context.bypasses) {
|
||||
return 0;
|
||||
else {
|
||||
debugpline("%s for a moment.", Tobjnam(obj, "pulsate"));
|
||||
} else {
|
||||
debugpline1("%s for a moment.",
|
||||
Tobjnam(obj, "pulsate"));
|
||||
obj->bypass = 0;
|
||||
}
|
||||
}
|
||||
@@ -1749,8 +1750,14 @@ struct obj *obj, *otmp;
|
||||
if (Is_box(obj)) (void) boxlock(obj, otmp);
|
||||
|
||||
if (obj_shudders(obj)) {
|
||||
boolean cover = ((obj->ox == u.ux && obj->oy == 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);
|
||||
@@ -1798,7 +1805,7 @@ struct obj *obj, *otmp;
|
||||
if (break_statue(obj)) {
|
||||
if (cansee(obj->ox, obj->oy)) {
|
||||
if (Hallucination)
|
||||
pline_The("%s shatters.", rndmonnam());
|
||||
pline_The("%s shatters.", rndmonnam(NULL));
|
||||
else
|
||||
pline_The("statue shatters.");
|
||||
} else
|
||||
@@ -3405,7 +3412,8 @@ struct obj **ootmp; /* to return worn armor for caller to disintegrate */
|
||||
resist(mon, type < ZT_SPELL(0) ? WAND_CLASS : '\0', 0, NOTELL))
|
||||
tmp /= 2;
|
||||
if (tmp < 0) tmp = 0; /* don't allow negative damage */
|
||||
debugpline("zapped monster hp = %d (= %d - %d)", mon->mhp-tmp,mon->mhp,tmp);
|
||||
debugpline3("zapped monster hp = %d (= %d - %d)",
|
||||
mon->mhp-tmp, mon->mhp, tmp);
|
||||
mon->mhp -= tmp;
|
||||
return(tmp);
|
||||
}
|
||||
|
||||
+5
-2
@@ -1,9 +1,9 @@
|
||||
/* NetHack 3.5 pcmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 pcmain.c $NHDT-Date: 1426966701 2015/03/21 19:38:21 $ $NHDT-Branch: master $:$NHDT-Revision: 1.51 $ */
|
||||
/* NetHack 3.5 pcmain.c $Date: 2012/01/20 03:41:31 $ $Revision: 1.48 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
/* main.c - MSDOS, OS/2, ST, Amiga, and NT NetHack */
|
||||
/* main.c - MSDOS, OS/2, ST, Amiga, and Windows NetHack */
|
||||
|
||||
#include "hack.h"
|
||||
#include "dlb.h"
|
||||
@@ -244,6 +244,9 @@ char *argv[];
|
||||
|
||||
#if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS)
|
||||
chdirx(hackdir,0);
|
||||
#endif
|
||||
#ifdef SYSCF
|
||||
initoptions();
|
||||
#endif
|
||||
prscore(argc, argv);
|
||||
nethack_exit(EXIT_SUCCESS);
|
||||
|
||||
+10
-1
@@ -9,7 +9,7 @@ NHSROOT=..
|
||||
# SHELL=E:/GEMINI2/MUPFEL.TTP
|
||||
# UUDECODE=uudecode
|
||||
|
||||
VARDAT = data rumors quest.dat oracles options
|
||||
VARDAT = bogusmon data engrave epitaph rumors quest.dat oracles options
|
||||
|
||||
all: $(VARDAT) spec_levs quest_levs dungeon
|
||||
|
||||
@@ -98,6 +98,15 @@ quest.dat: quest.txt ../util/makedefs
|
||||
oracles: oracles.txt ../util/makedefs
|
||||
../util/makedefs -h
|
||||
|
||||
engrave: engrave.txt ../util/makedefs
|
||||
../util/makedefs -s
|
||||
|
||||
epitaph: epitaph.txt ../util/makedefs
|
||||
../util/makedefs -s
|
||||
|
||||
bogusmon: bogusmon.txt ../util/makedefs
|
||||
../util/makedefs -s
|
||||
|
||||
# note: 'options' should have already been made when include/date.h was created
|
||||
options: ../util/makedefs
|
||||
../util/makedefs -v
|
||||
|
||||
+14
-5
@@ -56,7 +56,7 @@ VARDIR = $(HACKDIR)
|
||||
# for Gnome
|
||||
# VARDATND = x11tiles pet_mark.xbm rip.xpm mapbg.xpm
|
||||
|
||||
VARDATD = data oracles options quest.dat rumors
|
||||
VARDATD = bogusmon data engrave epitaph oracles options quest.dat rumors
|
||||
VARDAT = $(VARDATD) $(VARDATND)
|
||||
|
||||
# Some versions of make use the SHELL environment variable as the shell
|
||||
@@ -109,6 +109,15 @@ manpages:
|
||||
data: $(GAME)
|
||||
( cd dat ; $(MAKE) data )
|
||||
|
||||
engrave: $(GAME)
|
||||
( cd dat ; $(MAKE) engrave )
|
||||
|
||||
bogusmon: $(GAME)
|
||||
( cd dat ; $(MAKE) bogusmon )
|
||||
|
||||
epitaph: $(GAME)
|
||||
( cd dat ; $(MAKE) epitaph )
|
||||
|
||||
rumors: $(GAME)
|
||||
( cd dat ; $(MAKE) rumors )
|
||||
|
||||
@@ -264,10 +273,10 @@ install: rootcheck $(GAME) recover $(VARDAT) dungeon spec_levs
|
||||
# set up the game files
|
||||
( $(MAKE) dofiles )
|
||||
# set up some additional files
|
||||
touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile
|
||||
-( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \
|
||||
$(CHGRP) $(GAMEGRP) perm record logfile ; \
|
||||
chmod $(VARFILEPERM) perm record logfile )
|
||||
touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile $(VARDIR)/xlogfile
|
||||
-( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile xlogfile ; \
|
||||
$(CHGRP) $(GAMEGRP) perm record logfile xlogfile ; \
|
||||
chmod $(VARFILEPERM) perm record logfile xlogfile )
|
||||
true; $(POSTINSTALL)
|
||||
# and a reminder
|
||||
@echo You may also want to reinstall the man pages via the doc Makefile.
|
||||
|
||||
+20
-27
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 unixmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 unixmain.c $NHDT-Date: 1427074144 2015/03/23 01:29:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.45 $ */
|
||||
/* NetHack 3.5 unixmain.c $Date: 2012/01/27 20:15:31 $ $Revision: 1.42 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -324,7 +324,7 @@ process_options(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
int i;
|
||||
int i, l;
|
||||
|
||||
/*
|
||||
* Process options.
|
||||
@@ -332,11 +332,25 @@ char *argv[];
|
||||
while(argc > 1 && argv[1][0] == '-'){
|
||||
argv++;
|
||||
argc--;
|
||||
l = (int)strlen(*argv);
|
||||
/* must supply at least 4 chars to match "-XXXgraphics" */
|
||||
if (l < 4) l = 4;
|
||||
|
||||
switch(argv[0][1]){
|
||||
case 'D':
|
||||
wizard = TRUE, discover = FALSE;
|
||||
case 'd':
|
||||
if ((argv[0][1] == 'D' && !argv[0][2])
|
||||
|| !strcmpi(*argv, "-debug")) {
|
||||
wizard = TRUE, discover = FALSE;
|
||||
} else if (!strncmpi(*argv, "-DECgraphics", l)) {
|
||||
load_symset("DECGraphics", PRIMARY);
|
||||
switch_symbols(TRUE);
|
||||
} else {
|
||||
raw_printf("Unknown option: %s", *argv);
|
||||
}
|
||||
break;
|
||||
case 'X':
|
||||
|
||||
discover = TRUE, wizard = FALSE;
|
||||
break;
|
||||
#ifdef NEWS
|
||||
@@ -356,17 +370,12 @@ char *argv[];
|
||||
break;
|
||||
case 'I':
|
||||
case 'i':
|
||||
if (!strncmpi(argv[0]+1, "IBM", 3)) {
|
||||
if (!strncmpi(*argv, "-IBMgraphics", l)) {
|
||||
load_symset("IBMGraphics", PRIMARY);
|
||||
load_symset("RogueIBM", ROGUESET);
|
||||
switch_symbols(TRUE);
|
||||
}
|
||||
break;
|
||||
/* case 'D': */
|
||||
case 'd':
|
||||
if (!strncmpi(argv[0]+1, "DEC", 3)) {
|
||||
load_symset("DECGraphics", PRIMARY);
|
||||
switch_symbols(TRUE);
|
||||
} else {
|
||||
raw_printf("Unknown option: %s", *argv);
|
||||
}
|
||||
break;
|
||||
case 'p': /* profession (role) */
|
||||
@@ -648,20 +657,4 @@ get_unix_pw()
|
||||
return pw;
|
||||
}
|
||||
|
||||
#ifdef SYSCF_FILE
|
||||
void
|
||||
assure_syscf_file(){
|
||||
/* All we really care about is the end result - can we read the file?
|
||||
* So just check that directly. */
|
||||
int fd;
|
||||
fd = open(SYSCF_FILE, O_RDONLY);
|
||||
if(fd >= 0){
|
||||
/* readable */
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
raw_printf("Unable to open SYSCF_FILE.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
#endif
|
||||
/*unixmain.c*/
|
||||
|
||||
+127
-186
@@ -1,4 +1,4 @@
|
||||
# NetHack 3.5 Makefile.msc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
# NetHack 3.5 Makefile.msc $NHDT-Date: 1426967393 2015/03/21 19:49:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.72 $ */
|
||||
# Copyright (c) NetHack PC Development Team 1993-2015
|
||||
#
|
||||
#==============================================================================
|
||||
@@ -13,8 +13,10 @@
|
||||
#
|
||||
#==============================================================================
|
||||
# This is used for building two versions of NetHack:
|
||||
#
|
||||
# A tty port utilizing the Win32 Console I/O subsystem, Console
|
||||
# NetHack;
|
||||
#
|
||||
# A Win32 native port built on the Windows API, Graphical NetHack or
|
||||
# NetHackW.
|
||||
#
|
||||
@@ -77,6 +79,13 @@ TARGET_CPU=x86
|
||||
|
||||
GAMEDIR = ..\binary # Game directory
|
||||
|
||||
#
|
||||
#---------------------------------------------------------------
|
||||
# 4. Do you want debug information in the executable?
|
||||
#
|
||||
|
||||
DEBUGINFO = Y
|
||||
|
||||
# This marks the end of the BUILD DECISIONS section.
|
||||
#==============================================================================
|
||||
#
|
||||
@@ -109,7 +118,7 @@ DOC = ..\doc # NetHack documentation files
|
||||
UTIL = ..\util # Utility source
|
||||
SRC = ..\src # Main source
|
||||
SSYS = ..\sys\share # Shared system files
|
||||
NTSYS = ..\sys\winnt # NT Win32 specific files
|
||||
MSWSYS= ..\sys\winnt # mswin specific files
|
||||
TTY = ..\win\tty # window port files (tty)
|
||||
WIN32 = ..\win\win32 # window port files (Win32)
|
||||
WSHR = ..\win\share # Tile support files
|
||||
@@ -142,7 +151,7 @@ TARGET_CPU=x86
|
||||
# -Zd - generate only public symbols and line numbers for debugging
|
||||
# -GS - enable security checks
|
||||
#
|
||||
ccommon=-c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -c
|
||||
ccommon=-c $(CDBFLAG) -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -c
|
||||
lflags=/INCREMENTAL:NO /NOLOGO
|
||||
|
||||
!IF "$(TARGET_CPU)" == "x86"
|
||||
@@ -186,38 +195,11 @@ guilibs = $(winlibs)
|
||||
# Exe File Info.
|
||||
#==========================================
|
||||
|
||||
# Yacc/Lex ... if you got 'em.
|
||||
#
|
||||
# If you have yacc and lex programs (or work-alike such as bison
|
||||
# and flex), comment out the upper two macros and uncomment
|
||||
# the lower two.
|
||||
#
|
||||
|
||||
DO_YACC = YACC_MSG
|
||||
DO_LEX = LEX_MSG
|
||||
#DO_YACC = YACC_ACT
|
||||
#DO_LEX = LEX_ACT
|
||||
|
||||
# - Specify your yacc and lex programs (or work-alikes) here.
|
||||
|
||||
#YACC = bison -y
|
||||
YACC = byacc
|
||||
#YACC = yacc
|
||||
|
||||
#LEX = lex
|
||||
LEX = flex
|
||||
|
||||
#
|
||||
# - Specify your flex skeleton file (if needed).
|
||||
#
|
||||
|
||||
FLEXSKEL =
|
||||
#FLEXSKEL = -S../tools/flex.ske
|
||||
|
||||
YTABC = y_tab.c
|
||||
YTABH = y_tab.h
|
||||
LEXYYC = lexyy.c
|
||||
|
||||
# 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
|
||||
# (see pcconf.h). Set to nothing if not used.
|
||||
@@ -226,18 +208,6 @@ LEXYYC = lexyy.c
|
||||
RANDOM = $(OBJ)\random.o
|
||||
#RANDOM =
|
||||
|
||||
#
|
||||
# Uncomment the next 2 lines _ONLY_ if you DO NOT want any
|
||||
# debug capability in the object files, or in the NetHack executable.
|
||||
# Comment them if you want debug capability.
|
||||
|
||||
#ldebug =
|
||||
#cdebug =
|
||||
|
||||
#
|
||||
# Compiler and Linker flags
|
||||
#
|
||||
|
||||
PRECOMPHEAD = N # set to Y if you want to use precomp. headers
|
||||
|
||||
#
|
||||
@@ -301,10 +271,20 @@ DLBFLG =
|
||||
#==========================================
|
||||
#==========================================
|
||||
|
||||
PDBFILE= /PDB:"$(O)$(GAME).PDB"
|
||||
MAPFILE= /MAP:"$(O)$(GAME).MAP"
|
||||
INCLDIR= /I..\include
|
||||
|
||||
!IF "$(DEBUGINFO)" == "Y"
|
||||
CDBGFLAG=-Zi
|
||||
LDBGFLAG=/debug
|
||||
cdebug = -Zi -Od
|
||||
ldebug = /DEBUG
|
||||
!ELSE
|
||||
CDBGFLAG=
|
||||
LDBGFLAG=
|
||||
ldebug =
|
||||
cdebug =
|
||||
!ENDIF
|
||||
|
||||
!IF ("$(ldebug)" != "")
|
||||
!IF ("$(ldebug)" != "/RELEASE")
|
||||
ldebug = /DEBUG
|
||||
@@ -341,14 +321,14 @@ LIBS= user32.lib winmm.lib $(ZLIB)
|
||||
!IF ("$(GRAPHICAL)"=="Y")
|
||||
|
||||
cflagsGame = $(cdebug) $(cflags2) $(guiflags) $(INCLDIR) \
|
||||
$(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE)
|
||||
lflagsGame = $(ldebug) $(lflags) $(guilibs)
|
||||
$(WINPFLAG) $(DLBFLG)
|
||||
lflagsGame = $(ldebug) $(lflags) $(guilibs) $(GAMEPDBFILE) $(GAMEMAPFILE)
|
||||
|
||||
!ELSE
|
||||
|
||||
cflagsGame = $(cdebug) $(cflags2) $(conflags) $(INCLDIR) \
|
||||
$(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE)
|
||||
lflagsGame = $(ldebug) $(lflags) $(conlibs)
|
||||
$(WINPFLAG) $(DLBFLG)
|
||||
lflagsGame = $(ldebug) $(lflags) $(conlibs) $(GAMEPDBFILE) $(GAMEMAPFILE)
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -387,10 +367,10 @@ DLB =
|
||||
# Rules for files in sys\winnt
|
||||
#==========================================
|
||||
|
||||
{$(NTSYS)}.c{$(OBJ)}.o:
|
||||
{$(MSWSYS)}.c{$(OBJ)}.o:
|
||||
@$(CC) $(cflagsUtil) -Fo$@ $<
|
||||
|
||||
{$(NTSYS)}.h{$(INCL)}.h:
|
||||
{$(MSWSYS)}.h{$(INCL)}.h:
|
||||
@copy $< $@
|
||||
|
||||
#==========================================
|
||||
@@ -435,7 +415,7 @@ DLB =
|
||||
# referenced later on in the Makefile.
|
||||
#
|
||||
|
||||
DEFFILE = $(NTSYS)\$(GAME).def
|
||||
DEFFILE = $(MSWSYS)\$(GAME).def
|
||||
|
||||
#
|
||||
# Shorten up the location for some files
|
||||
@@ -451,19 +431,20 @@ U = $(UTIL)^\
|
||||
|
||||
MAKESRC = $(U)makedefs.c
|
||||
|
||||
SPLEVSRC = $(U)lev_yacc.c $(U)lev_$(LEX).c $(U)lev_main.c $(U)panic.c
|
||||
|
||||
DGNCOMPSRC = $(U)dgn_yacc.c $(U)dgn_$(LEX).c $(U)dgn_main.c
|
||||
|
||||
MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o
|
||||
|
||||
SPLEVOBJS = $(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.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 \
|
||||
DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_lex.o $(O)dgn_main.o \
|
||||
$(O)alloc.o $(O)panic.o
|
||||
|
||||
|
||||
RECOVOBJS = $(O)recover.o
|
||||
|
||||
TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt
|
||||
@@ -619,15 +600,16 @@ $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \
|
||||
copy $(DAT)\*.lev $(GAMEDIR)
|
||||
if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile
|
||||
! ENDIF
|
||||
if not exist $(GAMEDIR)\sysconf copy $(MSWSYS)\sysconf $(GAMEDIR)
|
||||
if exist $(DAT)\symbols copy $(DAT)\symbols $(GAMEDIR)
|
||||
if exist $(DOC)\guidebook.txt copy $(DOC)\guidebook.txt $(GAMEDIR)\Guidebook.txt
|
||||
if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt
|
||||
@if exist $(O)$(GAME).PDB copy $(O)$(GAME).pdb $(GAMEDIR)\$(GAME).pdb
|
||||
@if exist $(GAMEDIR)\$(GAME).PDB echo NOTE: You may want to remove $(GAMEDIR)\$(GAME).pdb to conserve space
|
||||
-copy $(NTSYS)\defaults.nh $(GAMEDIR)\defaults.nh
|
||||
-copy $(MSWSYS)\defaults.nh $(GAMEDIR)\defaults.nh
|
||||
echo install done > $@
|
||||
|
||||
# copy $(NTSYS)\winnt.hlp $(GAMEDIR)
|
||||
# copy $(MSWSYS)\winnt.hlp $(GAMEDIR)
|
||||
|
||||
recover: $(U)recover.exe
|
||||
if exist $(U)recover.exe copy $(U)recover.exe $(GAMEDIR)
|
||||
@@ -686,8 +668,8 @@ $(NHRES): $(TILEBMP16) $(WIN32)\winhack.rc $(WIN32)\mnsel.bmp \
|
||||
$(WIN32)\splash.bmp
|
||||
@$(rc) -r -fo$@ -i$(WIN32) -dNDEBUG $(WIN32)\winhack.rc
|
||||
!ELSE
|
||||
$(NHRES): $(NTSYS)\console.rc $(NTSYS)\NetHack.ico
|
||||
@$(rc) -r -fo$@ -i$(NTSYS) -dNDEBUG $(NTSYS)\console.rc
|
||||
$(NHRES): $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico
|
||||
@$(rc) -r -fo$@ -i$(MSWSYS) -dNDEBUG $(MSWSYS)\console.rc
|
||||
!ENDIF
|
||||
|
||||
#==========================================
|
||||
@@ -840,6 +822,14 @@ $(INCL)\vis_tab.h: $(U)makedefs.exe
|
||||
$(SRC)\vis_tab.c: $(U)makedefs.exe
|
||||
$(U)makedefs -z
|
||||
|
||||
$(DAT)\engrave: $(DAT)\engrave.txt $(U)makedefs.exe
|
||||
..\util\makedefs -s
|
||||
$(DAT)\epitaph: $(DAT)\epitaph.txt $(U)makedefs.exe
|
||||
..\util\makedefs -s
|
||||
$(DAT)\bogusmon: $(DAT)\bogusmon.txt $(U)makedefs.exe
|
||||
..\util\makedefs -s
|
||||
|
||||
|
||||
#==========================================
|
||||
# uudecode utility and uuencoded targets
|
||||
#==========================================
|
||||
@@ -850,12 +840,12 @@ $(U)uudecode.exe: $(O)uudecode.o
|
||||
$(O)uudecode.o: $(SSYS)\uudecode.c
|
||||
@$(CC) $(cflagsUtil) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c
|
||||
|
||||
$(NTSYS)\NetHack.ico : $(U)uudecode.exe $(NTSYS)\nhico.uu
|
||||
chdir $(NTSYS)
|
||||
$(MSWSYS)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu
|
||||
chdir $(MSWSYS)
|
||||
..\..\util\uudecode.exe nhico.uu
|
||||
chdir ..\..\src
|
||||
|
||||
$(WIN32)\NetHack.ico : $(U)uudecode.exe $(NTSYS)\nhico.uu
|
||||
$(WIN32)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu
|
||||
chdir $(WIN32)
|
||||
..\..\util\uudecode.exe ../../sys/winnt/nhico.uu
|
||||
chdir ..\..\src
|
||||
@@ -890,71 +880,55 @@ $(WIN32)\splash.bmp: $(U)uudecode.exe $(WIN32)\splash.uu
|
||||
..\..\util\uudecode.exe splash.uu
|
||||
chdir ..\..\src
|
||||
|
||||
#==========================================
|
||||
#=================================================
|
||||
# Level Compiler Stuff
|
||||
#==========================================
|
||||
#=================================================
|
||||
#
|
||||
# defer to the steps in ..\win\win32\levstuff.mak
|
||||
#
|
||||
|
||||
LEVCFLAGS=-c -nologo -DWINVER=0x0400 -DWIN32 -D_WIN32 \
|
||||
-D_MT -MT -I..\include -nologo -Z7 -Od -DDLB
|
||||
$(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
|
||||
|
||||
$(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
|
||||
|
||||
$(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H)
|
||||
$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_main.c
|
||||
|
||||
$(U)levcomp.exe: $(SPLEVOBJS)
|
||||
@echo Linking $@...
|
||||
@$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
|
||||
echo $(link)
|
||||
echo $(lflagsUtil)
|
||||
$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk
|
||||
$(SPLEVOBJS:^ =^
|
||||
)
|
||||
<<
|
||||
|
||||
$(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
|
||||
|
||||
$(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
|
||||
|
||||
$(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H)
|
||||
@$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)lev_main.c
|
||||
|
||||
|
||||
$(U)lev_yacc.c $(INCL)\lev_comp.h : $(U)lev_comp.y
|
||||
! IF "$(DO_YACC)"=="YACC_ACT"
|
||||
chdir $(UTIL)
|
||||
$(YACC) -d lev_comp.y
|
||||
copy $(YTABC) lev_yacc.c
|
||||
copy $(YTABH) $(INCL)\lev_comp.h
|
||||
@del $(YTABC)
|
||||
@del $(YTABH)
|
||||
chdir $(SRC)
|
||||
! ELSE
|
||||
@echo $(U)lev_comp.y has changed.
|
||||
@echo To update $(U)lev_yacc.c and $(INCL)\lev_comp.h run $(YACC).
|
||||
@echo ---
|
||||
@echo For now, we will copy the prebuilt lev_yacc.c and
|
||||
@echo lev_comp.h from $(SSYS) into $(UTIL) and use them.
|
||||
@copy $(SSYS)\lev_yacc.c $(U)lev_yacc.c >nul
|
||||
@copy $(SSYS)\lev_comp.h $(INCL)\lev_comp.h >nul
|
||||
@echo /**/ >>$(U)lev_yacc.c
|
||||
@echo /**/ >>$(INCL)\lev_comp.h
|
||||
! ENDIF
|
||||
|
||||
$(U)lev_$(LEX).c: $(U)lev_comp.l
|
||||
! IF "$(DO_LEX)"=="LEX_ACT"
|
||||
chdir $(UTIL)
|
||||
$(LEX) $(FLEXSKEL) lev_comp.l
|
||||
copy $(LEXYYC) $@
|
||||
@del $(LEXYYC)
|
||||
chdir $(SRC)
|
||||
! ELSE
|
||||
@echo $(U)lev_comp.l has changed. To update $@ run $(LEX).
|
||||
@echo ---
|
||||
@echo For now, we will copy the prebuilt lev_lex.c
|
||||
@echo from $(SSYS) into $(UTIL) and use it.
|
||||
@copy $(SSYS)\lev_lex.c $@ >nul
|
||||
@echo /**/ >>$@
|
||||
! ENDIF
|
||||
|
||||
#==========================================
|
||||
#=================================================
|
||||
# Dungeon Compiler Stuff
|
||||
#==========================================
|
||||
#=================================================
|
||||
#
|
||||
# defer to the steps in ..\win\win32\dgnstuff.mak
|
||||
#
|
||||
$(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
|
||||
|
||||
$(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
|
||||
|
||||
$(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c
|
||||
@$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_main.c
|
||||
|
||||
$(U)dgncomp.exe: $(DGNCOMPOBJS)
|
||||
@echo Linking $@...
|
||||
@@ -963,56 +937,9 @@ $(U)dgncomp.exe: $(DGNCOMPOBJS)
|
||||
)
|
||||
<<
|
||||
|
||||
$(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
|
||||
|
||||
$(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
|
||||
|
||||
$(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c
|
||||
@$(CC) $(LEVCFLAGS) -W0 -Fo$@ $(U)dgn_main.c
|
||||
|
||||
$(U)dgn_yacc.c $(INCL)\dgn_comp.h : $(U)dgn_comp.y
|
||||
! IF "$(DO_YACC)"=="YACC_ACT"
|
||||
chdir $(UTIL)
|
||||
$(YACC) -d dgn_comp.y
|
||||
copy $(YTABC) dgn_yacc.c
|
||||
copy $(YTABH) $(INCL)\dgn_comp.h
|
||||
@del $(YTABC)
|
||||
@del $(YTABH)
|
||||
chdir $(SRC)
|
||||
! ELSE
|
||||
@echo $(U)dgn_comp.y has changed. To update dgn_yacc.c and
|
||||
@echo $(INCL)\dgn_comp.h run $(YACC).
|
||||
@echo ---
|
||||
@echo For now, we will copy the prebuilt $(U)dgn_yacc.c and
|
||||
@echo dgn_comp.h from $(SSYS) into $(UTIL) and use them.
|
||||
@copy $(SSYS)\dgn_yacc.c $(U)dgn_yacc.c >nul
|
||||
@copy $(SSYS)\dgn_comp.h $(INCL)\dgn_comp.h >nul
|
||||
@echo /**/ >>$(U)dgn_yacc.c
|
||||
@echo /**/ >>$(INCL)\dgn_comp.h
|
||||
! ENDIF
|
||||
|
||||
$(U)dgn_$(LEX).c: $(U)dgn_comp.l
|
||||
! IF "$(DO_LEX)"=="LEX_ACT"
|
||||
chdir $(UTIL)
|
||||
$(LEX) $(FLEXSKEL) dgn_comp.l
|
||||
copy $(LEXYYC) $@
|
||||
@del $(LEXYYC)
|
||||
chdir $(SRC)
|
||||
! ELSE
|
||||
@echo $(U)dgn_comp.l has changed. To update $@ run $(LEX).
|
||||
@echo ---
|
||||
@echo For now, we will copy the prebuilt dgn_lex.c
|
||||
@echo from $(SSYS) into $(UTIL) and use it.
|
||||
@copy $(SSYS)\dgn_lex.c $@ >nul
|
||||
@echo /**/ >>$@
|
||||
! ENDIF
|
||||
|
||||
#==========================================
|
||||
#=================================================
|
||||
# Create directory for holding object files
|
||||
#==========================================
|
||||
#=================================================
|
||||
|
||||
$(O)obj.tag:
|
||||
@if not exist $(OBJ)\*.* echo creating directory $(OBJ)
|
||||
@@ -1050,11 +977,11 @@ envchk:
|
||||
#==========================================
|
||||
|
||||
#===========================================
|
||||
# Header files NOT distributed in ..\include
|
||||
# Header files NOT distributed in $(INCL)
|
||||
#===========================================
|
||||
|
||||
$(INCL)\win32api.h: $(NTSYS)\win32api.h
|
||||
copy $(NTSYS)\win32api.h $@
|
||||
$(INCL)\win32api.h: $(MSWSYS)\win32api.h
|
||||
copy $(MSWSYS)\win32api.h $@
|
||||
|
||||
|
||||
#==========================================
|
||||
@@ -1075,13 +1002,13 @@ $(O)dlb.o: $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)\dlb.h
|
||||
$(O)dlb_main.o: $(UTIL)\dlb_main.c $(INCL)\config.h $(INCL)\dlb.h
|
||||
@$(CC) $(cflagsUtil) /Fo$@ $(UTIL)\dlb_main.c
|
||||
|
||||
$(DAT)\porthelp: $(NTSYS)\porthelp
|
||||
@copy $(NTSYS)\porthelp $@ >nul
|
||||
$(DAT)\porthelp: $(MSWSYS)\porthelp
|
||||
@copy $(MSWSYS)\porthelp $@ >nul
|
||||
|
||||
nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \
|
||||
$(DAT)\quest.dat $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp \
|
||||
$(DAT)\history $(DAT)\opthelp $(DAT)\wizhelp $(DAT)\dungeon $(DAT)\porthelp \
|
||||
$(DAT)\license $(O)sp_lev.tag
|
||||
$(DAT)\license $(DAT)\engrave $(DAT)\epitaph $(DAT)\bogusmon $(O)sp_lev.tag
|
||||
cd $(DAT)
|
||||
echo data >dlb.lst
|
||||
echo oracles >>dlb.lst
|
||||
@@ -1091,6 +1018,9 @@ nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \
|
||||
if exist porthelp echo porthelp >>dlb.lst
|
||||
echo quest.dat >>dlb.lst
|
||||
echo rumors >>dlb.lst
|
||||
echo engrave >>dlb.lst
|
||||
echo epitaph >>dlb.lst
|
||||
echo bogusmon >>dlb.lst
|
||||
echo help >>dlb.lst
|
||||
echo hh >>dlb.lst
|
||||
echo cmdhelp >>dlb.lst
|
||||
@@ -1238,6 +1168,9 @@ spotless: clean
|
||||
if exist $(U)*.map del $(U)*.map
|
||||
if exist $(DAT)\data del $(DAT)\data
|
||||
if exist $(DAT)\rumors del $(DAT)\rumors
|
||||
if exist $(DAT)\engrave del $(DAT)\engrave
|
||||
if exist $(DAT)\epitaph del $(DAT)\epitaph
|
||||
if exist $(DAT)\bogusmon del $(DAT)\bogusmon
|
||||
if exist $(DAT)\???-fil?.lev del $(DAT)\???-fil?.lev
|
||||
if exist $(DAT)\???-goal.lev del $(DAT)\???-goal.lev
|
||||
if exist $(DAT)\???-loca.lev del $(DAT)\???-loca.lev
|
||||
@@ -1321,6 +1254,14 @@ clean:
|
||||
if exist $(O)sp_lev.tag del $(O)sp_lev.tag
|
||||
if exist $(O)uudecode.MAP del $(O)uudecode.MAP
|
||||
if exist $(O)uudecode.PDB del $(O)uudecode.PDB
|
||||
rem
|
||||
rem defer to the steps in ..\win\win32\levstuff.mak
|
||||
rem
|
||||
nmake -nologo -f ..\win\win32\levstuff.mak clean
|
||||
rem
|
||||
rem defer to the steps in ..\win\win32\dgnstuff.mak
|
||||
rem
|
||||
nmake -nologo -f ..\win\win32\dgnstuff.mak clean
|
||||
|
||||
! IF ("$(WINPFLAG)"!="")
|
||||
if exist $(TILEBMP16) del $(TILEBMP16)
|
||||
@@ -1357,14 +1298,14 @@ $(DAT)\dungeon: $(O)utility.tag $(DAT)\dungeon.def
|
||||
# NT dependencies
|
||||
#
|
||||
|
||||
$(O)nttty.o: $(HACK_H) $(TILE_H) $(INCL)\win32api.h $(NTSYS)\nttty.c
|
||||
@$(CC) $(cflagsUtil) -I$(WSHR) -Fo$@ $(NTSYS)\nttty.c
|
||||
$(O)nhkeys.o: $(HACK_H) $(TILE_H) $(INCL)\win32api.h $(NTSYS)\nhkeys.c
|
||||
@$(CC) $(cflagsUtil) -I$(WSHR) -Fo$@ $(NTSYS)\nhkeys.c
|
||||
$(O)winnt.o: $(HACK_H) $(INCL)\win32api.h $(NTSYS)\winnt.c
|
||||
@$(CC) $(cflagsUtil) -Fo$@ $(NTSYS)\winnt.c
|
||||
$(O)ntsound.o: $(HACK_H) $(NTSYS)\ntsound.c
|
||||
@$(CC) $(cflagsUtil) -Fo$@ $(NTSYS)\ntsound.c
|
||||
$(O)nttty.o: $(HACK_H) $(TILE_H) $(INCL)\win32api.h $(MSWSYS)\nttty.c
|
||||
@$(CC) $(cflagsUtil) -I$(WSHR) -Fo$@ $(MSWSYS)\nttty.c
|
||||
$(O)nhkeys.o: $(HACK_H) $(TILE_H) $(INCL)\win32api.h $(MSWSYS)\nhkeys.c
|
||||
@$(CC) $(cflagsUtil) -I$(WSHR) -Fo$@ $(MSWSYS)\nhkeys.c
|
||||
$(O)winnt.o: $(HACK_H) $(INCL)\win32api.h $(MSWSYS)\winnt.c
|
||||
@$(CC) $(cflagsUtil) -Fo$@ $(MSWSYS)\winnt.c
|
||||
$(O)ntsound.o: $(HACK_H) $(MSWSYS)\ntsound.c
|
||||
@$(CC) $(cflagsUtil) -Fo$@ $(MSWSYS)\ntsound.c
|
||||
|
||||
#
|
||||
# util dependencies
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
#
|
||||
# NetHack 3.5 sysconf $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
# NetHack 3.5 sysconf $Date: 2012/01/27 20:15:31 $ $Revision: 1.6 $
|
||||
#
|
||||
# Sample sysconf file.
|
||||
# The sysconf file is only used if NetHack is compiled with SYSCF defined.
|
||||
# This file uses the same syntax as nethack.cf.
|
||||
|
||||
# Which users can use WIZARD (debugging) mode (the -D flag).
|
||||
# A value of * allows anyone to enter debugging mode.
|
||||
WIZARDS=*
|
||||
|
||||
# Users allowed to use the ! (shell escape) command or to suspend the game.
|
||||
# Uses the same syntax as the WIZARDS option above.
|
||||
#SHELLERS=
|
||||
|
||||
# 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.
|
||||
#DEBUGFILES=*
|
||||
|
||||
# Limit the number of simultaneous games (see also nethack.sh).
|
||||
#MAXPLAYERS=10
|
||||
|
||||
# If not null, added to string "To get local support, " in the support
|
||||
# information help.
|
||||
#SUPPORT=call Izchak at extension 42.
|
||||
|
||||
# Uncomment the next line to disable the SEDUCE option.
|
||||
#SEDUCE=0
|
||||
|
||||
# Record (high score) file options.
|
||||
# CAUTION: changing these after people have started playing games can
|
||||
# lead to lost high scores!
|
||||
# Maximum entries for one person.
|
||||
#PERSMAX=10
|
||||
# Maximum entries in the record file.
|
||||
#ENTRYMAX=100
|
||||
# Minimum points to get an entry.
|
||||
#POINTSMIN=1
|
||||
# Determine identity of "person" in the score file with name (0) or
|
||||
# numeric (1) user id.
|
||||
#PERS_IS_UID=1
|
||||
|
||||
# Maximum number of score file entries to use for random statue names
|
||||
#MAX_STATUENAME_RANK=10
|
||||
|
||||
# *** LOCATIONS ***
|
||||
# IMPORTANT: If you change any of these locations, the directories they
|
||||
# point at must exist. NetHack will not create them for you.
|
||||
#
|
||||
# HACKDIR is the default location for everything.
|
||||
# Note: On Windows HACKDIR defaults to the location
|
||||
# of the NetHack.exe or NetHackw.exe file so
|
||||
# setting HACKDIR below to override that is
|
||||
# not usually necessary or recommended.
|
||||
#HACKDIR=c:\games\nethack
|
||||
#
|
||||
# The location that users can adjust their config file startup options
|
||||
#CONFIGDIR=c:\games\nethack
|
||||
#
|
||||
# The location that level files in progress are stored (default=HACKDIR, writeable)
|
||||
#LEVELDIR=c:\nethack\levels
|
||||
#
|
||||
# The location where saved games are kept (default=HACKDIR, writeable)
|
||||
#SAVEDIR=c:\nethack\save
|
||||
#
|
||||
# The location that bones files are kept (default=HACKDIR, writeable)
|
||||
#BONESDIR=c:\nethack\save
|
||||
#
|
||||
# The location that file synchronization locks are stored (default=HACKDIR, writeable)
|
||||
#LOCKDIR=c:\nethack\levels
|
||||
#
|
||||
# The location that a record of game aborts and self-diagnosed game problems
|
||||
# is kept (default=HACKDIR, writeable)
|
||||
#TROUBLEDIR=c:\nethack\trouble
|
||||
|
||||
|
||||
+45
-1
@@ -169,6 +169,7 @@ static char *FDECL(bannerc_string, (char *,const char *));
|
||||
static char *FDECL(xcrypt, (const char *));
|
||||
static unsigned long FDECL(read_rumors_file,
|
||||
(const char *,int *,long *,unsigned long));
|
||||
static void FDECL(do_rnd_access_file, (const char *));
|
||||
static boolean FDECL(d_filter, (char *));
|
||||
static boolean FDECL(h_filter, (char *));
|
||||
static boolean FDECL(ranged_attk,(struct permonst*));
|
||||
@@ -213,7 +214,7 @@ extern unsigned _stklen = STKSIZ;
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
const char *def_options = "odemvpqrhz";
|
||||
const char *def_options = "odemvpqrshz";
|
||||
char buf[100];
|
||||
int len;
|
||||
|
||||
@@ -329,6 +330,11 @@ char *options;
|
||||
case 'r':
|
||||
case 'R': do_rumors();
|
||||
break;
|
||||
case 's':
|
||||
case 'S': do_rnd_access_file(EPITAPHFILE);
|
||||
do_rnd_access_file(ENGRAVEFILE);
|
||||
do_rnd_access_file(BOGUSMONFILE);
|
||||
break;
|
||||
case 'h':
|
||||
case 'H': do_oracles();
|
||||
break;
|
||||
@@ -870,6 +876,44 @@ unsigned long old_rumor_offset;
|
||||
return rumor_offset;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
do_rnd_access_file(fname)
|
||||
const char *fname;
|
||||
{
|
||||
Sprintf(filename, DATA_IN_TEMPLATE, fname);
|
||||
Strcat(filename, ".txt");
|
||||
if (!(ifp = fopen(filename, RDTMODE))) {
|
||||
perror(filename);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
filename[0]='\0';
|
||||
#ifdef FILE_PREFIX
|
||||
Strcat(filename, file_prefix);
|
||||
#endif
|
||||
Sprintf(eos(filename), DATA_TEMPLATE, fname);
|
||||
if (!(ofp = fopen(filename, WRTMODE))) {
|
||||
perror(filename);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
Fprintf(ofp,"%s",Dont_Edit_Data);
|
||||
|
||||
tfp = getfp(DATA_TEMPLATE, "grep.tmp", WRTMODE);
|
||||
grep0(ifp, tfp);
|
||||
ifp = getfp(DATA_TEMPLATE, "grep.tmp", RDTMODE);
|
||||
|
||||
while (fgets(in_line, sizeof in_line, ifp) != 0) {
|
||||
if (in_line[0] == '#') continue; /* discard comments */
|
||||
if (in_line[0] == '\n') continue; /* and empty lines */
|
||||
(void) fputs(xcrypt(in_line), ofp);
|
||||
}
|
||||
Fclose(ifp);
|
||||
Fclose(ofp);
|
||||
|
||||
delete_file(DATA_TEMPLATE, "grep.tmp");
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
do_rumors()
|
||||
{
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 wintty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* 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 $Date: 2012/01/22 06:27:09 $ $Revision: 1.66 $ */
|
||||
/* Copyright (c) David Cohrs, 1991 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1934,7 +1934,7 @@ register int x, y; /* not xchar: perhaps xchar is unsigned and
|
||||
case NHW_TEXT: s = "[text window]"; break;
|
||||
case NHW_BASE: s = "[base window]"; break;
|
||||
}
|
||||
debugpline("bad curs positioning win %d %s (%d,%d)", window, s, x, y);
|
||||
debugpline4("bad curs positioning win %d %s (%d,%d)", window, s, x, y);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user