]> granicus.if.org Git - nethack/log
nethack
14 years agopurple worms in wall (trunk only)
nethack.rankin [Tue, 11 Jan 2011 02:21:10 +0000 (02:21 +0000)]
purple worms in wall (trunk only)

     From a bug report, a purple worm
could swallow a ghost or xorn and end up inside solid rock.  It took a
bunch of tries to reproduce this, but I eventually did.  (I'm not sure
why it didn't happen every time a worm swallowed a target which was in
rock; the code for positioning an engulfer after it digests a target
always puts the engulfer in the target's former spot.)  After this
patch, worms can still swallow ghosts and xorns, but only when they're
in locations the worm could walk onto.

14 years agomore mimic-as-boulder (trunk only)
nethack.rankin [Wed, 5 Jan 2011 01:28:36 +0000 (01:28 +0000)]
more mimic-as-boulder (trunk only)

     I started to add handling for doorways containing mimic-as-boulder
to doopen() and doclose() as was done for pick_lock(), but decided that
it was better just to prevent mimics from appearing as boulders at closed
door locations in the first place.  So the most recent pick_lock() change
and its fixes entry go away.

     This also fixes a post-3.4.3 bug.  On the top level of Sokoban I
discovered a boulder over a hole; probing reported it as a mimic with
0 hp.  The special level loading code moves mimic-as-boulder away from
trap spots by using place_monster() to put it on another spot, but it
was missing the corresponding remove_monster() to take it away from the
original location so left a stale pointer on the map.

14 years agofix #H2154 - unlocking door blocked by mimic-as-boulder (trunk only)
nethack.rankin [Sun, 2 Jan 2011 01:35:14 +0000 (01:35 +0000)]
fix #H2154 - unlocking door blocked by mimic-as-boulder (trunk only)

     Reported five months ago by <email deleted>,
the top level of Sokoban has mimics who pose as boulders and if one was
in a doorway (treasure zoo at final destination) you could still unlock
the door there without waking the mimic.  Yesterday's fix for unlocking
a door which was actually a mimic posing as one didn't handle this case.

14 years agofix #H2210 - unlocking a mimic masquerading as a door (trunk only)
nethack.rankin [Sat, 1 Jan 2011 00:34:19 +0000 (00:34 +0000)]
fix #H2210 - unlocking a mimic masquerading as a door (trunk only)

     From a bug report, attempting to use a key,
lock pick, or credit card on an open doorway that contained a mimic posing
as a closed door reported "that doorway has no door" or "you cannot lock
an open door" as if no monster was present, and failed to find the mimic.

14 years agofix grid bug travel bug
cohrs [Thu, 30 Dec 2010 21:47:06 +0000 (21:47 +0000)]
fix grid bug travel bug
From a bug report, grid bug could travel 1 step diagonally
due to special case code in findtravelpath that did not check grid bug
movement restriction

14 years agogcc warning
cohrs [Tue, 28 Dec 2010 19:54:41 +0000 (19:54 +0000)]
gcc warning

14 years agoH2162 - topten handling of long names
cohrs [Tue, 28 Dec 2010 19:43:01 +0000 (19:43 +0000)]
H2162 - topten handling of long names
<Someone> reported that being killed by a monster with a long name
can result in nethack going into an infinte loop printing spaces.  Handle
this by detecting attempts to wrap the topten output on a word that is too
long and just inserting breaks in the middle of the word in this case.

14 years agotalking gecko (trunk only)
nethack.rankin [Tue, 14 Dec 2010 01:14:37 +0000 (01:14 +0000)]
talking gecko (trunk only)

     Suggested by <email deleted>, chatting to a gecko will
give a reference to GEICO's car insurance ads.  I limited it to when
the hero is hallucinating.  Chatting to a gecko monster, or to anything
capable of speaking--except for a couple of previously handled special
cases, like quest leader--which happens to look like a gecko at the time,
or (50:50 chance) to a shopkeeper regardless of appearance, you'll get
"15 minutes can save you 15 zorkmids", parodying "15 minutes can save you
15% or more on car insurance".  (One of my comments says there's a chance
to interfere with shopping, but that's not accurate since using #chat to
get shop price quotes doesn't use the monster-response routine.  I left
that comment in anyway; the "15 minutes" response might interfere afterall
if someone mistakenly thinks they can save gold by waiting that long
before paying their shopping bill.)

     I don't think we ever found a good place to add some reference to
GEICO's other--and more relevant to nethack--slogan, "so easy a caveman
can do it".

14 years agofix #H2195 - late discovery for teleport scrolls (trunk only)
nethack.rankin [Mon, 6 Dec 2010 01:44:58 +0000 (01:44 +0000)]
fix #H2195 - late discovery for teleport scrolls (trunk only)

     I accidentally left this out.  Getting rusty I guess....

14 years agofix #H2195 - late discovery for teleport scrolls (trunk only)
nethack.rankin [Mon, 6 Dec 2010 01:39:33 +0000 (01:39 +0000)]
fix #H2195 - late discovery for teleport scrolls (trunk only)

     From a bug report, when reading an unknown
scroll which turns out to be teleportation, if you happened to land on
another scroll of teleportation it wouldn't be discovered yet, even
though you ought to know that type of scroll by then.  Fixing it required
moving handling of that scroll into the teleport code, since discovery
depends upon where you arrive and by then it's too late for seffects() to
do anything that affects feedback for any objects you land on.

     Also fixes a post-3.4.3 bug where seffects() was making decisions
based on Teleport_control without being aware that Stunned now negates it
during teleportation.

14 years agoartifact naming tweak (trunk only)
nethack.rankin [Fri, 29 Oct 2010 00:56:49 +0000 (00:56 +0000)]
artifact naming tweak (trunk only)

     3.4.3 and earlier had a bug that let players discover luck stones
and amulets of esp by attempting to name unID'd gray stones or amulets
after corresponding quest artifacts and seeing whether they got "your
hand slips" feedback.  There's been a fix for this in place for a while,
but after recent newsgroup discussion I wanted to confirm that it works
as intended for amulets as well as for gray stones.  It does.  I ended
up with "a circular amulet named T*e Eye of the Aethiopica" (where that
asterisk was something other than the original "h" due to slippage)
which looks odd to me.  I've modified the code to leave leading "the"
intact and only distort the remainder of such a name.  This doesn't go
so far as to make sure distortions don't touch the "of the" portion in
the middle although it probably should.

