Commit Graph

6176 Commits

Author SHA1 Message Date
nhmall
97974e9968 make corpse visible if stethoscope told you about it
Bug bz14, no web id.

Steps to reproduce:
- have a stethoscope handy.
- place an amulet in a doorway and move one square outside the room's door.
- create and lead an invisible stalker to be on top of amulet, with you
  just outside the room beside the door square.
- zap the stalker asleep with a wand of sleep.
- put on a blindfold.
- quaff a potion of object detection.
- amulet shows in the doorway.
- save the game and keep the savefile for ease of returning to this point.

Bug 1 observed (remember that you're blind due to blindfold):
- zap a wand of death at the stalker that you know to be on top of
the amulet, but that the game gives no indication of.
- if the stalker left a corpse, and you apply a stethoscope to the
  doorway, the game tells you that "You determine that that unfortunate
  being is dead" yet no being or corpse is displayed, still just the amulet.

Fix that by calling map_object(corpse, TRUE) in its_dead() under these circumstances.

The circumstances in the original report were also reproduced, specifically:
If a stethoscope finds an unseen monster on a square with an
object-detected object while blind, after killing the monster, the
object isn't remembered.

That remains unfixed because the I (invis monster glyph) aleady overwrote the
detected object glyph, so it is a much tougher situation.
2015-12-18 18:24:13 -05:00
nhmall
ec166df636 handle escape from new wizmode menu appropriately 2015-12-18 16:23:05 -05:00
nhmall
2eddec8287 fix typo in last patch to yelp() 2015-12-18 13:00:35 -05:00
nhmall
2765790b24 Merge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.0
Conflicts:
	doc/fixes36.1
2015-12-18 12:56:38 -05:00
nhmall
7019a7da77 fix H4101: can hear pets while deaf
This is a fix for H4101, bz192.

add non-audio (felt) outcome to yelp()

This also add #wizintrinsic command because testing this was a pain
without a simple, straightforward way to go deaf that didn't time-out
before the situation being tested recurred.
2015-12-18 12:50:25 -05:00
Pasi Kallinen
24aea231d4 Add fixes entries 2015-12-18 18:49:50 +02:00
PatR
c5e2604cca still more while-helpless 2015-12-18 07:42:23 -08:00
PatR
c097814f3c warning bit
Suppress a couple of 'dead increment' diagnostics from the clang static
analyzer.  The assignments are dead, but keeping the variable up to date
is more valuable (in case someone someday changes the code to use the
affected variable somewhere farther along in that function) than changing
the code to avoid the assignments in order to prevent the diagnostic.

This will only work to suppress the analyzer's diagnostic messages if
either FORCE_ARG_USAGE or GCC_WARN is defined when compiling makemon.c.
2015-12-18 07:18:58 -08:00
PatR
fcc30bee88 more while-helpless
Guard xlogfile entries against naming killer monst ", while".
2015-12-18 07:11:41 -08:00
Pasi Kallinen
164b64b263 Allow color name aliases for menucolors 2015-12-18 16:12:53 +02:00
Pasi Kallinen
6c76738697 Fix typo in random epitaph 2015-12-18 13:28:23 +02:00
Haoyang Wang
3c469f77dc fix #H4082 - macosx - set permissions of symbols file in package postinstall script 2015-12-18 02:13:35 -08:00
PatR
4604777c16 suppression of while-helpless for tombstone
Avoid the possibility of a user-supplied name interfering with killer
reason truncation.  A monster named ", while" that killed the hero
would result in "killed by <mon-type> called " being displayed on the
tombstone after stripping while-helpless reason to shorten the text.
2015-12-18 01:59:36 -08:00
PatR
20b2120f3f fix bz 103+#H4095 - high scores ", while helpless"
If a character dies with 'multi' at a non-zero value, the reason for
helplessness is appended to the cause of death.  But that was taking
place in writeentry(), which is used for every score entry while
rewriting 'record' when a new high score is added.  So whenever a new
score with helplessness was added, all existing entries got corrupted
by having the newest game's reason for helplessness tacked on.

Append the helplessness reason while formatting the cause of death
instead of when writing out score and logfile entries.  xlogfile is
handled a little differently in case the cause of death plus reason
for helplessness is too long so truncated for record and logfile.
Full reason is still put into xlogfile.
2015-12-17 19:50:06 -08:00
nhmall
3e597b6882 Fix bug C343-20 wrong level shown at death
Changes to be committed:
	modified:   doc/fixes36.1
	modified:   src/ball.c

I looked up the original bug report that led to bug page C343-20
"When dying immediately on entering a level, the map may show you dying on the previous level."

It was received public report U891:
> When one is being punished and goes down a staircase and dies because the
> ball and chain fell on their head, one gets the message about their death
> while the old level is still being displayed. I wasn't sure whether this
> was a bug or not because on one hand it wouldn't make much sense to
> generate a new level if the character is going to die anyway. However,
> that being said it does make a difference if the character is about to go
> down into a level where one cannot leave bones files, ie medusa or the
> first level of the mines (if i remember correctly). So, if your character
> dies from this does the bones file get left on the level you were on
> (which is still displayed at the time of death) or the level you died as
> soon as you got to (but was never displayed)? Thanks!

Pat had remarked in response: "So this is just a display issue; game play works as intended
(for the program; I imagine you weren't planning to get killed."

A debug trace in wizard mode 3.6.1 beta shows that the relevant code path is this:
NetHack.exe!done(int how) Line 908
NetHack.exe!losehp(int n, const char * knam, char k_format) Line 2678
NetHack.exe!drag_down(...) Line 823
NetHack.exe!goto_level(d_level * newlevel, char at_stairs, char falling, char portal) Line 1316
NetHack.exe!next_level(char at_stairs) Line 1157
NetHack.exe!dodown(...) Line 954
NetHack.exe!rhack(char * cmd) Line 3416
NetHack.exe!moveloop(char resuming) Line 464
NetHack.exe!main(int argc, char * * argv) Line 104

This patch clears the display for the situation in drag_down(),
so the old level is not shown.
2015-12-17 20:27:42 -05:00
Pasi Kallinen
85d7d2bc43 Remove symbol setting options which do not work anymore 2015-12-17 21:12:59 +02:00
Haoyang Wang
69cfa4b134 set permissions of symbols file in package postinstall script 2015-12-17 06:53:14 -08:00
PatR
8f2a408ef3 fix #H4065 - unnecessary role select confirmation
If player specified all four facets of role:  role, race, gender, and
alignment, via command line or option settings, the tty interface still
asked the player to confirm whether the character's role/&c was ok?
Skip that confirmation when all four things have already been chosen.
2015-12-17 06:37:08 -08:00
Haoyang Wang
ad138be8fb use 'macosx.sh editsysconf' to install sysconf 2015-12-17 06:06:20 -08:00
Haoyang Wang
894c751043 added editsysconf command in macosx.sh 2015-12-17 06:06:20 -08:00
Haoyang Wang
bf7a259646 turn off use_darkgray in sysconf 2015-12-17 06:06:20 -08:00
nhmall
967e19ff7f Merge branch 'NetHack-3.6.0' 2015-12-17 08:45:19 -05:00
Pasi Kallinen
8af8c42e62 Clarify regex support in the guidebook 2015-12-17 12:47:03 +02:00
Pasi Kallinen
f02253dbbb Fix bz189 H4092: Broken qt_xpms.h 2015-12-17 08:46:04 +02:00
PatR
92858c3e3c more menu <space> screwup
Like the just fixed naming for discoveries list, there are several
other add_menu() calls which specify <space> instead of 0 as a useless
selector on separator lines.  These others are all for role selection,
where menus don't get big enough to need next-page.

I don't know what I was thinking at the time, although it must have
seemed like a good idea for some reason....
2015-12-16 18:42:45 -08:00
PatR
d68bb738d2 fix #H4095 - naming discoveries list
The menu for picking an item to name when using the "on discoveries list"
choice for #name or C when that list spanned multiple pages was exiting
for <space> instead of advancing to next page.  Space was being assigned
as the selection letter for class header lines, which made no sense.
2015-12-16 18:16:39 -08:00
nhmall
bc83f28e46 compatibility macro correction
3.6.0 went out with editlevel at 2, not 0
2015-12-16 17:59:10 -05:00
nhmall
fa092f5fe9 housekeeping for 3.6.1
Changes to be committed:
	modified:   Files
	modified:   README
	modified:   dat/history
	modified:   doc/Guidebook.mn
	modified:   doc/Guidebook.tex
	modified:   include/global.h
	modified:   include/obj.h
	modified:   include/patchlevel.h
	modified:   src/invent.c
	modified:   src/objnam.c
	modified:   src/shknam.c
	modified:   src/sounds.c
	modified:   src/spell.c
	modified:   sys/winnt/Install.nt
	modified:   sys/winnt/nethack.def
	modified:   win/macosx/NetHackGuidebook.applescript
	modified:   win/macosx/NetHackTerm.applescript
	modified:   win/win32/mswproc.c
2015-12-16 17:52:34 -05:00
Pasi Kallinen
929be769ec Add option to have autodescribe on by default 2015-12-16 21:42:43 +02:00
PatR
af6887796f scrolls written while blind; scrolls of mail
Make a fix suggested during beta testing:  you can read scrolls while
blind if you know the label, and you can write a scroll with a magic
marker while blind, but the result was flagged as description unknown
so you couldn't read the newly written scroll until regaining sight
or obtaining object identification.  So change writing a previously
discovered scroll while blind to set dknown since a successful write
always yields the type of scroll requested.  Getting lucky while
attempting to write an undiscovered scroll--which has to be done by
scroll's type name (for instance "food detection") rather than by its
label ("YUM YUM")--still leaves the description flagged as unknown
since hero hasn't seen the what sort of label the new scroll has.

Along the way I got side-tracked by the possibilty of writing a scroll
of mail.  It's allowed and yielded the same result as finding such a
scroll in bones, or wishing for one:  when read, it was junk mail from
Larn.  Make one written via marker give different feedback since it
comes from creation of a stamped scroll without any stamps available.

Also, suppress an "argument not used" warning for readmail().
2015-12-16 02:23:32 -08:00
PatR
8f96d4b9ef fix bz157, #H4075 - 'realtime' had strange units
A couple of reports asked what weird unit of measure was used for the
'realtime' value in xlogfile.  It was just seconds, but was accumulating
incorrectly whenever game-state got saved for the checkpoint option.
Now it really is seconds, or rather whatever unit you get for the delta
of two time_t values; usually seconds but not guaranteed to be that.
2015-12-15 17:59:42 -08:00
nhmall
d17fcf3e13 document symset:default
Changes to be committed:
	modified:   doc/Guidebook.mn
	modified:   doc/Guidebook.tex
2015-12-15 08:50:39 -05:00
PatR
3ec592e3f1 fix bz60 and bz61 - meta char feedback
60: getpos() doesn't report the offending keystroke accurately when
rejecting M-something as a movement keystroke while moving the cursor;
61: typing M-N as a command keystroke produces
 |Unknown command 'M-
 |                 '.
where the '.' on the second line clobbers the top line of the map.

I can't reproduce the first one without extending the altmeta hack
[a run-time option to treat two char sequence ESC c as M-c] to getpos()
and nh_poskey(), which I've done for testing but am not including here.

I can't reproduce the second as it's described, but M-^J produces
 |Unknown command 'M-
 |'.--More--
and this fixes that, with a general fix that applies to any meta char.

The diffs include some cleanup/groundwork for maybe extending altmeta.
2015-12-15 03:22:39 -08:00
Haoyang Wang
c431f61930 use 'macosx.sh editsysconf' to install sysconf 2015-12-14 16:27:27 -08:00
Haoyang Wang
fd6d69dd9f added editsysconf command in macosx.sh 2015-12-14 16:27:27 -08:00
Haoyang Wang
2a2bbe690f turn off use_darkgray in sysconf 2015-12-14 16:27:27 -08:00
PatR
f3f2233122 revert doc/recover.{6,txt} to previous state
When I updated recover.6 last week, I was under the mis-impression that
the INSURANCE compile-time option had been made unconditional.  It has
not, and after undoing that, there was no substantive change, so put it
back to how it was at release.
2015-12-14 13:51:33 -08:00
PatR
c843f56897 fix #H4078 - dull spellbook vs sleep resistance
Reading a dull spellbook could make a sleep resistant hero fall asleep.
2015-12-14 13:27:31 -08:00
PatR
f5b5a428c1 fix #40171 - tribute typo for The Colour of Magic
Passage 1 of the Colour of Magic:  'bazaars' was misspelled 'bazarrs'.
There were a couple of other things that didn't match the paperback copy
I recently recovered from loan:  'radiation' should be 'radiations', and
'dark' was omitted from 'a tall dark figure'.

Unlike the later Harper editions, the early Signet ones retain British
spelling (at least for 'colour').  I failed to find the second passsage
via flipping through the pages, so wasn't able to proof-check that one.
2015-12-13 19:45:20 -08:00
nhmall
6f6f74e8d2 slightly change quickmimic() sense wording
Changes to be committed:
	modified:   doc/fixes36.1
	modified:   src/dogmove.c

A bug reporter wrote:
> comments:
> "You sense a little dog appear where Poes was!"
>
> seems strange to me, perhaps it should be "appearing", or the hero shouldn't
> notice at all if it's out of sight.
>
> Not sure it was out of sight, anyway, because I saw the d from the shop
> doorway.
>

Change the wording to:
"You sense that a little dog has appeared where Poes was!"
2015-12-13 21:45:08 -05:00
nhmall
a1583244d6 a couple of false rumors 2015-12-13 13:34:47 -05:00
PatR
50065303e1 commit 8a13a4d2044264cf7427ba6a035021949788b5f1
Author: PatR <rankin@nethack.org>
Date:   Sun Dec 13 06:06:58 2015 -0800

    fix #H4066 - bug eating ring of protection

    Intrinsic protection of 0 (usually from having a gremlin steal divine
    protection, but also possible by eating a +0 ring of protection) does
    not contribute to "magic cancellation", the defense attribute that
    makes some special attacks fail.  That's intended.  Negative intrinsic
    protection (not possible from having divine protection, but turns out
    to be possible from eating negatively enchanted/charged rings of
    protection), did contribute.  That wasn't intended, so stop it.
    (Positive intrinsic protection gives a magic cancellation of 1 if worn
    armor doesn't provide any MC.)
2015-12-13 06:15:54 -08:00
PatR
4ad39ba282 fix part of #H4062 - high priest name refusal
High priests used a different message to refuse accepting a user-supplied
    name than regular temple priests because they're flagged as unique.  The
    effect was cosmetic; it didn't reopen the hole that let you recognize
    which high priest was which via the 'C' command on the Astral Plane.

    [I never received the mail for #H4062 but saw it in bugzilla.]
2015-12-12 20:56:46 -08:00
PatR
807afa22b3 fix #H4047 - dipping inconsistency
Dip the scroll labeled LEP GEX VEN ZEA into the fountain?
Your scroll called light fades.

The first prompt deliberately avoided 'called', 'named', and other
attributes to keep it short, but the discrepancy here is blatant, so
increase the verbosity in order to have the reminder that's included
in the prompt be the same as object name in the followup message.

Bonus fix, noticed while testing it:  water_damage() was reporting
the "{blank,unlabeled} scroll fades" even though blank scrolls are
already as faded as they can get.  Likewise for blank spellbook.
2015-12-12 19:41:35 -08:00
PatR
637f4a4bd6 fix bz55 - wrong plural for slice of cake
Entered in bugzilla prior to release:  "slice of birthday cake" became
"slouse of birthday cake" when made plural.  "slice of pizza" used to
work, but adding an entry for "louse" <-> "lice" to one of the special
handling lists for singular/plural broke "slice" since only a trailing
substring match is performed for entries in that particular list.
2015-12-12 18:59:21 -08:00
PatR
ead5b0f210 fix #H4061 - uncursed scroll of enchant armor
In 3.4.3, reading an uncursed scroll of enchant armor while wearing
a piece of cursed armor performed an uncurse as well as raising
enchantment.  A fairly big patch to redo how pending shop bills were
affected by altering the items on the bill accidentally took away
the uncurse part when modifying the scroll code to use the bless()/
uncurse()/curse() functions instead of manipulating the armor's
blessed and cursed flags directly.
2015-12-12 18:08:11 -08:00
nhmall
085d364903 Merge branch 'NetHack-3.6.0' 2015-12-12 17:15:16 -05:00
PatR
2219a6a667 naming artifacts vs illiteracy
Requested by a beta tester back in June:  naming Sting or Orcrist
violates illiterate conduct.  I left it at that; any object naming
could be construed as being literate, but I don't think breaking
conduct for doing such would be a good idea.
2015-12-12 01:55:44 -08:00
PatR
757e6f9c4d vampire genocide could produce unkillable critter
Vampires who were currently shape-shifted into a fog cloud, bat, or wolf
became an unkillable fog could, bat, or wolf if the player genocided
vampires.  When such a creature was killed, the attempt to transform it
back into a vampire failed, but the monster continued to be resurrected
anyway.
2015-12-12 00:34:16 -08:00
nhmall
215060219d fix windows bugs H4030 and H4045 (123 and 138)
Changes to be committed:
	modified:   sys/share/pcmain.c
	modified:   sys/winnt/nttty.c
	modified:   sys/winnt/stubs.c

Bug 123 Report 4030:
Minor thing I've noticed - if I quit the game, at the "Hit <Enter> to end."
prompt, if I close the window rather than pressing Enter, I get the following:

Bug 138  - #H4045:
 "nethack -s" leads to "-s is not supported for the Graphical Interface".
 That's wrong.
 (The Graphical Interface comes with "nethackw".)
2015-12-11 23:08:01 -05:00