]> granicus.if.org Git - nethack/log
nethack
16 years agofirst conditionalized docs (TRUNK ONLY)
keni [Thu, 26 Jun 2008 15:08:54 +0000 (15:08 +0000)]
first conditionalized docs (TRUNK ONLY)
plus various related missing bits and tids

16 years agoregenerate mdgrep.h (TRUNK ONLY)
keni [Wed, 25 Jun 2008 19:04:38 +0000 (19:04 +0000)]
regenerate mdgrep.h (TRUNK ONLY)
now that this should have the right version numbers in it, save the new file

16 years agomdgrep.pl tids (TRUNK ONLY)
keni [Wed, 25 Jun 2008 19:02:38 +0000 (19:02 +0000)]
mdgrep.pl tids (TRUNK ONLY)
aka "try again before the wireless drains my laptop battery"

16 years agomakedefs --grep prep, misc cleanup (TRUNK ONLY)
keni [Wed, 25 Jun 2008 18:56:47 +0000 (18:56 +0000)]
makedefs --grep prep, misc cleanup (TRUNK ONLY)
use makedefs --grep in Makefile.doc
call make clean in doc from make clean in top
add commented out rule to produce mdgrep.h from mdgrep.pl
macosx1.5: don't chown/chgrp for single-user install
unixmain.c: work around C90 warning for Mac-specific code, fix last fix
makedefs.c: temporarily disallow blank after control introducer until docs
 catch up
mdgrep.pl: add ALLDOCS, clean up generated file's header

