Commit Graph

2125 Commits

Author SHA1 Message Date
PatR
9b3587204a fix #H5462 - failed F-attack gives misleading msg
Report was for 'F' followed by '.' reporting "cmdassist: Invalid
direction key!" and then by a direction grid (which happened to
include '.' for self).  That behavior applied for all the movement
prefix keys ('m', 'G', &c).  When 'cmdassist' was off, "F." would
yield "Unknown command 'F.'." instead.

Now you'll get "You can't fight yourself.", either instead of the
"invalid direction key" part of cmdassist feedback (followed by a
direction grid which excludes up, down, and self since they aren't
applicable for prefix keys) or of the "unknown command" result.
Likewise, "You can't run upward." or "You can't rush downward."
for "G<" and "g>", respectively.
2017-05-16 16:22:43 -07:00
PatR
4ed0e5fd6d 'A' vs blindfold
Fix an inconsistency with blindfold removal, eliminating possibility
of a panic (3.6.0) or an impossible (since mid-December, 2016).  The
'A' command treated blindfold removal as a multi-turn operation, the
rest of the wear/unwear code as single-turn operation so didn't try
to guard against it being disrupted.
2017-05-11 16:26:35 -07:00
PatR
f6b32bf03c fix #H5245 - levitation boots message sequencing
Report was for
  You finish taking off your boots.
  You float gently to the altar.  [destination was a red herring]
  [take some action to run through moveloop() for next turn]
  Your movements are slowed slightly because of your load.

Having float_down() do the next encumbrance check instead of
waiting for moveloop() to do so was straightforward.  However,
while testing I noticed the reverse situation (not due to the fix
for the above) when putting on levitation boots
  Your movements are now unencumbered.
  You finish your dressing maneuver.
  You start to float in the air!

Having float_up() do the encumbrance check isn't adequate to fix
this, because it takes multiple turns to put on boots but the
properties they confer are enabled immediately, so moveloop() runs
while hero is already levitating even though the game hasn't told
the player about it yet.  Fix is a hack to defer the effect of
levitation on encumbrance until the boots are fully worn, which
might lead to strangeness somewhere.  It's also boot-specific so
will need to be updated if some other multi-turn armor that confers
levitation ever gets added.
2017-05-06 14:47:28 -07:00
PatR
35d9cd3fd0 fix #H5416 - misleading attribute message
Report was for losing strength when sitting on a throne, but the
message issue was more general than that.  Character was wearing
gauntlets of power, so no visible change in strength took place,
but player was told "you're already as weak as you can get" (because
the attempt to reduce strength didn't change current strength;
however, it did change the hero's underlying strength, observable
once the gloves were removed).

There was a beta report last January that was related:  in that case
the player thought that gauntlets of power were preventing blessed
potion of gain ability from raising strength, but it was actually
giving a misleading message claiming that strength was already as
high as it could get.

Fix:  vary the message when something prevents an attribute change
from being noticeable.
2017-05-05 18:32:40 -07:00
PatR
6a8364f025 ^X/enlightenment tweaks
Noticed while working on something else:
  You entered the dungeon N turns ago
was missing the terminating period, and when polymorphed into a
1 hit die critter, plural "hit dice" is incorrect.  0 hit dice is
confusing even when fully spelled out, so include an explanatory
remark with it.