14 years agoClean up the visual studio express build further
nethack.allison [Sun, 5 Sep 2010 14:22:20 +0000 (14:22 +0000)]
Clean up the visual studio express build further

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/

14 years agoI missed removal of some unnecessary complication on the first pass of this.
nethack.allison [Mon, 30 Aug 2010 13:35:05 +0000 (13:35 +0000)]
I missed removal of some unnecessary complication on the first pass of this.

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/

14 years agoFiles update for VS Express 2010.
nethack.allison [Mon, 30 Aug 2010 13:26:07 +0000 (13:26 +0000)]
Files update for VS Express 2010.

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/

14 years agoUpdate Install.nt instructions for VS Express 2010.
nethack.allison [Mon, 30 Aug 2010 13:14:41 +0000 (13:14 +0000)]
Update Install.nt instructions for VS Express 2010.

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/

14 years agoEnable build under current MS Visual Studio Express 2010 tools
nethack.allison [Mon, 30 Aug 2010 13:00:53 +0000 (13:00 +0000)]
Enable build under current MS Visual Studio Express 2010 tools

Since the current suite is freely downloadable, remove the older VS files.

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/

14 years agoEnable build under current MS Visual Studio Express 2010 tools
nethack.allison [Mon, 30 Aug 2010 12:34:10 +0000 (12:34 +0000)]
Enable build under current MS Visual Studio Express 2010 tools

Since the current suite is freely downloadable, remove the older VS files.

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/

14 years agostone-to-flesh vs Heart of Ahriman (trunk only)
nethack.rankin [Sat, 28 Aug 2010 00:15:39 +0000 (00:15 +0000)]
stone-to-flesh vs Heart of Ahriman (trunk only)

     From the newsgroup:  a player accidentally cast the stone-to-flesh
spell at himself (I don't recall whether he chose wrong spell or wrong
direction, or tried to cancel and game used last remembered direction)
and the barbarian quest artifact he was carring turned into a meatball.
Artifacts already have a high chance (95%) to resist being polymorphed
but that doesn't apply for the stone-to-flesh transformation.  This
gives stone artifacts a high chance (98%) to resist being turned into
flesh.  Non-artifacts also get a small chance (2%) to resist as well.

14 years agoadd a note about a useless var (from <Someone>)
keni [Tue, 17 Aug 2010 14:11:39 +0000 (14:11 +0000)]
add a note about a useless var (from <Someone>)

14 years agofix #H2161 - writing scrolls based on description (trunk only)
nethack.rankin [Sat, 14 Aug 2010 00:31:59 +0000 (00:31 +0000)]
fix #H2161 - writing scrolls based on description (trunk only)

     From a bug report, you could write scrolls