16 years agofollowup (trunk only)
keni [Sun, 15 Jun 2008 00:23:56 +0000 (00:23 +0000)]
followup (trunk only)
Finally found a flag combination that will complain about declarations mixed in
with other code: -ansi -pedantic.
Clean up the violations of that I just introduced and add that flag to the
Mac 10.5 hints file.  (Note that there is one warning left in unixmain.c -
it's in Mac-specific code.)

16 years agoSHELLERS for SYSCF, MacOS 10.5 hints file (trunk only)
keni [Sat, 14 Jun 2008 20:57:21 +0000 (20:57 +0000)]
SHELLERS for SYSCF, MacOS 10.5 hints file (trunk only)
Add SHELLERS - people allowed to use ! command with same syntax as WIZARDS.
Add new hints file for 10.5, since the rules and commands for groups changed
(new commands introduced in 10.4, old ones removed in 10.5; creating a new
user under 10.4 gave you a matching group, in 10.5 it doesn't).  Also move
shared build into roughly right place in file system when being installed
for root - don't use ~root.
Makefile.top - don't remove ./-p unless it exists (that's always annoyed me).
fix error invoking macosx.sh

16 years agorestful sleep bit (trunk only)
nethack.rankin [Tue, 27 May 2008 04:49:43 +0000 (04:49 +0000)]
restful sleep bit (trunk only)

     A change yesterday made putting on an amulet of restful sleep avoid
clobbering the timeout from having already eaten one, only replace it if
the new timeout is shorter.  This does the inverse; when eating one, if
you're already sleepy from also wearing that type of amulet, only replace
the timeout if new one is shorter.  And don't clobber the other intrinsic
bits with FROMOUTSIDE, just add it to whatever ones might already be set.
Neither should have any observable effect on game play, so no fixes entry.

16 years agofix #H1662 - temporary vs permanent sleepiness (trunk only)
nethack.rankin [Mon, 26 May 2008 05:46:21 +0000 (05:46 +0000)]
fix #H1662 - temporary vs permanent sleepiness (trunk only)

     From a bug report, wearing
(or removing) an amulet of restful sleep was overriding permanent
sleepiness which had been obtained previously via eating another amulet.
The setting of timeout clobbered the non-timeout bits for that intrinsic.

     This also adds the timeout counter for sleepiness to enlightenment
feedback in wizard mode.  Unrelated:  rephrase enlightenment feedback for
adornment to more accurately describe what that does.

16 years agomakedefs build on non-C99 compilers follow up
nethack.allison [Wed, 21 May 2008 02:15:09 +0000 (02:15 +0000)]
makedefs build on non-C99 compilers follow up

Pat Rankin wrote:
>      That patch looks incorrect.  `CONSUME' increments argv,
> so now a different value is being passed to the function when
> initializing that variable than was passed before.

16 years agomakedefs build on non-C99 compilers
nethack.allison [Tue, 13 May 2008 11:38:46 +0000 (11:38 +0000)]
makedefs build on non-C99 compilers

..\util\makedefs.c(426) : error C2143: syntax error : missing ';' before 'type'
..\util\makedefs.c(427) : error C2065: 'p' : undeclared identifier
..\util\makedefs.c(428) : error C2065: 'p' : undeclared identifier

16 years agoinitial sling skill
nethack.rankin [Thu, 8 May 2008 03:50:44 +0000 (03:50 +0000)]
initial sling skill

     From a bug report, archeologists were
inadvertently starting out at basic skill level in sling because of their
carried touchstone, which is flagged as being sling ammo.

16 years agolex sync (trunk only)
nethack.rankin [Thu, 8 May 2008 02:18:55 +0000 (02:18 +0000)]
lex sync (trunk only)

     Propagate recent util/*_comp.l changes to sys/share/*_lex.c.

16 years agomdgrep.pl tid
keni [Wed, 23 Apr 2008 10:48:04 +0000 (10:48 +0000)]
mdgrep.pl tid
Use the right name for the output file in all places.
Thanks Pat.

16 years agomore warning cleanup, makedefs grep bits (trunk only)
keni [Tue, 22 Apr 2008 23:20:44 +0000 (23:20 +0000)]
more warning cleanup, makedefs grep bits (trunk only)
drop -Wcast-qual
warning cleanup (lev_comp)
comment bits
makedefs grep cleanup: drop magic constant, add --grep-define, --grep-undef,
 #ifdef out code not needed yet, update mdgrep.h, mdgrep.pl

16 years agomore warning cleanup (trunk only)
keni [Fri, 18 Apr 2008 17:37:33 +0000 (17:37 +0000)]
more warning cleanup (trunk only)
More warning bits that never got committed.
More appropriate compiler flags for warning checks (macosx only for the moment).
The changes in dgn*[lc] just rename line_number to nh_line_number to avoid a
clash, so no need to regenerate the lex output.

16 years agomacosx hints file consolidation (trunk only)
keni [Tue, 8 Apr 2008 23:17:39 +0000 (23:17 +0000)]
macosx hints file consolidation (trunk only)
get macosx down to one hints file (default tty, single user) for
 tty, x11, qt and single or multiple users
preliminary bits that might allow a macosx qt build

16 years agoadd MAXPLAYERS to SYSCF (trunk only)
keni [Mon, 7 Apr 2008 22:27:18 +0000 (22:27 +0000)]
add MAXPLAYERS to SYSCF (trunk only)
Add MAXPLAYERS to SYSCF config file; deprecate (but continue to support)
 MAX_NR_OF_PLAYERS in nethack.sh since it is trivially overridden in many
 (all?) cases and isn't useful for ports that don't use nethack.sh.

16 years agomakefile bit for makedefs grep (trunk only)
keni [Sun, 6 Apr 2008 00:58:13 +0000 (00:58 +0000)]
makefile bit for makedefs grep (trunk only)
add dependency for mdgrep.h

16 years agomakedefs conditional grep (trunk only)
keni [Sun, 6 Apr 2008 00:48:40 +0000 (00:48 +0000)]
makedefs conditional grep (trunk only)
This code (except for some of the argument parsing changes) is not used yet.
mdgrep.pl generates mdgrep.h; like the lex and yacc files we ship mdgrep.h
 pre-generated; there is no need for perl on end-user/end-compiler systems.
 (In fact mdgrep.h is so simple mdgrep.pl is probably overkill.)
mdgrep.h creates an array reflecting the compiler options in effect
The changes to makedefs break the Mac OS9 compile; if necessary the fix is
 simple and documented (but I think that port is permanently dead).
With that port out of the way, makedefs can be allowed to take real options;
 none of the current options have been changed.  Instead, a second sub-main
 routine has been added to handle options starting with two hyphens and all
 the new options start with two hyphens:
--input specifies the input file (- is stdin)
--output specifies the output file (- is stdout)
--grep causes the input file to be filtered into the output file
--grep-showvars dumps the info from the array in mdgrep.h
--grep-trace turns on tracing of the grep filtering
Docs for the filtering language are in the source.

16 years agotweak probing while swallowed (trunk only)
nethack.rankin [Sat, 22 Mar 2008 17:32:10 +0000 (17:32 +0000)]
tweak probing while swallowed (trunk only)

     Follow up to the patch that adds a fake inventory entry for the
swallowed hero when probing an engulfer.  Make the header for the hero
be plural to match those of object classes, and prefix the hero entry
itself with a/an to reflect its count of 1.
| Swallowed Creature              ->  Swallowed Creatures
| > - elven ranger called wizard  ->  > - an elven ranger called wizard

16 years agoprobing while swallowed (trunk only)
nethack.rankin [Fri, 21 Mar 2008 03:12:14 +0000 (03:12 +0000)]
probing while swallowed (trunk only)

     Reported recently by <Someone>:  probing feedback while engulfed
shouldn't claim that the monster is not carrying anything when the hero
is inside of it.  The simple case where it's not carrying anything else
was a trivial one line change; handling inventory plus hero was trickier
and I wouldn't have bothered if I'd realized what it was going to take.
But it's done now; trivial case
        The purple worm is not carrying anything besides you.
and harder case
        The purple worm's possessions:
        Weapons
        a - an uncursed dagger
        Swallowed Creature
        > - human archeologist called wizard

16 years agopost-3.4.3 obj not free panic
nethack.rankin [Fri, 21 Mar 2008 03:09:37 +0000 (03:09 +0000)]
post-3.4.3 obj not free panic

     Throwing an object while engulfed and then quitting triggers a panic
when the end-of-game code tries to clean up the thrown object.  Throwing
code wasn't reflecting the fact that adding the missile to the engulfer's
inventory already handles the thrown object.  3.4.3 wasn't affected; it
didn't bother trying to clean up `thrownobj' in done().

16 years agobuild error message tid
keni [Tue, 18 Mar 2008 23:11:28 +0000 (23:11 +0000)]
build error message tid
Don't call impossible() if there are no window types  - we just core after
being told to #quit when it's too early to do so.

16 years agoaborting key/pick usage (trunk only)
nethack.rankin [Sat, 8 Mar 2008 03:45:26 +0000 (03:45 +0000)]
aborting key/pick usage (trunk only)

     From the newsgroup:  applying a key and then using ESC at direction
choosing prompt was using up a move even though hero didn't do anything.

16 years agowand engraving bit (trunk only)
nethack.rankin [Fri, 7 Mar 2008 03:01:51 +0000 (03:01 +0000)]
wand engraving bit (trunk only)

     Readability tweak; use `WAND_BACKFIRE_CHANCE'.  This code for giving
cursed wand a chance to explode when engraving is in the branch too, but
the macro wasn't added there.

17 years agodisplay/map glitch in C quest temple
nethack.rankin [Sat, 1 Mar 2008 08:10:53 +0000 (08:10 +0000)]
display/map glitch in C quest temple

     From a bug report:  in the irregularly
shaped temple on the C quest home level (the room where the leader is
located), the lit south wall contained a dark spot where a secret door
is located.  It stayed blank until you got right next to it rather than
just until you got to a good angle facing it.  (Magic mapping hides the
problem by showing that spot as a wall instead of leaving it as unseen;
you have to walk or teleport to that room in order to see the problem.)
The code that lights walls and doors which border lit rooms neglected
temporary walls produced by secret doors.

17 years agovitamin deficiency (trunk only)
nethack.rankin [Fri, 22 Feb 2008 01:44:57 +0000 (01:44 +0000)]
vitamin deficiency (trunk only)

     Implement something <Someone> suggested a long time ago:  eating a
disenchanter corpse has a chance to remove an intrinsic.  Uses the same
routine as nighttime gremlin attacks, which chooses an intrinsic randomly
and attempts to remove it, so has no effect if it chooses one the hero
lacks.  This can be used to remove "aggravate monster" but is much more
likely to target something the player wants to keep.  [By the way, a lot
of potential candidates are missing:  sleep, shock, and disintegration
resistance and teleport control come immediately to mind.]

     Also, it has been bugging me that you can get both strength and
fire/cold/shock resistance from the same fire/frost/storm giant corpse.
The code prevents mind flayer corpses from conferring both intelligence
and telepathy, so strength handling was inconsistent (even though it
predated mind flayers...).  This causes strength boosting to be treated
as an extra candidate when selecting an intrinsic to confer, so you'll
either get strength or resistance (which might be a no-op) but not both
from those giants.  And it special cases the other giants to have the
same 50% chance for boosting strength, even though the alternative in
their case is to do nothing instead of trying to confer something else.
Lastly, it now gives a message when you succeed in gaining strength.

17 years agofix #M57 - alchemical potion explosion fails to wake monsters
nethack.rankin [Thu, 21 Feb 2008 06:18:08 +0000 (06:18 +0000)]
fix #M57 - alchemical potion explosion fails to wake monsters

     From a bug report,
the message when dipping one stack of potions into another triggers an
explosion says "BOOM" yet nearby sleeping monsters remained undisturbed.

17 years agoeel hiding behavior (trunk only)
nethack.rankin [Thu, 21 Feb 2008 05:52:08 +0000 (05:52 +0000)]
eel hiding behavior (trunk only)

     From a bug report:  an exposed eel in an isolated
pool--swamp rooms sometimes produce those--would never re-hide no matter
how long you left its vicinity.  Re-hiding is part of post-move handling
and an eel with no adjacent water to move into would never reach that bit
of code since it didn't move anywhere.  The code used to re-hide monsters
when you return to a previous level was ignoring eels altogether.  Give
unhidden eels a chance to hide earlier during monster movement and also
when the hero returns to their level.

     Also a really minor bit to slow down hit point loss of eels out of
water.  I don't think anybody reverse genocides krakens to get experience
any more since they don't provide a big bonus when they're out of water,
so this change won't have much of an affect.

17 years agoshow source of bits of makefiles (trunk only)
keni [Thu, 21 Feb 2008 01:16:41 +0000 (01:16 +0000)]
show source of bits of makefiles (trunk only)
Mark the generated makefiles as generated and mark the source of each section
to aid debugging.

17 years agomore lint (trunk only)
nethack.rankin [Wed, 20 Feb 2008 01:26:13 +0000 (01:26 +0000)]
more lint (trunk only)

     The one `anything any' that was triggering a warning was shadowing
another `anything any' in the same function; no need to rename it, just
remove the unnecessary declaration.  Also, mark the couple of arrays with
initializers that I'd noticed as static instead of letting them default
to auto.  The abil_to_spfx()::abil2spfx[] one might need to be redone in
code as a switch if some compilers/linkers have trouble initializing it.

17 years agoWindow type not recognized tid (trunk only)
keni [Wed, 20 Feb 2008 00:30:15 +0000 (00:30 +0000)]
Window type not recognized tid (trunk only)
Fix the grammar error that results when a binary with one window system
compiled in is explicitly told to use another.

17 years agowarnings cleanup (trunk only)
keni [Wed, 20 Feb 2008 00:27:56 +0000 (00:27 +0000)]
warnings cleanup (trunk only)
This covers the warning cleanup bits no one objected to.

17 years agoPlaceholder for Amiga large disks (untested)
keni [Sun, 17 Feb 2008 23:49:47 +0000 (23:49 +0000)]
Placeholder for Amiga large disks (untested)
placeholder so we don't lose large disk fix, but I can't test it

17 years agoidentify_pack (trunk only)
nethack.rankin [Sat, 16 Feb 2008 02:31:34 +0000 (02:31 +0000)]
identify_pack (trunk only)

     Three years ago <email deleted> reported that
stepping off the end of inventory via typing space to go to the next menu
page wasted his identify scroll.  He suggested that some people might do
that because they don't know how to back up in a multi-page menu.  I
pointed out the Guidebook section that describes < and ^ to go back one
page or back to start and left things at that.  However, traditional mode
reprompts if you step through all of inventory without choosing something,
so this changes identify-via-menu to do likewise.  You can dismiss the
menu with ESC to really avoid choosing anything.

     This also makes identification of N items when you're carrying N or
fewer unID'd things behave the same as identify all:  identify everything
without any prompting.

17 years agomore ^X (trunk only)
nethack.rankin [Wed, 13 Feb 2008 00:12:42 +0000 (00:12 +0000)]
more ^X (trunk only)

     The characteristics display checked for cursed rings of sustain
ability but neglected to check for uncursed ones locked in place by
cursed gloves or weapon.  And the half-hearted attempt to check for
future items conferring Fixed_abil couldn't handle an uncursed thing
covered by something cursed either, so just get rid of it.

17 years ago^X refinement (trunk only)
nethack.rankin [Tue, 12 Feb 2008 01:32:15 +0000 (01:32 +0000)]
^X refinement (trunk only)

     Use sentences for the characteristics (instead of "Strength = 15") to
match the rest of the enlightenment display.  When showing ATTRMAX, phrase
as "limit" rather than "maximum" since magical ajdustments can exceed max.
And be more selective about which alternate attribute numbers to show:
 Your strength is 14 (current; base:13).  => +1 ring of gain strength
 Your strength is 13 (current; peak:14).  => lost a point to poison or abuse
 Your strength is 14 (current; base:13, peak:14).  => combo of both of those
 Your strength is 14 (current; limit=18/50).  => you're a gnome
instead of always showing all of base & peak & limit when any of the three
are interesting.  During play, a limit which is different from normal human
(18 or 18/100) is considered to be interesting; for end of game disclosure,
it's interesting iff the final value hasn't reached maximum, regardless of
what that max is.

17 years agoimitation spelling (trunk only)
nethack.rankin [Mon, 11 Feb 2008 00:23:06 +0000 (00:23 +0000)]
imitation spelling (trunk only)

     I'm not a contender to win any spelling bees.  (Mimicker does't
seem to even be a real word; I'm not sure if it ought to end in "or"
instead of "er".  But changing it to "mime" would be too weird.)

17 years agodone_in_by shapechanger (trunk only)
nethack.rankin [Sun, 10 Feb 2008 02:54:53 +0000 (02:54 +0000)]
done_in_by shapechanger (trunk only)

     Augment killer reason when slain by a shapechanged creature:
"killed by a foo" becomes "killed by a chameleon immitating a foo" or
"killed by a vampire in foo form" or "killed by the Wizard of Yendor
disguised as a foo" (after double-trouble, when the clone starts out
mimicking something).

     I put the fixes entry in the new features section.

17 years ago#monpolycontrol of unseen monsters and of vampires (trunk only)
nethack.rankin [Fri, 8 Feb 2008 03:19:09 +0000 (03:19 +0000)]
#monpolycontrol of unseen monsters and of vampires (trunk only)

     I was testing something with #monpolycontrol enabled and got a
series of "Change it into what kind of monster? [type the name]" prompts
when I went to a new level.  It was asking about monsters that were being
created (in this case, multiple vampires for top level of Vlad's Tower)
and naturally I couldn't see them since the level wasn't finished yet.
This switches to noit_mon_nam() to at least be informed about the type
of creature you're being asked to specify a shape for, and adds the map
coordinates so that it doesn't appear to be reprompting for the same
monster over and over when multiple similar ones are being created.

     In the process I discovered that #monpolycontrol would let you give
any type of monster for the shape of vampires.  Unlike chameleons, they
don't change into arbitrary shapes so that was inappropriate.  [And
trying to test the fix for this is what led to the previous ^G patch.]

17 years agowizard mode ^G of shapechangers (trunk only)
nethack.rankin [Fri, 8 Feb 2008 02:21:21 +0000 (02:21 +0000)]
wizard mode ^G of shapechangers (trunk only)

     A while back there was a change in how the initial shape for a
shapechanging monster gets chosen during monster creation, and a side-
effect of that lets/makes you choose the shape when #monpolycontrol is
enabled.  But ^G was overriding your choice by forcing the shapechanger
to start out looking like the type of monster that you specified (to ^G,
not to subsequent #monpolycontrol prompting), hence always in its natural
shape.  The intent for ^G was that if asked for a unique monster but got
a doppelganger instead, it would initially look like the requested unique
monster.  Post-3.4.3 code, so no fixes entry needed.

17 years agoexercise/abuse while polyd (trunk only)
nethack.rankin [Sun, 3 Feb 2008 06:42:25 +0000 (06:42 +0000)]
exercise/abuse while polyd (trunk only)

     Three years ago <Someone> reported that even though exercise of
attributes other than wisdom is suppressed while the hero is polymorphed,
attribute gains or losses due to pre-existing exercise can still take
place in that situation.  Since it's an entirely different set of attrs
which will be replaced upon rehumanizing, there's not much point.  (The
same is actually true for wisdom, but I didn't change how exercise works
for it.)  Adopt his one-liner fix:  old exercise won't cause attribute
changes while polymorphed; it will silently fade as it does when its
magnitude is insufficient to trigger a change.

     While checking that out, I noticed that exerchk() was using `/= 2'
to fade out old exercise/abuse.  That will produce platform-dependent
results for negative values (ie, for the abuse case) since C's integer
division doesn't specify whether to truncate towards zero or towards
negative infinity.  In particular, -1 / 2 could yield -1 rather than 0
as the code expected.  (Its impact on play was negligible though.)

     This reduces the code for displaying the messages which accompany
attribute gain/loss.  A few were repharsed in order to simplify that.

17 years agobuild fix (trunk only)
nethack.rankin [Sun, 3 Feb 2008 06:20:05 +0000 (06:20 +0000)]
build fix (trunk only)

     The recent SYSCF patch introduced a build problem even though I
haven't attempt to use that new stuff yet.  My compiler complained that
`out' in build_english_list() was used without being initialized, which
in turn caused make to quit.  The compiler was right; only the words==1
case actually set up the output buffer.  Once that buffer was fixed, the
routine to copy a single word was overwriting it on each call instead of
building up via appending as intended.

     I changed the 3 or more case to yield "A, B, or C" like Keni wrote
in his description rather than the "A, B or C" which was being produced.
I'm pretty sure that both forms are considered acceptible; I've always
used the first one with an extra comma in front of and/or.

17 years agomore SYSCF and related bits - cleanup and features
keni [Thu, 31 Jan 2008 00:56:59 +0000 (00:56 +0000)]
more SYSCF and related bits - cleanup and features
infrastructure for "system options" - things currently specified at build
 time that should be changeable at install time or run time but not really
 under user control
generalize contact info so it can be localized and it doesn't have to be
 an email address
move recently introduced WIZARDS into sysopt
drop bogus OPTIONS=wizards possibility
new function build_english_list() to comma-ize and add 'or' from a whitespace separated list: A.  A or B.  A, B, or C.
syscf file now handles: WIZARDS SUPPORT RECOVER
 SUPPORT specifies local support information
 RECOVER will eventually supply port-specific and/or localized info on how
  to run recover (or get it run for you).
Note: in sys/msdos I changed sys.o (generated from pcsys.c) to pcsys.o
Note: sys/msdos/Makefile.GCC has 2 rules for sys.o (now pcsys.o)

17 years agoring discovery (trunk only)
nethack.rankin [Tue, 29 Jan 2008 04:17:03 +0000 (04:17 +0000)]
ring discovery (trunk only)

     Picking up and putting on a +1 ring of protection while blind
resulted in having a "+1 ring (on {left|right} hand)" in inventory and
having ring of protection show up in the discoveries list.  The problem
is the same as the one for wands which has been previously addressed
(but not 100% fixed...):  when using an item whose effect is observable,
the item's type became discovered based upon that observation even if the
item itself had never been seen.

     The code for removing ring of protection lacked its break statement
and fell into the case for removing ring of protection from shapechangers,
but didn't cause any noticeable problem.

17 years agoblindfolds and more (trunk only)
nethack.rankin [Mon, 28 Jan 2008 02:39:32 +0000 (02:39 +0000)]
blindfolds and more (trunk only)

1) the change yesterday to mark inventory as seen when recovering from
   blindness neglected to handle blindfold removal;
2) fix grammar when using 'R' or 'a' to try to remove cursed lenses
   (now "they are cursed" instead of "it is cursed");
3) attempting to put on a wielded or quivered blindfold, amulet, or ring
   and failing because of already wearing one (or two in the case of
   rings, where cursed gloves and ESC at "which ring-finger?" prompt got
   similar result) unwielded/unquivered item rather than leave it as is.

17 years agoinventory after regaining sight typo (trunk only)
nethack.rankin [Sun, 27 Jan 2008 02:54:52 +0000 (02:54 +0000)]
inventory after regaining sight typo (trunk only)

     Out of date diff last time.

17 years agoinventory display after regaining sight (trunk only)
nethack.rankin [Sun, 27 Jan 2008 02:06:18 +0000 (02:06 +0000)]
inventory display after regaining sight (trunk only)

     I suspect--but have no way to test--that there is a subtle difference
in game play between perm_invent and !perm_invent involving object merging
or other activity that depends on whether or not object->dknown is set.
For objects pickup up while blind, where object->dknown is left as is,
the perm_invent config would have such items marked as seen sooner (since
there are umpteen places that call update_inventory() which will end up
setting the seen bit while formatting objects).  Non-perm_invent wouldn't
have that done until the user examines invent (or asks to see a list of
objects at the "which object?" prompt for various commands).  This patch
effectively examines inventory whenever blindness ends, so both modes get
dknown set as soon as possible.  And if we ever add an "effect known" flag
for unseen objects which are used while blind, this would be a suitable
place to perform deferred object discovery.

17 years agoinitoptions warning following its split (trunk only)
nethack.allison [Sat, 26 Jan 2008 17:00:18 +0000 (17:00 +0000)]
initoptions warning following its split (trunk only)

..\src\options.c(565) : warning C4101: 'opts' : unreferenced local variable
The code in initoptions_init() that uses opts seems to now be isolated to
UNIX and VMS.

17 years agoH1406: jellyfish have no head
cohrs [Fri, 25 Jan 2008 16:58:48 +0000 (16:58 +0000)]
H1406: jellyfish have no head
I did some research, and technically, a jellyfish does indeed have no head
(and, technically, no brain, just a "nerve net").  The part on top is a
"bell" used for buoyancy, not a head.

17 years agolinux warning bits (trunk only)
cohrs [Fri, 25 Jan 2008 16:47:50 +0000 (16:47 +0000)]
linux warning bits (trunk only)
a few syntactical tweaks to silence warnings from gcc on linux
for code that was only updated in the trunk

17 years ago'T' failure feedback; suit_simple_name() (trunk only)
nethack.rankin [Fri, 25 Jan 2008 03:25:38 +0000 (03:25 +0000)]
'T' failure feedback; suit_simple_name() (trunk only)

     The post-3.4.3 ring removal bug also applied to suit when wearing a
cloak and shirt when wearing a suit or cloak or both, although it would
never give "you have nothing else to take off" because the covering item
was always present as a likely candidate.  The ring fix also fixed armor.
When testing that fix, I saw "you can't take that off" for trying to take
off a suit while wearing a cloak.  That isn't new or a bug, but it seemed
awfully terse so I've changed it to give "you can't take that off without
taking off your cloak first".  (Likewise, "cloak", "suit", or "cloak and
suit" as appropriate when trying to take off a shirt.)

     This adds new routine `suit_simple_name()', comparable to 3.4.3's
cloak_simple_name() and post-3.4.3 helm_simple_name().  No doubt there
are other places besides "without taking off your X first" that could
make use of it but I haven't attempted to track them down.  The "you are
already wearing _some armor_" one doesn't quite fit.  It would need to
adjust "some" to "a"/"an" at times ("some mail" or "some dragon scales"
vs "a suit" or "a jacket").

17 years ago'R' behavior for rings (trunk only)
nethack.rankin [Fri, 25 Jan 2008 02:54:51 +0000 (02:54 +0000)]
'R' behavior for rings (trunk only)

     A bug in some post-3.4.3 code made attempting to remove a worn ring
when wearing two skip inventory the selection and give "you don't have
anything else to remove" if you were wearing gloves and weren't wearing
an amulet or blindfold.  The intent was that rings wouldn't be included
as likely candidates in the list of inventory letters to choose from if
you were wearing cursed gloves, but had a copy+paste mistake in the
argument controlling whether to consider the gloves curse state and was
in the wrong section of getobj()'s "ugly hacks".  Also, it makes more
sense to require that the player know that those gloves are cursed, so
inaccessibe_equipment() got changed too.  [Not knowing that the gloves
are cursed leaves rings listed as candidates; picking a ring will get
removal failure feedback later and mark the gloves as known cursed then.]

17 years agoburied ball enhancement (trunk only)
nethack.rankin [Wed, 23 Jan 2008 03:32:09 +0000 (03:32 +0000)]
buried ball enhancement (trunk only)

     Make being tethered to a buried iron ball be a bit more interesting
than just being stuck in the floor.  You can now move within a shortened
chain radius (1 step from the ball's burial location rather than normal 2
that applies when it's on the floor).  This has only been modestly tested,
and the message gets to be annoying if you move around a bit while monster
attack and object pickup/drop messages are being delivered.  There ought
to be some better way to override Norep.

     This would work nicer if the chain was actually visible at the ball's
location instead of becoming implicit at the time of burial.  But I don't
want to try to figure out all the ramifications of having an object on
the floor which can't be moved--perhaps uchain handling already suffices,
but I suspect that there's a can of worms waiting to have its lid opened.

17 years agomoving while trapped (trunk only)
nethack.rankin [Tue, 22 Jan 2008 22:28:09 +0000 (22:28 +0000)]
moving while trapped (trunk only)

     Pull the u.trap portion of domove() into a separate routine.  The
only significant change is to the wording of a couple of TT_BURIEDBALL
messages.  Like with enlightenment, say "you are <steed> are chained to
a buried ball" instead of "<steed> is chained to a buried ball" if you
try to move while mounted and punished and attached ball has been buried.
Unlike floor trap activation, punishment doesn't directly affect steed.

17 years agoenlightenment tweak (trunk only)
nethack.rankin [Tue, 22 Jan 2008 21:28:27 +0000 (21:28 +0000)]
enlightenment tweak (trunk only)

     Yesterday's changes made it possible to use ^X to recognize an
unknown ring as one of sustain ability by checking whether wearing the
ring blocks display of base/peak/maximum characteristics when those are
considered to be interesting.  This limits that to cases where the ring
is cursed, so using ^X to figure out the type will leave an undesireable
ring stuck on your finger.  (Both before and after are unnoticeable in
wizard mode, where items which block access to base strength, dex, &c
are overridden by magical disclosure.)

17 years agofix #1586 - stale alignment record after changing alignment type (trunk only)
nethack.rankin [Tue, 22 Jan 2008 05:31:19 +0000 (05:31 +0000)]
fix #1586 - stale alignment record after changing alignment type (trunk only)

     From a bug report, putting on a helm of opposite
alignment wipes out divine protection (regardless of which god originally
bestored it) but leaves piety level towards the old god in place for the
new one.  Reset alignment record to 0 when changing alignment type.  Yes,
that means that the helm can now be used to clear a negative alignment,
which I think is in keeping with having subtle positive uses for bad items.

     Permanent alignment change did try to tweak alignment record, but
I'm not sure that it worked as intended.  Lawfuls changing away from law
got a bonus for their new alignment, neutrals retained their old record,
and chaotics changing away from chaos took a penalty to their record, all
without regard to what the new alignment became.  The magnitude of the
bonus or penalty was half the record limit (which gradually increases with
turn count) so could be very big, but I don't think it made much sense.
Reset alignment record to 0 for permanent conversion same as for temporary
conversion.  It's simpler and reflects the fact that you haven't yet done
anything to bolster or weaken your new alignment.

17 years agoenlightenment revamp, part III (trunk only)
nethack.rankin [Tue, 22 Jan 2008 04:42:29 +0000 (04:42 +0000)]
enlightenment revamp, part III (trunk only)

     Replace the old ^X output with integrated enlightenment feedback.
Expands enlightenment output into four sections:  Background and
Characteristics in addtion to previous Status and Attributes.  Final
disclosure and ^X in wizard or explore modes show all four; potion/wand
of enlightenment and throne insight show the last two to give traditional
enlightenment, near enough; and ^X in normal mode shows the first three,
encompassing the 3.4.x ^X display in streamlined form plus providing
details about bottom line information.

     I think I'm done with enlightenment for the time being, except for
the desire to move it (plus associated conduct feedback) to end.c or
perhaps its own file.  It has grown very long and doesn't particularly
fit in cmd.c; I don't think it ever belonged there at all unless wizard
mode ^X predates potion of enlightenment.

17 years agoenlightenment revamp, part II (trunk only)
nethack.rankin [Mon, 21 Jan 2008 19:07:33 +0000 (19:07 +0000)]
enlightenment revamp, part II (trunk only)

     Split enlightenment output into two sections:  Status and Attributes.
Status began life as the set of bottom line status conditions and steadily
grew to include many things which ought to be such conditions but aren't
because of lack of space there.  It also adds a few missing enlightenment
entries for Underwater (separate from magical breathing), Punished,
trapped, and stuck to cursed saddle.  Most of the lesser status conditions
with bottom line tags (Confusion, Hallucination, &c) used to be shown only
for end-of-game disclosure but now get included all the time.  They aren't
necessarily redundant if/when a very long bottom line is being truncated.

     The ^X changes are still to come.

17 years agoenlightenment revamp, part I (trunk only)
nethack.rankin [Mon, 21 Jan 2008 16:40:56 +0000 (16:40 +0000)]
enlightenment revamp, part I (trunk only)

     Groundwork for re-doing ^X so that it'll be more integrated with
enlightenment and display bottom line information without abbreviations
or long-line truncation.  `mode' doesn't do anything yet so may provoke
lint complaints.

17 years agosystem-wide configuration file
keni [Wed, 9 Jan 2008 01:57:41 +0000 (01:57 +0000)]
system-wide configuration file
Add options SYSCF (to add a system-wide configuration file) and SYSCF_FILE
(for a file-based implementation of SYSCF) - this allows a binary distribution
to be configured at install time.  The only option supported at this time is
WIZARDS - a list of usernames which can use -D; currently only for unix-likes
but should be extendable to anything that has a concept of multiple users.
Add mac tty multiuser config using sgid.

17 years agowin32 vs random.c
nethack.rankin [Sun, 23 Dec 2007 00:59:25 +0000 (00:59 +0000)]
win32 vs random.c

     From a bug report.
Pointer subtraction yields a result of type ptrdiff_t which can be
bigger than type long, potentially resulting in warnings about value
truncation--in these cases, when assigning to a long.

17 years agodrain energy attack (trunk only)
nethack.rankin [Thu, 20 Dec 2007 23:02:47 +0000 (23:02 +0000)]
drain energy attack (trunk only)

     During some recent newsgroup discussion, <Someone> posted an entry from
his personal bug list:  energy draining damage from ordinary attacks is
implemented even though there are no monsters with that capability and it
was not implemented for engulf attacks even though energy vortices have
the capability.  This implements energy drain engulf attacks against the
hero and also both modes of energy drain attacks for monsters and poly'd
hero against spellcasting monsters.  Since monsters don't have energy,
they lose access to their special abilities (their spells, that is) for a
few turns, same as a post-3.4.3 change done for anti-magic traps.

17 years agoremove time_t from struct you - follow up bit
nethack.allison [Wed, 19 Dec 2007 03:30:57 +0000 (03:30 +0000)]
remove time_t from struct you - follow up bit

17 years agoremove time_t from struct you (trunk only)
nethack.allison [Wed, 19 Dec 2007 03:19:25 +0000 (03:19 +0000)]
remove time_t from struct you (trunk only)

There was an issue reported where save files between different
versions of a manufacturer's compiler were incompatible because the time_t
ubirthday field was changed from 32 bits to 64 bits.

32 bit time_t implementations will break at 19:14:07 on  January 18, 2038.
64 bit time_t implementations will break at 23:59:59 on December 31, 3000.

This removes the dependency on the size of time_t from the save file.
The ubirthday field is no longer embedded in struct you.
This also adds two general purpose routines to hacklib.c, one to convert a time
value to a 14 character char representation and the other to convert that
back to time_t. Those are used by the save/restore routines.

This is a savefile breaking change, so editlevel in patchlevel.h was
incremented.

17 years agolong worm tail hit by potion thrown by monster (trunk only)
nethack.rankin [Mon, 17 Dec 2007 23:43:31 +0000 (23:43 +0000)]
long worm tail hit by potion thrown by monster (trunk only)

     From the newsgroup:  when a monster throws a potion at the hero and
it hits a long worm's tail, you'd get "The bottle|flask|&c crashes on the
long worm's _head_ and breaks into shards."  The relevant code changes
"head" to "body" when appropriate, but monster throwing wasn't setting up
`notonhead' so that alteration only kicked in for player throwing.

17 years agohints cleanup tids (trunk only)
keni [Mon, 17 Dec 2007 22:39:15 +0000 (22:39 +0000)]
hints cleanup tids (trunk only)

17 years agohints for linux X11; typo fix (trunk only)
keni [Sun, 16 Dec 2007 15:38:21 +0000 (15:38 +0000)]
hints for linux X11; typo fix (trunk only)
Add hints file for single-user linux X11.
Fix typo in macos-x11.
nethack.sh: don't run xset unless $DISPLAY is set

17 years agolinux hints file and xset bugfix (trunk only)
keni [Sun, 16 Dec 2007 02:18:22 +0000 (02:18 +0000)]
linux hints file and xset bugfix (trunk only)
Add a hints file for an ubuntu tty build and skip xset if no fonts.dir
file exists (this test will probably need another tweak, but I need a
linux x11 build first to test it).

17 years agoupdate or remove out of date config files
nethack.allison [Sat, 15 Dec 2007 14:29:21 +0000 (14:29 +0000)]
update or remove out of date config files

17 years agoupdate or remove out of date config files
nethack.allison [Sat, 15 Dec 2007 14:21:09 +0000 (14:21 +0000)]
update or remove out of date config files

17 years agoFirst pass at a hints-based build system to augment (not replace) the existing
keni [Thu, 13 Dec 2007 20:17:11 +0000 (20:17 +0000)]
First pass at a hints-based build system to augment (not replace) the existing
build system.

Anyone who wants to do a build from sys/unix and doesn't want to figure this
out just needs to do:
sh setup.sh hints/unix
instead of:
sh setup.sh
and then continue on as usual.

New files:
sys/unix/NewInstall.unx - the new directions
sys/unix/hints/* - the hints files.  There will be more later.
sys/unix/mkmkfile.sh - helper for setup.sh

Summary of changes:
see NewInstall.unx for info on the new build system
introduction of various preprocessor symbols to turn options off that
 are defaulted on historically
comment out nethackrc (and similar) entries that still use the old symbol
 syntax.
commenting out of Makefile.* lines that now come from hints/unix
GAMEDIR is replaced with HACKDIR so the Makefiles and the C source agree.
  Note that I have NOT changed the docs and/or Makefiles for be, msdos, os2,
  vms, or winnt.  If port maintainers don't then I will, but I can't test
  those ports.
nethack.sh now handles the font path automatically

17 years agoobj sanity bit (trunk only)
nethack.rankin [Mon, 3 Dec 2007 21:16:46 +0000 (21:16 +0000)]
obj sanity bit (trunk only)

     Remove some redundant declarations from recently revised code.

17 years agofix suicidal panic
nethack.rankin [Mon, 3 Dec 2007 21:13:58 +0000 (21:13 +0000)]
fix suicidal panic

     Some post-3.4.3 code in done() cleans up thrownobj and kickobj to
plug a potential memory leak (unnoticeable one since the game is over),
but they have to be free objects rather than on any list.  toss_up() was
leaving thrownobj defined after putting the thrown object on the floor,
leading to "obj not free" panic from dealloc_obj() if threw you an object
upward and it dealt fatal damage when it fell back down.  (For non-fatal
damage, toss_up()'s caller cleaned things up later.)

17 years agojetison old warning code
nethack.rankin [Sat, 1 Dec 2007 21:07:23 +0000 (21:07 +0000)]
jetison old warning code

     Get rid of most of the vestiges of the old warning code that was
replaced over 7 years ago.  I left the list of colors which were used for
warning flashes.

17 years agofix recent gold drop fix (trunk only)
nethack.rankin [Fri, 30 Nov 2007 07:11:59 +0000 (07:11 +0000)]
fix recent gold drop fix (trunk only)

     A recent change to prevent dropping 2**32 gold from producing an
object with quanity 0 also prevented dropping all your gold when omitting
a count.

17 years agofix recent gold pickup fix
nethack.rankin [Fri, 30 Nov 2007 07:10:49 +0000 (07:10 +0000)]
fix recent gold pickup fix

     A recent change to delete the floor object sooner when picking up
gold resulted in accessing that object after it had been freed.

17 years agoendgame portal detection (trunk only)
nethack.rankin [Sun, 25 Nov 2007 23:03:47 +0000 (23:03 +0000)]
endgame portal detection (trunk only)

     In the newsgroup about three weeks ago someone described trying to
use the Bell of Opening to find the magic portal on the Plane of Water
and not succeeding.  It's supposed to work like a wand of secret door
detection to mark nearby traps as known.  And does, but it turns out
that the wand wasn't working as expected there either.  They both require
line of sight, and since the water outside of the bubbles blocks that
they only found the portal if it was within the same bubble as the hero.
(Clouds on the Plane of Air posed a similar problem, although monster
activity usually reveals the portal on that level so this wasn't much of
an issue there.)  Since the detection magic doesn't require the hero to
see the traps--wand and Bell both work while blind--this patch overrides
the line of sight requirement on the Planes of Water and Air.  As long as
hero is within the detection magic's range, the portals on those levels
will get marked as having been seen and when the hero gets into the right
bubble or out of the clouds the portal traps will be shown on the map.

     The line-of-sight override code is simple-minded and lets players
find traps through boulders when/if those are present (but the found
traps won't be seen yet since vision still controls the map display).
Also, it assumes that only water/air/cloud terrain is present so could
potentially yield strange results if any other terrain gets introduced on
either of those two levels.

17 years agoshop gold vs hangup
nethack.rankin [Sun, 18 Nov 2007 19:52:44 +0000 (19:52 +0000)]
shop gold vs hangup

     From the newsgroup:  hangup save while picking up gold from the
floor in a shop would duplicate that gold in the save file.  First the
gold amount was being added to hero's gold, then two messages were given
[pline() or prinv() about pickup followed by one from costly_gold() about
shop credit], and lastly the floor gold would be removed.  The second
message could trigger --More-- and provide a controllable interruption
point between giving the gold to the hero and removing it from the floor.
Change this to do the removal step before feedback.

17 years agoopen/close while blind (trunk only)
nethack.rankin [Fri, 16 Nov 2007 06:53:23 +0000 (06:53 +0000)]
open/close while blind (trunk only)

     From a bug report, attempting to open or close
a door while blind didn't always update the map display after telling the
player that a remembered-closed door was already open or a remembered-open
door was already closed.  And in the cases where it did update the map to
reflect a change in door state, it didn't use up a turn.  Now always update
the display and use up a turn when 'o' or 'c' reveals any new information.

17 years agofix #H1419 - missing object sanity checks for nested containers (trunk only)
nethack.rankin [Tue, 13 Nov 2007 21:48:01 +0000 (21:48 +0000)]
fix #H1419 - missing object sanity checks for nested containers (trunk only)

     From a bug report, wizard mode's sanity_check
option has a check for container contents but wasn't using it recursively
for nested containers, so the contents of the latter weren't checked.
This fixes that, and also adds a check for objects carried by migrating
monsters.  And it now formats objects and monsters fully even if the hero
happens to be blind or hallucinating at the time.

     Tested by using a debugger to poke in various bits of invalid data.

17 years ago0 gold pieces (trunk only)
nethack.rankin [Thu, 1 Nov 2007 19:24:19 +0000 (19:24 +0000)]
0 gold pieces (trunk only)

     Newsgroup discussion about the devnull tournament which started
today has pointed out that ``d4294967296$'' would cause getobj() to create
a gold piece object with quantity 0 which then got dropped to the floor.
(It's specific to gold; other types of objects don't behave that way.)
Also, wrapping which went past negative and zero all the way to positive
again (like 429496729*10+7, yielding 1) wasn't detected.

17 years agoshapechanger's inventory (trunk only)
nethack.rankin [Wed, 31 Oct 2007 09:02:31 +0000 (09:02 +0000)]
shapechanger's inventory (trunk only)

     Newsgroup discussion points out that a chameleon which starts out
in nymph form also starts out with nymph's inventory (50% chance each for
mirror and potion of object detection).  That's not right; shapechanging
shouldn't manufacture items.  Also, the post-3.4.3 code to initialize
vampires was overly complicated in order to preserve chameleon behavior,
but the old chameleon initialization which used rndmonst() instead of
selecting a preferred shape was just that way by accident (says the
person who implemented preferred shapes however long ago and completely
overlooked that at the time...).

     This is tricky to test; ^G these days forces a created shapechanger
to start out in its natural form.  That's a bit odd to begin with (a side-
effect of transforming requests for uniques and other special monsters
into doggelgangers), but downright strange when monpolycontrol is enabled;
a prompt to pick monster shape is issued, then the player's choice gets
overridden.  I'm not sure which aspect, if any, of all this should be
changed to fix a wizard mode quirk.

17 years agomore vms file access
nethack.rankin [Wed, 31 Oct 2007 00:04:32 +0000 (00:04 +0000)]
more vms file access

     The fix for #H1409 a couple of days ago included updates for
sys/vms/Makefile.* but not vmsbuild.com.  I thought the latter didn't
need any, but was mistaken; vmsfiles.c needs to be compiled early in
order for vmsfiles.obj to be present in the object library when makedefs
gets linked.

17 years agovms file access
nethack.rankin [Sun, 28 Oct 2007 09:37:56 +0000 (09:37 +0000)]
vms file access

     Fix the problem From a bug report.  His system has a logical name "DATA" pointing at some disk, and
when the dlb utility tried to open "data" for inclusion in the library
being built at install time, it attempted to access the wrong thing and
failed.  He then attempted to fix it in a manner which let dlb finish, by
modifying dlb_main.c to append "." to file names that lack a dot, but
then nethack couldn't access "dungeon" in the library because string
comparison didn't match the altered dlb directory entry of "dungeon.".

     NetHack was working around this unintended interaction with the
environment issue in fopen_datafile(), and dlb was doing so for fopen()
but not open().  This moves nethack's fixup out of src/files.c and into
sys/vms/vmsfiles.c, adds another routine there so that both open() and
fopen() are covered, and updates the vms Makefiles so that the various
utility programs all link with vmsfiles.  (The build script vmsbuild.com
puts object files into a library and gets that last bit for free.)

17 years agoenlightenment feedback for sight-based properties (trunk only)
nethack.rankin [Fri, 26 Oct 2007 02:24:22 +0000 (02:24 +0000)]
enlightenment feedback for sight-based properties (trunk only)

     "You can see invisible" is misleading when you can't see anything,
so use alternate phrasing for See_invisible when blind.  Also, add extra
wizard mode feedback when blindness is overridden by the monk's Eyes
artifact, when invisibility is blocked by worn mummy wrapping, and when
clairvoyance is blocked by worn cornuthaum.  And fix end-of-game disclosure
for blindness; it was only being shown if/when caused by worn blindfold.

17 years agoinvisibility vs blindness
nethack.rankin [Fri, 26 Oct 2007 02:00:43 +0000 (02:00 +0000)]
invisibility vs blindness

     Reported a month ago by <email deleted>, putting on
a cloak of invisibility while blind and then using ';' or '/' to examine
yourself revealed that you had become invisible.  This fix just changes
the lookat() output when you can't see that you can't see yourself.  :-)
Probing and stethoscope still reveal invisibility, as will any message
which uses x_monnam() to identify the hero.  (First part is intentional;
last part seems not worth bothering about--I'm not even sure that the
player can arrange to trigger it.)

17 years agowizard mode typo
nethack.rankin [Fri, 28 Sep 2007 01:17:24 +0000 (01:17 +0000)]
wizard mode typo

Minor copy+paste carelessness for wizard mode wishing from 7 months ago.

17 years agoupdate tool shopkeeper names list (trunk only)
nethack.rankin [Sat, 15 Sep 2007 01:56:06 +0000 (01:56 +0000)]
update tool shopkeeper names list (trunk only)

     shknam.c had the same comment typo as the one just fixed in do_name.c.
In the process of fixing it, I noticed that the prefix usage for Janet's
name didn't match that comment.  And in the process of fixing _that_, I
promoted several names from being port-specific to general and added a few
missing ones.  There was no attempt to be comprehensive; I'm sure that lots
of port team members' names are still missing.

17 years agocomment typo (trunk only)
nethack.rankin [Sat, 15 Sep 2007 01:06:04 +0000 (01:06 +0000)]
comment typo (trunk only)

17 years agocovetous mons vs temple priests (trunk only)
nethack.rankin [Thu, 13 Sep 2007 01:00:05 +0000 (01:00 +0000)]
covetous mons vs temple priests (trunk only)

     Prevent monsters who kill other monsters to obtain the Amulet from
targetting a priest inside his temple.  Blocks players from just staying
on the Sanctum stairs while a teleporting arch-lich or Asmodeus fetchs the
Amulet from Moloch's high priest for them.  A previous post-3.4.3 change
prevented monsters from targetting the Wizard; this extends that (and
assumes that we can ignore the possibility of other temple priests ever
handling the Amulet).  The earlier patch went into the branch code, but
inhistemple() isn't available there so this one is trunk only.

17 years agofix #H1378 - vault guard interaction while swallowed
nethack.rankin [Sat, 1 Sep 2007 01:12:34 +0000 (01:12 +0000)]
fix #H1378 - vault guard interaction while swallowed

     From a bug report, if you're swallowed
while in a vault and the guard arrives, he'll ask your name even though
you're hidden within the engulfer.  This makes him give a message and
then leave, as is already done if you're mimicking an object or unable to
speak.

     This also suppresses his repeated "Move along!" message if you're
swallowed or held since it's silly to keep telling you to move when you
obviously can't.

17 years agofeedback from exploding potions of acid (trunk only)
nethack.rankin [Sat, 25 Aug 2007 00:32:10 +0000 (00:32 +0000)]
feedback from exploding potions of acid (trunk only)

     water_damage() gave "A potion explodes!" when destroying potions of
acid even when it was a stack of multiple potions exploding.  The vague
fixes entry "grammar, spelling and other typos" covers this one....

17 years agocomment bit
nethack.rankin [Thu, 23 Aug 2007 22:56:05 +0000 (22:56 +0000)]
comment bit

     Full moon and Friday the 13th affect Luck's equilibrium point, but
not its range (which is always -10 to +10 for natural luck, -13 to +13
when extended by luck-conferring objects).  The water_damage() comment
implying that max Luck could be 14 during a full moon was incorrect.

17 years agofix pet feeding feedback (trunk only)
nethack.rankin [Mon, 20 Aug 2007 23:32:42 +0000 (23:32 +0000)]
fix pet feeding feedback (trunk only)

     From a bug report, unseen pet sensed by
telepathy was referred to as "it" in the message given when it ate food.
This code is subtly convoluted and has now been changed at least four or
five times over the years.  This patch changes the terse comment to try to
spell out the intent.  Whether or not the new code actually matches that
intent remains to be seen....

17 years agore-fix #H1371 - dead monster fleeing
nethack.rankin [Mon, 20 Aug 2007 00:05:24 +0000 (00:05 +0000)]
re-fix #H1371 - dead monster fleeing

     From a bug report, a monster which
died by moving into a trap which was next to the hero standing on Elbereth
resulted in "The <mon> is killed!  The <mon> turns to flee!".  An earlier
change made monflee() return if it's given a dead monster, so the fleeing
message is no longer given.  This fixes the place where monflee() was
inappropriately being called for a dead monster in the reported situation.

17 years agotin access (trunk only)
nethack.rankin [Thu, 9 Aug 2007 03:20:24 +0000 (03:20 +0000)]
tin access (trunk only)

     From the newsgroup:
The tin opens like magic!
<some interruption occurs>
You stop opening the tin.
Either it opens immediately or it doesn't, so the "opens like magic"
message is inaccurate.  Rather than simply changing the phrasing, this
gives blessed tins a 50% chance to really open immediately so that their
contents are available for eating on the same turn, and 50% to behave as
before but with a message which is suitable for the single turn delay.
Hero poly'd into a metalivore always gets the same-turn case when eating
any tin.  Use of a tin opener has a chance to do so (always when blessed,
50/50 for same-turn vs 1 turn delay when uncursed, 33/33/33 same-turn or
1 or 2 turn delay when cursed).

     Overall, blessed tins are better than they used to be, since half
of the time you'll save a turn, but they're still not reliable to eat in
the midst of combat since sometimes you'll need another turn and will be
likely to get interrupted in that situation.  Uncursed tin openers still
give the same behavior as opening blessed tins, so are also better than
they used to be.  Blessed tin openers are now superior, and cursed ones
are slightly inferior in addition to being welded to hero's weapon hand.

17 years agodrawbridge feedback (trunk only)
nethack.rankin [Fri, 3 Aug 2007 01:49:33 +0000 (01:49 +0000)]
drawbridge feedback (trunk only)

     The open and close commands had some feedback when player attempted
to use them on a drawbridge, but they didn't handle all the permutations.

17 years agofix #H1232 - hole in ice is described as moat [2 of 2] (trunk only)
nethack.rankin [Fri, 3 Aug 2007 01:09:13 +0000 (01:09 +0000)]
fix #H1232 - hole in ice is described as moat [2 of 2] (trunk only)

     Adding an extra parse rule changes yacc's tables and has produced a
large diff for a small update.

17 years agofix #H1232 - hole in ice is described as moat [1 of 2] (trunk only)
nethack.rankin [Fri, 3 Aug 2007 01:05:50 +0000 (01:05 +0000)]
fix #H1232 - hole in ice is described as moat [1 of 2] (trunk only)

     From a bug report, when ice on the Valkyrie
quest home level was melted and a boulder filled the resulting pool, that
pool was described as a moat.  This was actually a terrain issue rather
than a formatting glitch, so instead of tweaking waterbody_name() with an
extra special case, extend the level compiler to allow specifying ice as
frozen pool instead of always being frozen moat.  There's no provision
for having both types of ice on the same level, just a level-wide flag to
control which of the two applies for ice on that level.

     This change has a side-effect for the V quest levels:  once ice has
been melted, a second blast of fire will now boil away the pool and leave
a pit.  The unfrozen water locations on the home level already behaved
that way (ie, they are pools rather than moats) so this should be ok.  I
also added <Someone>'s suggestion to make one of the two drawbridges
on the goal level start in random state instead of always being open.