Don't include score (available if configured with SCORE_ON_BOTL)
unless player has the 'showscore' option enabled.  The value is
an approximation--accurate as far as it goes, but the value can
change depending upon how the game ends.  Someone who asks to have
it displayed on the status line will probably be used to that, but
others might start reporting bugs for it.
2017-05-04 18:03:12 -07:00
PatR
8fc7bc548c setmangry fixes
Some discussion in the newsgroup about nearby peaceful monsters becoming
hostile if they observed the hero attacking a peaceful monster made me
look at the code and I spotted a couple of problems.  An auto array was
being initialized in an inner block--some pre-ANSI compilers couldn't
handle that.  Worse, it was inside a loop and may or may not have
resulted in unnecessary setup each iteration.  Make it static.  Oddly,
the array had the same name as a function but `gcc -Wshadow' either
didn't notice or didn't care.

A more significant problem was that mon->mpeaceful was being set to 0
without checking whether mon->mtame was set, potentially resulting in
humanoid pets being both tame and hostile at the same time.  This change
prevents that but doesn't do anything interesting about pets who observe
attacks against peacefuls.  (I also wonder why chaotic peacefuls now get
upset by seeing other peacefuls be attacked; it seems out of character.)

There was also a check for non-humanoid peacefuls seeing another of the
same species be attacked, but it was checking for an exact match without
regard for littler or bigger incarnations of the same species.  I've
added the latter.

This also reformats a couple of block comments.
2017-04-20 17:06:28 -07:00
PatR
ad29017482 fix #H5333 - overview annotation for quest summons
The automatic annotations supplied for various special levels were
treating the quest leader's summons as being mutually exclusive with
the other things of interest.  It's not, so wasn't shown if the entry
portal was on either the bigroom level or the rogue level.  Handle it
differently from the rest so that it can stack with annotations for
those levels.  (The annotation for the portal itself, which doesn't
get added until traversed, was already handled differently and shown
correctly on those levels.)
2017-04-11 17:58:14 -07:00
PatR
5cb4168c58 autodescribe vs detection
Temporary map views for detection or #terrain allow moving the cursor
around to get the brief location description provided by getpos's
autodescribe feature and were doing so by forcing the 'autodescribe'
option to True, then leaving it that way.  Save the option value prior
to such operations and restore it after instead of leaving it changed.
2017-04-08 19:39:43 -07:00
PatR
e1fbfcc8b5 fix #H5264 fix
MSGTYPE handling was being suppressed, except during prompting when
it was intended to be suppressed.
2017-04-05 12:44:55 -07:00
PatR
6ba906b234 maybe fix #H5264 - screen clears on prompting
I couldn't reproduce the reported problem of the "In what direction?"
being issued after the screen was cleared, but bypassing pline() in
favor of putstr(WIN_MESSAGE) for tty prompts did also bypass
  if (vision_full_recalc) vision_recalc(0);
  if (u.ux) flush_screen(1);
done in pline().  Inadvertent loss of the latter could conceivably be
responsible for the problem.  If so, the escape code used by cl_end()
may be broken for somebody's termcap or terminfo setup since clearing
to the end of the line in the message window shouldn't erase the rest
of the screen.

Regardless, the prompting change also bypassed the ability to show
the prompt with raw_printf() if the display wasn't fully intialized
yet, so some change to the revised prompting was necessary anyway.

Switching back from putstr(WIN_MESSAGE) to pline() resulted in
duplicated entries in DUMPLOG message history, one with bare prompt
followed by another with response appended, so more tweaking was
needed.  The result is use of new custompline() instead of normal
pline().  custompline() accepts some message handling flags to give
more control over pline()'s behavior.  It's a more general variation
of Norep() but its caller needs to specify an extra argument.
2017-03-30 14:14:38 -07:00
PatR
82620d16f5 tty prompting fix and DUMPLOG of prompts+answers
Update DUMPLOG's message history to include player responses to
most queries.  For tty, both getlin() and yn_function().  For other
interfaces, only yn_function() is covered.  (It's intercepted by a
core routine that can take care of the logging; getlin() isn't.)
Also includes saved messages from previous session(s), for the
interfaces which support that (tty), to fill out the logging when
a game ends shortly after a save/restore cycle.

The tty interface was using pline() to display prompt strings.
Having 'MSGTYPE=hide "#"' or 'MSGTYPE=hide "yn"' in .nethackrc
would suppress many prompt strings (in the two examples mentioned,
entering extended commands or the vast majority of yes/no questions,
respectively) and generally lead to substantial confusion even if
done intentionally, so switch to putstr(WIN_MESSAGE) instead.
2017-03-20 19:11:48 -07:00
PatR
a03d20d7ab fix Bell of Opening segfault
Noticed on nethack.alt.org; the Bell of Opening could trigger a
segfault if applied near a trap door or bear trap (and a few others)
that had no monster at the trap location.  Reproducible if done
while mounted; {open,close}{fall,hold}ingtrap() would try to access
monst->mx and monst->my of a Null monst pointer if given one when
u.usteed was non-Null.
2017-03-17 03:20:11 -07:00
PatR
dd8a95eec4 fix #H5188 - getting an artifact break illiterate
To-be-3.6.1 bug, caused by a patch (of mine...) incorporated about
a week after 3.6.0 was released that was intended to be for naming
Sting or Orcist.  Any artifact creation ended up breaking illiterate
conduct whether user-assigned naming was involved or not (because
oname() is always used to apply the name, not just when do_name() is
executing).

This should be handled differently but I don't want to go through
the dozen and half or so calls to oname() to add an extra argument.
2017-03-14 05:27:45 -07:00
Pasi Kallinen
f9438f6e53 Document explicitly what m-prefix does to each command 2017-03-13 17:17:58 +02:00
PatR
ed300e5fa8 dumplog fixes: genocide list, survivor's tombstone
The dumplog data was including a final tombstone unconditionally,
which looked awfully strange for characters who didn't die.  Make
it conditional, like actual end-of-game tombstone.  (One difference
though:  dumplog has a tombstone for hero who died from genocide,
end-of-game does not.  I think the latter should display one even
though no grave gets generated.)  [Potential for future enhancement:
add some alternate ascii art in place of tombstone for survivors.]

The list of genocided and/or extincted species was never shown
since caller passed 'a' to list_genocided() and it expected 'y'.
Also, once shown, the list entries were lacking indentation that
other sections of the dump generally have.

Both vanquished monsters and genocided/extinct monsters included
a blank line separator even when there was no feedback, making a
noticeable gap in the dumplog text.  Have them report "no creatures
vanquished" and "no species genocided", when applicable, so that
their separator lines always have something to separate.

When dumping, omit a couple of blank lines each from vanquished
creatures list, genocided species list, and tombstone so the
relevant sections of the dump are more compact.
2017-03-06 00:22:00 -08:00
Pasi Kallinen
7d8b4d4f97 Add end-of-game dumplogs
This is based on the "new" dumplog patch for 3.6.0, by Maxime Bacoux.

Define DUMPLOG to enable. By default only enabled for the TTY linux.
2017-02-19 15:33:27 +02:00
PatR
8c92d2921f fix #H5082 - growing into opposite sex monster
When a female dwarf grows (via level gain) into a dwarf lord, it
changes sex as well as base monster form because all dwarf lords
are male.  The earlier fix for #H4276 (16-Mar-2016, to give an
alternate grow-up message acknowledging the change) used the wrong
monster form (monst's old one instead of new one).
2017-02-17 12:24:24 -08:00
PatR
bfab1aa5b6 some fixes36.1 fixes
Fix a couple of typos, change one entry which referenced internal
coding issues to a more general description for end-users, and remove
a duplicate about color handling for status hilites and menucolors.

(I've only skimmed through the first section.  There are likely more
inconsistencies in the file.)
2017-02-12 00:24:29 -08:00
PatR
1151ec19a1 fix rumors.tru typo
"They say that an ooze will bite your boots and a rockmole will eat them."

'rockmole' should be two words.  Also, rock moles won't eat leather
boots, so change 'will eat' to 'might eat'.
2017-02-08 13:23:00 -08:00
PatR
440d9d74bd fix g.cubes eating green slime
Back when dead green slime left a corpse, gelatinous cubes wouldn't
eat that, but they would eat globs of green slime without being
affected.  Add the missing glob check so g.cubes will engulf globs
of green slime instead of eating those.
2017-02-08 13:10:15 -08:00
Pasi Kallinen
76d7044872 Fix #H5056/bz1086: Bug in Achievement Recording
Bug report was:

> "Completed sokoban" achievement was logged when picking up
> a randomly generated bag of holding in the gnomish mines.

The picking-up code was missing checks for the branches, so
you could get the achievements outside the correct branches.
2017-02-06 16:52:40 +02:00
Pasi Kallinen
569a14488c Document paranoid_confirm:all 2017-01-23 17:14:04 +02:00
Pasi Kallinen
c6f26c05d7 Accessibility: option to prevent status line updates
Apparently some screen readers keep reading the status lines
at the bottom of the screen when parts of those change.
Add an option to prevent updates to those lines.
2017-01-10 22:19:03 +02:00
Pasi Kallinen
3ea12fe048 Show all statusline info in #attributes 2017-01-10 20:45:16 +02:00
PatR
2655910a0f fix #H4597 - sitting on level teleport trap
During #sit:  "You sit down.  You step on a level teleporter."
Switch to alternate phrasing for #sit.

Webs and polymorph traps had similar issues.
2016-12-08 17:22:59 -08:00
PatR
9b725218bb fix #H4706 - non-zero hit points for poison death
For "the poison was deadly" against hero, hit points were set to -1
(which gets displayed as 0 when shown) but the status lines weren't
being updated, so stale positive HP value was visible during final
disclosure.
2016-12-08 16:39:55 -08:00
Pasi Kallinen
daff7653f8 Add missing symbols to Blank symset and Guidebook 2016-12-04 21:38:59 +02:00
Alex Smith
52457be911 Merge branch 'ais523-movespeed' into NetHack-3.6.0 2016-12-02 17:10:37 +00:00
Pasi Kallinen
b0c68714ce Make Ogresmasher grant 25 constitution 2016-11-14 20:22:33 +02:00
Pasi Kallinen
06bd0d426b Make Dragonbane confer reflection when wielded 2016-11-14 19:34:20 +02:00
Pasi Kallinen
84dc214e5c Fix wrong material for novels
HI_PAPER is color, PAPER is material - the novel object definition
was using the wrong one. The caused the novel material to be gold.
2016-11-13 15:25:43 +02:00
Alex Smith
ec2beee61f Changelog for movement speed changes 2016-11-12 01:28:47 +00:00
Alex Smith
f715224b9c Merge branch 'ais523-elbereth' into NetHack-3.6.0 2016-10-21 23:30:09 +01:00
Alex Smith
9c5cfc4153 Changelog for the Elbereth changes 2016-10-18 16:52:30 +01:00
Pasi Kallinen
f106b578a2 Wielding Demonbane prevents demons summoning friends 2016-10-18 18:07:53 +03:00
Pasi Kallinen
14bd550481 Wielding Trollsbane prevents trolls from reviving 2016-10-15 19:47:04 +03:00
Pasi Kallinen
35f46a0149 Put throne room gold in the chest 2016-10-15 10:26:20 +03:00
Pasi Kallinen
abb4f0fab2 Allow toggling menu for any travel target list 2016-10-13 20:16:21 +03:00
Pasi Kallinen
4af4fc1143 Occasionally remove maze dead ends, creating loops 2016-10-12 18:39:24 +03:00
Pasi Kallinen
56e51b9b6b Add wizmode command to recreate current level 2016-10-11 17:26:32 +03:00
Pasi Kallinen
710f5ed235 Give quest guardians some equipment 2016-10-08 21:17:58 +03:00
Pasi Kallinen
f95747e3ef win32: Save and load map colors from registry 2016-10-06 21:00:15 +03:00
Pasi Kallinen
580c18bb7e Fixes entry for cursor positioning via menu 2016-10-06 13:38:09 +03:00
Pasi Kallinen
efd7526194 Accessibility: Pick travel/cursor targets from a menu
Adds two new configurable keys to the cursor targeting: 'A' (getpos.menu)
and 'a' (getpos.menu.cansee). First one shows a menu of all interesting
glyphs on the map, second one shows only those in sight.

Travel command also now obeys the "request menu" -prefix, showing
the menu with interesting targets in sight, and then traveling there.

Idea via the NetHack accessibility research by Alexei Pepers.
2016-10-06 13:10:13 +03:00
Pasi Kallinen
680c8a542c Add key rebinding
This is a modified version of Jason Dorje Short's key rebinding
patch, and allows also binding special keys, such as the ones
used in getloc and getpos.

One of the ways to play NetHack on nethack.alt.org is via a HTML
terminal in browser. Unfortunately this means several ctrl-key
combinations cannot be entered, because the browser intercepts
those. Similar thing applies to some international keyboard layouts
on Windows. With this patch, the user can just rebind the command
to a key that works best for them.

I've tested this on Linux TTY, X11, and Windows TTY and GUI.
2016-10-05 20:04:56 +03:00
PatR
d0783facdc tribute: The Shepherd's Crown 2016-10-04 17:08:16 -07:00
Pasi Kallinen
f07c5570ca Add configurable symbol entry for strange object 2016-10-03 09:36:28 +03:00
Pasi Kallinen
60b4e5528e Show some timed properties in #timeout
Also simplify the levitation_dialogue a bit
2016-09-29 18:48:56 +03:00
Pasi Kallinen
ea94100e9d Give feedback just before timed levitation runs out 2016-09-24 20:59:59 +03:00
Pasi Kallinen
b30a4d86c4 Add missing dark room symbol to the Guidebook 2016-09-24 19:51:43 +03:00