by type name ("magic mapping") if you had that type of scroll in your
discoveries list via assigning a name to an unknown scroll ("scroll
labeled FOOBIE BLETCH called foo").  Being on that list was enough to
treat the type as known when writing scrolls and books.  And he fealt
that it was abusive to be able to collect and name a lot of unknown
scrolls and then write favorite ones which had good odds of being in the
collected set.

     This changes it to the original intent:  if your discoveries list
has FOOBIE BLETCH on it, you can write a scroll by that label (since we
decided way back when that a scroll's label was its magic, to explain how
a blind hero can read any scroll whose description is known even though
they aren't constructed in braille).  If you have identified the type
("scroll of magic mapping labeled FOOBIE BLETCH") then you can write by
type or by description, but you can no longer write one by type when only
the description is known.  There is a potential can-of-worms bug here:
if you walked across a "scroll labeled YUM YUM" but have not assigned it
any name, you've still learned its magic words and ought to be able to
write a scroll of YUM YUM.  We don't have any mechanism to track items
which have been observed but not been put on the discoveries list.  This
patch plugs one obvious hole, by scanning inventory to treat any seen
scroll labels there as an extension of the discoveries list.  But the
more general case of something once seen but not named or currently held
is ignored.

     This also adds writing scrolls by the user-assigned name, so if
your discoveries list has "scroll labeled FOOBIE BLETCH called foo" you
can write either foo or FOOBIE BLETCH to get the scroll.  I'm not sure
the bug report advocated that--parts of it were a bit confusing, at
least to me--and I'm not completely sure that we want to have it, but it
does work.  Without it, you got "no such thing as \"foo\"", which seems
counter-intuitive when "foo" is there in plain sight on your discoveries
list.  The new code chooses randomly if multiple scrolls have been called
"foo".  And if you've called something by an actual object name, it uses
your knowledge of that object rather than anything you've given its name
to.  In other words, if you have "scroll labeled YUM YUM called magic
mapping" and try to write magic mapping, it will use your knowledge--or
lack of same--about scroll of magic mapping rather than scroll labeled
YUM YUM to decide whether you'll succeed.

     There is also a minor tweak in the chance to write a completely
unknown scroll or book.  Wizards almost never failed once their Luck was
5 or more; using rnl(5) instead of rnl(3) requires Luck 11 rather than
just 5 to get that ~39/40 chance of success.  Non-wizards didn't change.

     Lastly, this fixes an unrelated bug when writing spellbooks.  The
message "the spellbook warps strangely, then turns <new description>"
works okay when <new description> is "red" or even "ragged", but not so
well when it's "vellum".  A handful of book descriptions refer to the
item composition rather than the appearance of the cover, and turning
into a new composition needs different phrasing.  I just tweaked it to
be "turns into vellum", which is probably suboptimal (particularly for
the book description "cloth" :-).

14 years agoforgetting spells due to amnesia (trunk only)
nethack.rankin [Tue, 27 Jul 2010 03:08:04 +0000 (03:08 +0000)]
forgetting spells due to amnesia (trunk only)

     From the newsgroup, losing spells to amnesia always took away the
last 'N' spells after choosing a random N.  That kept casting letters
sane, since letters for lost spells became invalid and those for non-lost
ones stayed the same as they were before amnesia.  But 3.4.x gave the
player the ability to swap pairs of spells, so he could make his favorites
to be the first spells, and only lose them if the random number of spells
being affected was as large as the whole list.  (Also, divine spellbook
gifts give preference to books for unknown spells; in theory, you could
use spell letter manipulation plus deliberate amnesia to make a particular
spell revert to unknown in order to improve the chance of getting a new
spellbook for it.  A bit of cleverness by a determined player but it
makes the game and/or its patron deities seem a bit dumb in the process.)

     I first implemented losing spells throughout the list, with later
spells moved forward to fill any gaps.  But that results in new casting
letters for every spell past the first lost one, potentially wreaking
havoc if a player chooses a casting letter from his own memory of the
pre-amnesia list.  So, instead of losing some spells entirely, either
from the end of the list or spread throughout, I've changed amnesia to
set the retention amount (of N spells from throughout the list) to zero,
the same as happens when it's been 20000 turns since the spell was last
learned.  Letters for all known spells stay unchanged, and forgetting
due to amnesia becomes the same as the other way of forgetting spells.
(So now a different potential clever use of amnesia occurs; a player who's
trying to a make speed ascension could get access to expired spells--to
cast in order to become confused--without waiting for 20000 turns after
reading the first book.)

14 years agofix #H2151 - typo in towel's lookat/whatis entry
nethack.rankin [Mon, 26 Jul 2010 01:03:11 +0000 (01:03 +0000)]
fix #H2151 - typo in towel's lookat/whatis entry

     From a bug report, the entry
in data.base for towel repeated the word "down" in the quote from Douglas
Adams' _The_Hitchhiker's_Guide_to_the_Galaxy_.  I double checked the book
itself to verify that the quote shouldn't say "down down".

14 years agofix #H2150 - discovering displacement when can't see its effect
nethack.rankin [Sat, 24 Jul 2010 03:53:52 +0000 (03:53 +0000)]
fix #H2150 - discovering displacement when can't see its effect

     From a bug report, when putting on a
cloak of displacement you discovered what it was even if you were invisible
and unable to see invisible, hence couldn't see yourself.  It isn't exactly
clear what the hero sees of himself when displaced, but I think it makes
sense that you shouldn't discover the cloak when you can't see yourself,
which suggests that you shouldn't discover it when blind either.

     Discovering it after regaining sight, becoming able to see your
invisible self, or losing invisibility seemed complex and likely to be
bug-prone, so this patch leaves the cloak undiscovered in that situation.
But it does become discovered when taken off (provided that you can see
yourself by then) rather than waiting all the way 'til put back on again.

     Elven cloaks had a comparable issue.  I assume that stealthiness can
be perceived without being able to see yourself, but it shouldn't become
discovered when you're already stealthy from some other means.  (Elven
boots already behaved this way; now elven cloaks work like them.)

     Rings of stealth would never be auto-discovered.  Now they'll be
like elven cloaks and boots and be discovered if put on when not already
steathy or taken off and losing stealth.  In both cases, the ring has to
have its description known; if picked up when blind and still not seen
yet it won't become discovered even when you notice yourself gaining or
losing stealth.

     Not tested:  feedback given when a worn ring or cloak gets dipped
into a potion of polymorph and changes into or away from a stealth or
displacement conferring item.

14 years agoeating corpses while hallucinating (trunk only)
nethack.rankin [Fri, 2 Jul 2010 01:49:51 +0000 (01:49 +0000)]
eating corpses while hallucinating (trunk only)

     Contributed by <email deleted>, give an
alternate message when eating a corpse while hallucinating, including one
that gives homage to Tony the Tiger from old Frosted Flakes commercials
if you happen to be polymorphed into a tiger.  Even players who try to
keep their characters hallucinating all the time are unlikely to ever run
into "tastes gr-r-reat!".

     I rewrote the conditional expression to only test Hallucination once.
And I added the comment about omnivores, who'll never get "is delicious"
result with the current carnivore vs herbivore logic.  (That behavior has
been around for quite a while, but seems somewhat suspect.)

14 years agoGuidebook update and SEDUCE runtime switch
keni [Thu, 13 May 2010 00:54:13 +0000 (00:54 +0000)]
Guidebook update and SEDUCE runtime switch
add SYSCF docs to the Guidebook because it's info needed in a binary distro
Guidebook.tex - also add some missing italics to some "NetHack" occurances
call nethack.org "official"
Guidebook.txt - didn't regenerate cleanly so no diff
add SEDUCE to SYSCF (only partly inspired by the recent email)

14 years agofollowups for previous patch
keni [Sat, 1 May 2010 23:10:22 +0000 (23:10 +0000)]
followups for previous patch
Distribute makedefs.txt.  Comment out one of the MDMANCREATE lines.
(Thanks Janet)

14 years agotid
keni [Sat, 1 May 2010 20:58:26 +0000 (20:58 +0000)]
tid
add makedefs.6 to Files

14 years agomakedefs manpage, conditionals, and related bits
keni [Sat, 1 May 2010 20:57:17 +0000 (20:57 +0000)]
makedefs manpage, conditionals, and related bits
Add a man page for makedefs so mdgrep is documented better.
Add missing INSURANCE to mdgrep.h. (yes, LIFE leaks in as well)
Add makefile bits to build makedefs.txt.
Pass dungeon.def through mdgrep internally to makedefs - this will make
it possible to commit the LIFE patch and have config.h actually turn it
all the way off (by skipping bigrm-6).

14 years agoMakefile.utl bit
keni [Thu, 29 Apr 2010 19:20:52 +0000 (19:20 +0000)]
Makefile.utl bit
change the way makedefs doesn't depend on mdgrep.h so running mdgrep.pl
_will_ cause makedefs to get rebuilt.
Keni

14 years agotypo in existing bigroom code
keni [Thu, 29 Apr 2010 19:19:32 +0000 (19:19 +0000)]
typo in existing bigroom code
Nothing uses this at the moment, but it's wrong.
Keni

14 years agoreplacement data.base entry for slime molds
keni [Thu, 29 Apr 2010 19:18:08 +0000 (19:18 +0000)]
replacement data.base entry for slime molds
Found while looking for a monster for the (still pending) life patch.
Keni

14 years agocrowning bonus (trunk only)
nethack.rankin [Thu, 4 Mar 2010 01:45:43 +0000 (01:45 +0000)]
crowning bonus (trunk only)

     Have being crowned Hand of Elbereth/Envoy of Balance/Glory of Arioch
give a minor extra benefit beyond resistances and an artifact and maybe
unlocking the artifact's skill:  one extra skill credit, making it
feasible to earn 30 rather than 29.  (Previously the only way to get any
was to receive one for each new experience level, so you could gain one
29 times when going from level 1 to level 30.)  Added as a new feature.

15 years agominor readobjnam cleanup (trunk only)
nethack.rankin [Mon, 1 Mar 2010 03:27:33 +0000 (03:27 +0000)]
minor readobjnam cleanup (trunk only)

     Remove some clutter from the wish handling code, mostly by taking
advantage of the fact that the wizard flag is valid even for the !WIZARD
configuration.  No change to game play.

15 years agoFirst batch of changes from FailSafeC
keni [Wed, 10 Feb 2010 16:08:51 +0000 (16:08 +0000)]
First batch of changes from FailSafeC
This is all tiny stuff - allow overriding WIDENED_PROTOTYPES from the hints
file, missing NO_SIGNAL conditionals, remove a GCC-ism, conditional indentation,
void return in a non-void function.

15 years agofix #H2081 - named vault guard messages (trunk only)
nethack.rankin [Sat, 6 Feb 2010 01:58:33 +0000 (01:58 +0000)]
fix #H2081 - named vault guard messages (trunk only)

     From a bug report, assigning
a vault guard a name such as Marcel could result in messages like
|The Marcel, confused, disappears.
Many of the guard messages had article "the" hardcoded.  This gets rid
of g_monnam() and uses noit_mon_nam() instead.

     I haven't been able to test all the modified messages; it's a pain
trying to get some of them to occur.

15 years agoopen/close/loot while confused or stunned (trunk only)
nethack.rankin [Tue, 2 Feb 2010 23:10:01 +0000 (23:10 +0000)]
open/close/loot while confused or stunned (trunk only)

     Fix a bug From a bug report:  while stunned he tried to close
an adjacent open door and when his choice of direction got changed to
some non-door spot, no time elapsed so he could just keep repeating the
attempt until eventually getting the correct direction.  Trying to open
an adjacent closed door and trying to remove the saddle from an adjacent
monster via #loot behaved similarly.  Applying keys and lock-picks also
did so in 3.4.3, but had already been changed to use up time in the dev
code.  There may be other actions which need fixing.

15 years agoSYSCF wizard error display
keni [Tue, 19 Jan 2010 16:33:43 +0000 (16:33 +0000)]
SYSCF wizard error display
Fix construction of error message when wizard mode declined and SYSCF.

15 years agounix+vms wizard mode feedback (trunk only)
nethack.rankin [Tue, 19 Jan 2010 02:58:59 +0000 (02:58 +0000)]
unix+vms wizard mode feedback (trunk only)

     The message "only user <foo> may use wizard mode" formerly given
by the Unix and VMS ports was inadvertently rendered impossible to be
delivered when authorize_wizard_mode() was added to xxxmain.c nearly
3 years ago.

15 years agoMacOS 9 vs MacOS 10 bit
keni [Mon, 18 Jan 2010 02:02:45 +0000 (02:02 +0000)]
MacOS 9 vs MacOS 10 bit
MAC is defined for MacOS 9 but not for 10 (and it shouldn't be).  Add a MACOSX
define and use it in eat.c to pick up the joke meant for all Mac systems.

15 years agomake grep's path adjustable for PANICTRACE + more bits
keni [Sun, 17 Jan 2010 19:36:16 +0000 (19:36 +0000)]
make grep's path adjustable for PANICTRACE + more bits
Mac OS X doesn't have /bin/grep, only /usr/bin/grep.  Grr.
Don't try to parse PANICTRACE_GLIBC if the field doesn't exist.

15 years agoPANICTRACE bit
keni [Sat, 16 Jan 2010 22:02:06 +0000 (22:02 +0000)]
PANICTRACE bit
Only defined PANICTRACE for supported platforms.

15 years agoPANICTRACE bits
keni [Sat, 16 Jan 2010 21:54:24 +0000 (21:54 +0000)]
PANICTRACE bits
Add missing check for NO_SIGNAL in PANICTRACE versionof NH_abort().
Fix indentation of pre-processing directives.
Add #endif comments to make things clearer.

15 years agomore lint (trunk only)
nethack.allison [Sat, 16 Jan 2010 16:38:35 +0000 (16:38 +0000)]
more lint (trunk only)

..\src\windows.c(329) : 'boolean (__cdecl *)()' differs in parameter lists from 'boolean (__cdecl *)(void)'

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/

15 years agolint (trunk only)
nethack.rankin [Sat, 16 Jan 2010 00:51:42 +0000 (00:51 +0000)]
lint (trunk only)

     Eliminate a couple of warnings that caused make to quit.

15 years agoPANICTRACE (stacktrace on panic or signal) + bits
keni [Fri, 15 Jan 2010 19:54:37 +0000 (19:54 +0000)]
PANICTRACE (stacktrace on panic or signal) + bits
On crash signal or panic(), use a configurable method to get a stacktrace
the user can easily report to us.  Currently only for Unix/Linux and only
ifdef BETA.  Hopefully ports can add additional methods.

Bits:
- linux hints file had PREFIX definition in the wrong place
- sample sysconf file used wrong delimiter for WIZARDS
- fix grammar error in support message when using sysconf.wizards
- options.c comment typo
- capitalize "Crash test" output from #panic command

15 years agohave core ask windowport if suspend is ok
keni [Fri, 15 Jan 2010 17:51:28 +0000 (17:51 +0000)]
have core ask windowport if suspend is ok
PORTS: Please make sure I've done the right thing for/to your code.
This patch adds a new winproc that lets the window port approve or cancel
the suspend request - this should take care of the Mac Qt lockup issue.
In addition, Unix suspend is restricted to accounts that can use the shell
if SYSCF is defined.

15 years agoremove extraneous MAX/MIN
keni [Sun, 10 Jan 2010 02:35:19 +0000 (02:35 +0000)]
remove extraneous MAX/MIN
extralev.c defines and uses MAX/MIN macros instead of max/min from hack.h

15 years agodisplay.c tid
keni [Sun, 10 Jan 2010 02:18:28 +0000 (02:18 +0000)]
display.c tid
The WA_VERBOSE define was after the first use.

15 years agonew and fixed messages
keni [Thu, 7 Jan 2010 17:51:35 +0000 (17:51 +0000)]
new and fixed messages
2 fixed messages and 2 new silly messages

15 years agoenlightenment formatting
keni [Wed, 6 Jan 2010 14:48:11 +0000 (14:48 +0000)]
enlightenment formatting
Make the enlightenment output just a little nicer.

15 years agolinux hints file updates
keni [Mon, 4 Jan 2010 18:15:05 +0000 (18:15 +0000)]
linux hints file updates
add missing perm values

15 years agohints system changes and more Mac packaging
keni [Wed, 23 Dec 2009 20:02:29 +0000 (20:02 +0000)]
hints system changes and more Mac packaging
update file headers
add "#-PRE" and "#-POST" keywords (no default) so hints file can wrap Makefile.*
add make var with name of makefile (e.g. MAKEFILE_TOP) so hints file can be
 conditional on the file
add skeletel Mac Qt packaging target
add missing aux file generation for Mac Term packaging

15 years agomac term packaging
keni [Thu, 17 Dec 2009 19:49:13 +0000 (19:49 +0000)]
mac term packaging
Automated version of what I did to repackage the 3.4.3 Mac Term package.

15 years agomakedefs internal version formatter
keni [Thu, 17 Dec 2009 19:46:42 +0000 (19:46 +0000)]
makedefs internal version formatter
Add -svs so the Makefile can get "343" or "3.4.3" (etc) when automating
package builds.

15 years agomake nethack.sh switchable from hints file
keni [Thu, 17 Dec 2009 19:26:30 +0000 (19:26 +0000)]
make nethack.sh switchable from hints file
If SHELLDIR is null, don't install nethack.sh.  Also a tid in Porting
and add NHSROOT to the Makefiles which gives a path to the top of the
tree (so e.g. you can always find makedefs from a rule in a hints file).

15 years ago#fix #H2061 - ESC at music prompts (trunk only)
nethack.rankin [Thu, 17 Dec 2009 02:51:03 +0000 (02:51 +0000)]
#fix #H2061 - ESC at music prompts (trunk only)

     From a bug report, attempting to respond with ESC when playing an instrument
just continued with the playing sequence.  This adds a q choice to the
"Improvise? [yn]" and "Play passtune? [yn]" prompts, and also checks
for ESC as the 5-note tune when not improvising, yielding "Never mind"
and not using up a turn if the player opts not to play any music.

     I put the fixes entry in the new features section since the old
behavior wasn't much of a bug.

15 years agofix #H2060 - objects blanked by water while hero is blind
nethack.rankin [Tue, 15 Dec 2009 02:38:50 +0000 (02:38 +0000)]
fix #H2060 - objects blanked by water while hero is blind

     From a bug report, if you entered water
while blind and any spellbooks got blanked, you would know they became
"plain spellbooks" iff their original description was known.  The same
situation applied to scrolls and potions; if they had been previously
seen you'd learn they'd become blank or clear.  This fix resets the
obj->dknown flag during transformation so that altered objects are only
known by their class when blind, never their description, the same as
when they hadn't been seen before being blanked.  (When sighted, the
dknown flag gets set again the next time the object's name is formatted,
so the player shouldn't be able to notice that any reset took place.)

     Unpaid objects which get blanked should be treated as used up for
shop billing purposes (force the hero to buy), but there aren't any pools
in shops so aside from the added comment I'm going to pretend I didn't
notice that that isn't being done....

     Potions seen before becoming blind which become diluted while blind
will be known to be diluted since there's no way to know the description
without also knowing the dilution.  I don't think that's important enough
to track known-dilution separately, although I suppose we could overload
the cknown (contents-known) flag for that if necessary.

     This also removes an inaccurate comment about the effects of Luck.
Its maximum is always 13 regardless of whether the moon is full, so 5%
for the lowest chance of blanking via submersion was impossible.

15 years agofix #H2059 - writing spellbooks while blind
nethack.rankin [Mon, 14 Dec 2009 23:46:30 +0000 (23:46 +0000)]
fix #H2059 - writing spellbooks while blind

     From a bug report, you could write a
spellbook with a magic marker while blind and were told the description
(often a color) of the resulting book.  This prevents books from being
written while blind, just as they can't be read in that situation, and
it adds an extra test when attempting to write scrolls while blind.
(When you succeed in writing a scroll while blind, you're just told that
the result is ``x - a scroll'' as it's moved to its new inventory slot.)

     This also removes a couple of overly hyper exclamations when writing
fails.  Someday somebody ought to go through the whole program and decide
which messages actually warrant exclamation points, but I doubt that
that'll ever happen.

15 years agounix player name handling (trunk only)
nethack.rankin [Sun, 13 Dec 2009 05:10:42 +0000 (05:10 +0000)]
unix player name handling (trunk only)

Fix a couple of post-3.4.3 bugs.  MacOSX was unconditionally copying
"player" into plname[] after processing options, clobbering any
name:Somebody value there.  (It took place before command line processing,
so -u Somebody worked ok.)  This removes that, since we're intending to
accomplish the same thing in a different manner.

The revised handling for names "player" and "games" didn't work right when
dash and role were appended to the name in order to try to keep dashes in
usernames intact.  It resulted in first prompting for role selection, then
asking "who are you?" afterwards.

Unfixed bug:  unixmain's appending dash and role to username in order to
preserve usernames with dashes in them doesn't work anymore.  I think the
role/race/gender/alignment stuff introduced way back in 3.3.0 broke it and
apparently no one has noticed....

Miscellaneous:  clean up some complaints from gcc about comparing signed
and unsigned ints.

15 years agotweak to support SYSCF for single user config
keni [Wed, 9 Dec 2009 18:52:25 +0000 (18:52 +0000)]
tweak to support SYSCF for single user config

15 years agoMac recover bits
keni [Thu, 29 Oct 2009 00:24:05 +0000 (00:24 +0000)]
Mac recover bits
add headers, typo fix

15 years agobits to allow GUI to run recover under MacOS X
keni [Tue, 27 Oct 2009 01:12:57 +0000 (01:12 +0000)]
bits to allow GUI to run recover under MacOS X
Will require additional work for 3.5 (shouldn't blindly remove perm_lock
without asking the user; update comments; add standard headers) but I don't
want to lose this code.

15 years agoWindows CE port fixes/enhancements (from <Someone>)
nethack.allison [Thu, 22 Oct 2009 02:59:35 +0000 (02:59 +0000)]
Windows CE port fixes/enhancements (from <Someone>)

A few other fixes:
- bug: text window does not scroll left on left arrow
- pcmain.c: fix warning: _fileno() returns void* in Windows CE SDK

3.5.0 only:
- files.c: compile error: don't include <signal.h> if NO_SIGNAL is defined. WinMo does not support POSIX signals
- version.c: compile error: append_port_id() is undeclared
- link error: mktime() is unsupported -> define it in celib.c

-<Someone>

15 years agobit
nethack.allison [Thu, 22 Oct 2009 02:36:50 +0000 (02:36 +0000)]
bit

15 years agoRemove the old SCCS Id line from the files
nethack.allison [Wed, 21 Oct 2009 03:16:02 +0000 (03:16 +0000)]
Remove the old SCCS Id line from the files

... that were updated for dungeon_overview adjustment

15 years agodungeon_overview adjustment
nethack.allison [Wed, 21 Oct 2009 03:05:53 +0000 (03:05 +0000)]
dungeon_overview adjustment

The dungeon_overview bits in the rm structure were being
clobbered by a run-length encoding save/restore because
they weren't taken into consideration.

This patch pulls that data out of the rm structure completely.

It also adjusts the run-length encoding checks to take the
candig bit into consideration and adds a comment to rm.h
reminding people to make run-length encoding adjustments
in save.c for any new bits that get added.

15 years agometa access to several extended commands (trunk only)
nethack.rankin [Tue, 20 Oct 2009 22:48:38 +0000 (22:48 +0000)]
meta access to several extended commands (trunk only)

     Someone in the newsgroup has a keyboard where typing '#' is difficult
or impossible to do, and mentioned that he could use Alt+r to get #rub but
was playing a knight and had no way to get #ride.  Turns out that there
are several normal-mode extended commands that lacked a meta shortcut.
Since meta chars are case sensitive, I've added Alt+R for #ride, plus
M-A for #annotate, M-O for #overview, M-C for #conduct, and M-T for #tip.

     Unfortunately, I've been unable to test them.  It turns out that
nethack mode in PuTTY doesn't change the Alt key into a meta shift, it
causes the digits on the number pad to send vi-style movement letters
(with support for shift+digit and ctrl+digit to send modified letters).
That seems relatively useless to me, and I haven't figured out how to
force on high bit for arbitrary characters so can't activate nethack's
meta-key shortcuts.

     The Guidebook has been updated via copy+paste and is untested too.

15 years agopickup_burden typo/thinko
nethack.rankin [Sun, 18 Oct 2009 23:52:39 +0000 (23:52 +0000)]
pickup_burden typo/thinko

     From the newsgroup:  the 'O' command's menu for setting pickup_burden
shows "Unencumbered" for the 'u' choice but the Guidebook and the in-game
options help show "Unburdened".  (For config file processing, the program
only examines the first letter so accepts either value.)  This changes the
documentation to match the game.

15 years agoRemove the old SCCS Id line from the CE files updated this past weekend
nethack.allison [Tue, 13 Oct 2009 01:55:14 +0000 (01:55 +0000)]
Remove the old SCCS Id line from the CE files updated this past weekend

15 years agoremove build warning
nethack.allison [Sat, 10 Oct 2009 17:43:19 +0000 (17:43 +0000)]
remove build warning

win/tty/topl.c(516) : warning C4101: 'ln' : unreferenced local variable

15 years agoAdd list of fixes from <Someone> to doc/fixes34.4
nethack.allison [Sat, 10 Oct 2009 17:34:42 +0000 (17:34 +0000)]
Add list of fixes from <Someone> to doc/fixes34.4

15 years agoWindows CE changes (from <Someone>)
nethack.allison [Sat, 10 Oct 2009 14:39:53 +0000 (14:39 +0000)]
Windows CE changes (from <Someone>)

The changes did not apply to the main trunk as easily as I wouuld have
hoped, so I attempted a number of manual applications. I hope <Someone>
can tell me if there is a problem.

Changelist:
- bugfix: help text windows close immediately after open (unhandled WM_KEYDOWN in mhtext.c)
- bugfix: action button uses hero coordinates instead of cursor position
- pocketpc: bugfix: menu window closes on up/down keys from first/last position
- smartphone: do not translate input when command helper is hidden (fixes Motorola Q keyboard bug)
- smartphone: new keypad layouts
- smartphone: wizard mode command layout
- smartphone: option to feed arbitrary text as a command to nethack core
- wrap/unwrap text option for text windows
- hardware keyboard detection
- hide keypad when hardware keyboard is present
- backport message window highlighting from winnt port
- new icon with recommended image sizes

15 years agofix #H2010 - quaffing wielded potion of polymorph
nethack.rankin [Sat, 22 Aug 2009 01:14:48 +0000 (01:14 +0000)]
fix #H2010 - quaffing wielded potion of polymorph

     From a bug report, drinking a potion of
polymorph which is wielded would trigger an "object lost" panic if hero
took on a form that was forced to drop its weapon.  Once weapon/potion
got dropped, subsequent useup() of the potion was no longer operating on
an inventory object.

     Unwield the potion at start of drinking, so that dropping doesn't
come into play.  (If we ever introduce a monster form incapable of
holding inventory so drops everything, this will have to be revisited.)

15 years agofix #H1996 - digging message for missing boulder
nethack.rankin [Sat, 22 Aug 2009 00:02:09 +0000 (00:02 +0000)]
fix #H1996 - digging message for missing boulder

     From a bug report, it was possible to get
|You hit the  with all your might.  You stop digging.
if a boulder went away--in his case, it was picked up by a giant--while
you were occupied trying to break it with a pick-axe.  The code explicitly
used "" to fill in the message when dig_target had an unexpected value.

     This just avoids giving the message in a case like this.  Possibly
extra stop_occupation() calls should be done instead, but I didn't want
to try to figure out how many would be needed (monster picks up object,
monster zaps wand of striking, others?).

15 years agomissile vs engulfer (trunk only)
nethack.rankin [Tue, 30 Jun 2009 08:22:40 +0000 (08:22 +0000)]
missile vs engulfer (trunk only)

     Noticed while testing the "<obj> is no longer poisoned" fix; killing
an engulfer via "the poison was deadly..." led to an "obj not free" panic.
It was due to post-3.4.3 changes, so no fixes entry.

15 years agofix #H1911: poison dart message sequence (trunk only)
nethack.rankin [Tue, 30 Jun 2009 08:18:27 +0000 (08:18 +0000)]
fix #H1911:  poison dart message sequence (trunk only)

     From a bug report, message sequence
when throwing a poisoned weapon which loses its poison was confusing.

|The dart is no longer poisoned.
|The dart hits the acid blob.
|The poison doesn't seem to affect the acid blob.

This patch makes the first sentence come out last.

     [It appears that poisoned weapons thrown/shot by monsters or traps
never lose their poison.  That can't be right....]

15 years agostill held by monster after it moves away (trunk only)
nethack.rankin [Tue, 30 Jun 2009 02:45:46 +0000 (02:45 +0000)]
still held by monster after it moves away (trunk only)

     From a bug report, a stunned monster
moved away from the hero, but remained holding him.  That behavior was
still present in the dev code, although the hero was free to move and
would become unstuck as soon as he did so.  I don't know how many fixes
for this sort of thing have been made, but they evidently haven't been
made in the proper place.  [Perhaps it really ought to be done as a
monster is placed somewhere on the map?]

15 years agopoly'd hero mimic hiding vs polymorph
nethack.rankin [Sat, 13 Jun 2009 02:10:21 +0000 (02:10 +0000)]
poly'd hero mimic hiding vs polymorph

     From a bug report, if you were a mimic
who was hiding (via #monster, becoming a strange object) and polymorphed
into some other monster type, you retained the hidden/object form.  That
didn't happen when reverting to normal form, or when polymorphing into a
monster while involuntarily mimicking gold, but handling for the latter
inadvertently blocked dealing with the hiding-voluntarily case.

15 years agoUNICODE_WIDEWINPORT in tty/topl.c (trunk only)
nethack.rankin [Thu, 11 Jun 2009 03:17:25 +0000 (03:17 +0000)]
UNICODE_WIDEWINPORT in tty/topl.c (trunk only)

     Hide most of the Unicode support in tty's top line manipulation.
The new code is somewhat fragile, but the clutter from the many instances
of #if UNICODE_WIDEWINPORT was making it difficult to work on some other
changes.

15 years agowand/spell/breath zaps hitting secret doors (trunk only)
nethack.rankin [Thu, 28 May 2009 14:09:30 +0000 (14:09 +0000)]
wand/spell/breath zaps hitting secret doors (trunk only)

     From a bug report, black dragon breath
destroys closed doors didn't acknowledge hitting secret doors.  bhit()
reveals secret doors, but zap_over_floor() (called by buzz() for ray-type
wands and spells, and for breath attacks) didn't check for hitting those.

     When testing the fix, I noticed that feedback for an explosion caused
by breaking a wand was worded oddly for zaps like magic missile which don't
damage doors.  "The door absorbs your bolt" didn't make much sense; what
bolt?  That was first changed to "absords your blast", which still sounded
weird, then to "absorbs the blast", which seemed better but was inaccurate.
Next was "absorbs some of the blast" since the explosion continues to hit
adjacent spots, but since it still has full strength that wasn't accurate
either.  It's finally become "The door remains intact."  Unlike with zaps,
there is no additional range being lost, so no reference to absorption.

15 years agospell_damage_bonus (trunk only)
nethack.rankin [Wed, 27 May 2009 09:19:11 +0000 (09:19 +0000)]
spell_damage_bonus (trunk only)

     From the newsgroup:  player saw "The spell hits the <monster>?"
where the question mark punctuation reflected negative damage occurring.
Another player diagnosed it as a 2 point force bolt (from 2d12 dice role)
modified by -3 penalty for hero who has Int less than 10.  This changes
spell_damage_bonus() to avoid reducing damage below 1 point.

15 years agoFiles bit (trunk only)
nethack.rankin [Mon, 11 May 2009 22:55:56 +0000 (22:55 +0000)]
Files bit (trunk only)

     Add entries describing the source files generated by yacc and lex.
And strip some trailing whitespace.  (Trunk-only solely because it won't
apply as-is to the branch copy of Files.)

15 years agosync sys/share/{dgn,lev}_{lex,yacc}.c, take two (trunk only)
nethack.rankin [Mon, 11 May 2009 22:53:51 +0000 (22:53 +0000)]
sync sys/share/{dgn,lev}_{lex,yacc}.c, take two (trunk only)

cvs admin -ko sys/share/*_*.c  to suppress $Date$ and $Revision$ expansion,
                               reverting to the text checked a few days ago.
cvs commit -f sys/share/*_*.c  to trigger this mail; you'll need cvs update
                               to get the actual text.

15 years ago'in quiver' tid
keni [Mon, 11 May 2009 21:55:04 +0000 (21:55 +0000)]
'in quiver' tid
Pat pointed out that I didn't read my own email.

15 years agoexpanded feedback for "in quiver" (trunk only)
keni [Sun, 10 May 2009 16:33:57 +0000 (16:33 +0000)]
expanded feedback for "in quiver" (trunk only)
Replace quiver with quiver/quiver pouch/at the ready as appropriate.

15 years agosync sys/share/{dgn,lev}_{lex,yacc}.c
nethack.rankin [Thu, 7 May 2009 00:58:22 +0000 (00:58 +0000)]
sync sys/share/{dgn,lev}_{lex,yacc}.c

15 years agoAddress a build warning and a complaint
nethack.allison [Wed, 6 May 2009 21:59:42 +0000 (21:59 +0000)]
Address a build warning and a complaint

topl.c
..\win\tty\topl.c(595) : warning C4101: 'ln' : unreferenced local variable

15 years agosys.c tid
keni [Wed, 6 May 2009 16:54:06 +0000 (16:54 +0000)]
sys.c tid
wrong API

15 years agoAdd RCS version lines
keni [Wed, 6 May 2009 11:00:43 +0000 (11:00 +0000)]
Add RCS version lines

15 years agoAdd RCS version lines
keni [Wed, 6 May 2009 10:55:43 +0000 (10:55 +0000)]
Add RCS version lines

15 years agoAdd RCS version lines
keni [Wed, 6 May 2009 10:50:32 +0000 (10:50 +0000)]
Add RCS version lines

15 years agoAdd RCS version lines
keni [Wed, 6 May 2009 10:45:32 +0000 (10:45 +0000)]
Add RCS version lines

15 years agoSYSCF followup bit
keni [Mon, 4 May 2009 12:43:15 +0000 (12:43 +0000)]
SYSCF followup bit

15 years agoAdd recordfile control to SYSCF.
keni [Sun, 3 May 2009 14:08:15 +0000 (14:08 +0000)]
Add recordfile control to SYSCF.
Add sys/unix/sysconf, a sample sysconf file.
Move defines from topten.c to config.h so they can be seen globally.
Add persmax, pers_is_uid, entrymax, and pointsmin to struct sysopt, use
 in topten.c, populate in files.c
Warning cleanup in files.c.
BUGFIX: don't crash in unixmain.c if WIZARDS left unspecified.
hints/macosx10.5: don't hardcode "keni"; install sample sysconf; install
 sample ~/nethackrc
makedefs: add "system configuration" to compiled-with options list.
BUGFIX: if a game doesn't meet the criteria for making the record file it's
 shown to the user as having zero points because t1->points is set to zero
 to indicate that it doesn't get written back; display u.urexp instead.

15 years agoH1810 seems never to have been addressed: two spelling errors.
keni [Wed, 29 Apr 2009 21:29:32 +0000 (21:29 +0000)]
H1810 seems never to have been addressed: two spelling errors.

15 years agoquest.txt Astral Plane
nethack.rankin [Tue, 7 Apr 2009 19:42:26 +0000 (19:42 +0000)]
quest.txt Astral Plane

     "Astral plane" is a place name so should be fully capitalized.  Some
of the variations used ("through the elemental planes to the astral",
"plane of the astral", "planes of the elements") aren't as clear cut, but
I capitalized all of those I found.

15 years agoclimbing back to the Castle (trunk only)
nethack.rankin [Tue, 7 Apr 2009 08:21:32 +0000 (08:21 +0000)]
climbing back to the Castle (trunk only)

     From the newsgroup:  someone using <Someone>'s level-flip patch
(to transpose special levels left-to-right or top-to-bottom or both in
order to get more variety from them) ended up in solid rock.  When
climbing the stairs up from the Valley to the Castle, goto_level() was
hardcoded to find a spot in the extreme lower right corner.  If the level
is turned upside down, solid rock from an unused row at the top edge of
the map ends up at the bottom, and the placement code could put the hero
there.  That code only checked for walls and monsters being in the way,
not rock.  Also, if the level is flipped side-to-side than hero ends up
in same area as the upstairs rather than on opposite side of the Castle.

     This switches to the same teleport-region code used for other level
changes which don't arrive on stairs; such regions get flipped along with
map by that patch (I hope).  Even though no such fix is currently needed
for unmodified nethack, this change gets rid of the special case Castle
placement code entirely, simplifying both goto_level() and u_on_sstairs()
in the process.

     The Castle's existing from-below region covers the rightmost half-
dozen or so columns across all rows, so offers a bigger landing zone than
just the bottom corner.  That could be tweaked within castle.des but I
don't think it needs to be.

15 years agoextended quest text formatting (trunk only)
nethack.rankin [Tue, 7 Apr 2009 02:19:54 +0000 (02:19 +0000)]
extended quest text formatting (trunk only)

     Add questpgr formatting codes to support pronouns for leader,
nemesis, deity, and artifact.
  %lh -> "he" or "she" for leader; %nh for nemesis; %dh for hero's god;
  %li -> "him" or "her"; likewise %ni, %di;
  %lj -> "his" or "her"; and %nj, %dj;
H, I, and J modifiers yield capitalized form of same.
  %oh -> "it" or "they" for artifact (Eyes of the Overworld is plural);
  %oi -> "it" or "them";
  %oj -> "its" or "their"; plus capitalization with uppercase modifiers.
Also, %O yields shortened artifact name ("the Foo" in place of "the Foo
of Bar").  These provide support for terser summary lines, but can also
be used in the regular quest text passages.

     A couple of nemeses don't specify gender.  The random choices need
to be made early so that the leaders' messages can get them right.  This
chooses during role initialization and then uses that result once the
corresponding monster is eventually created.  It does the same for leader
even though no current leader needs it, and for deity too.

15 years agosummary text for block messages (trunk only)
nethack.rankin [Mon, 6 Apr 2009 02:50:41 +0000 (02:50 +0000)]
summary text for block messages (trunk only)

[Make use of recent message history changes.]

     Add support to makedefs and the core for including a line of summary
text with quest messages that don't use pline() delivery.  The multi-line
record structure of quest.txt begins each entry with %C and ends with %E.
makedefs now examines the %E lines looking for "[anything]" and adds that
to quest.dat where deliver_by_window() can find it.  The square brackets
are required in the input and intentionally carried along to the output.
putmsghistory() is used to put the summary text into the message history
buffer for use by ^P, without being displayed first.  (So this is a no-op
for interfaces which haven't implemented putmsghistory yet.  Maybe
genl_putmsghistory() should pass such text to pline() as a quick hack?)

     This adds a few summary lines to quest.txt so that the feature can
be tested.  Most of them were written by <Someone> nearly three years
ago.  I'm planning to add a couple of new control codes that'll allow some
of them to expand into shorter text.  (The one where the Archeologist
leader tells you that the nemesis stole the artifact so your mission is
to find the goal level, defeat the nemesis, and return with the artifact
ends up being roughly 160 characters long.)

15 years agoputmsghistory() (trunk only)
nethack.rankin [Mon, 6 Apr 2009 01:43:01 +0000 (01:43 +0000)]
putmsghistory() (trunk only)

[Third of three message history patches.]

     Add another argument to putmsghistory() so that it can tell whether
it's processing multiple messages for restore (which should be treated as
being older than any current messages) or a single message to stuff into
history (which should be treated as the most recent message even though
it hasn't been displayed in the message window).