Commit Graph

4987 Commits

Author SHA1 Message Date
nhmall
340851ecf5 Revert "more pluralization"
This reverts commit 6a3dcc6a38.
2019-11-16 10:13:49 -05:00
nhmall
6a3dcc6a38 more pluralization 2019-11-16 10:08:21 -05:00
nhmall
8b1c6148f6 improve pluralization on some words ending with a k-sound
fixes #245
2019-11-16 08:27:07 -05:00
PatR
ae415589e9 have --showpaths show DUMPLOG file
While not a path exactly, the dumplog file isn't placed somewhere
fixed so being able to see where it is placed could be useful.

This cascaded a bit during testing.  Fix one of the warnings from
hardfought (fqn_prefix_names[]).  And a few more that came up with
SYSCF disabled (panictrace_gdb, two unused variables if files.c).
2019-11-15 17:51:20 -08:00
PatR
8d154121ca fix #H9420 - dipping while blind
Fix several feedback anomalies for dipping into potions.
2019-11-15 12:09:45 -08:00
PatR
616e07cde9 more #H9392 - deafness vs music
The report mentioned whistles but I had forgotten all about them by
the time I tried to deal with musical instruments.  Plain whistles
had deaf handling but magic whistles didn't.
2019-11-14 16:42:53 -08:00
PatR
5abf64adaf fix #H9424 - mon vs shade damage despite harmless
Monster vs monster non-weapon attack against a shade that failed
due to non-silver and non-blessed hit was inflicting damage.
2019-11-14 15:28:32 -08:00
PatR
abdec86a3d fix #H9425 - shade_miss target
Fix 'unused' variable by using it as intended.  Thinko brought on by
too many revisions...
2019-11-14 12:56:08 -08:00
nhmall
8e7888d631 introduce msdos build support for cross-compiling on other platforms 2019-11-14 14:10:56 -05:00
PatR
f3a923d647 fix #H1554, #H1736, github issue #240 - silver )
Fixes #240

Monster versus monster (melee and throwing) didn't handle shades
(need silver or blessed weapon to take damage) or silver feedback
(extra info when silver-haters are hit).

I did a lot of test, revise, re-test but didn't always re-test
everything that had previously been tested, so bugs that I thought
were quashed might have crept in.

Now if a missile weapon "passes harmlessly through the shade" it
will continue on and maybe hit something else.  (Regular misses
still stop at the missed target.)

A couple of minor ball&chain changes accidentally got included.
2019-11-13 15:47:46 -08:00
PatR
f5452848a5 width of curses menus
Menus with wide header or separator lines were rendered wide enough
to avoid wrapping those lines, but ones with narrow header/separators
and wide selectable entries were limited to half the display even
though lots of lines that would fit with full width were being wrapped.
Change the latter behavior.

Menus are right justified with the edge of the map when narrower than
it, left justified otherwise, and if the display is wider than the map,
they'll extend beyond its right edge.  (That hasn't actually changed;
it's just that left-justification is more likely now that menus will
be wide enough to show wide inventory lines without wrapping.)

Get rid of my ridiculous hack to force wider menu for the 'symset'
and 'roguesymset' sub-menus of 'O' since it's no longer useful.

There's still room for improvement.  If any lines need to be wrapped
despite using the full width, or perhaps are just a lot wider than
most of the entries, menu width could be narrowed to just enough for
'normal' lines to fit so that one or two really long entries don't
distort the menu.  That's a bit more complicated than I want to deal
with right now.  [If implemented, it would be relevant for tty too.]
2019-11-11 12:55:50 -08:00
nhmall
02da5f2d38 more Windows path environ variable translation bits 2019-11-11 14:19:16 -05:00
nhmall
6dfbff9d4b --showpaths wasn't returning the paths if there was an error in a config file
Also,
Windows only: Introduces some environment variable substitution for paths
specified in a config file
2019-11-11 12:49:54 -05:00
nhmall
11c869d7c5 Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-11 11:51:28 -05:00
nhmall
91b4bd0da9 new prefix_locked bits conditionalized to WIN32 2019-11-11 11:46:49 -05:00
Pasi Kallinen
c2f7fb7d84 Fix heap-use-after-free
bcsign was used on a freed obj
2019-11-11 18:46:19 +02:00
nhmall
bc69fc65d2 Merge branch 'NetHack-3.6' into bart-test 2019-11-11 11:27:50 -05:00
nhmall
c2bbbebd8e restrict a recent deaf message change to player actions only 2019-11-11 10:59:07 -05:00
PatR
593ba7ebb4 --showpaths
Fix a couple of warnings about unused variables but mainly handle
OSX's multiple-choice for configuration file name.  I tried moving
my ~/.nethackrc to '~/Library/Prefences/NetHack Defaults.txt' and
both regular play and --showpaths are finding it successfully.

Also an untested fix for VMS.  "nethackini" is not supposed to have
any path information attached.
2019-11-09 20:01:53 -08:00
nhmall
667534dcfc Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-09 21:22:04 -05:00
nhmall
fddffc2fa0 updates to reveal_paths 2019-11-09 21:20:46 -05:00
PatR
15dbf661d9 more slippery gloves
Move makeplural(body_part(FINGER)) into its own routine, with option
to substitute gloves when wearing such.

Wearing slippery gloves (ie, wearing gloves while having slippery
fingers) wouldn't let you put on a ring because you can't take the
gloves off, but removing a worn ring lacked the same restriction.

After changing that, teach prayer that slippery gloves is another
reason why a ring of levitation can't be removed.
2019-11-09 16:36:41 -08:00
nhmall
67bea58539 Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-09 11:12:18 -05:00
nhmall
c566c01f8d add command line option --showpaths
Add
	--showpaths
early option to show where NetHack is expecting to find certain files
without starting up a game. It exits afterwards.

Windows sample (for illustration only, locations may differ for you):
    Variable playground locations:
        [hackdir   ]="C:\Users\JohnDoe\NetHack\3.6\"
        [leveldir  ]="C:\Users\JohnDoe\AppData\Local\NetHack\3.6\"
        [savedir   ]="C:\Users\JohnDoe\AppData\Local\NetHack\3.6\"
        [bonesdir  ]="C:\ProgramData\NetHack\3.6\"
        [datadir   ]="C:\personal\nhdev\363\test\binary\"
        [scoredir  ]="C:\ProgramData\NetHack\3.6\"
        [lockdir   ]="C:\ProgramData\NetHack\3.6\"
        [sysconfdir]="C:\ProgramData\NetHack\3.6\"
        [configdir ]="C:\Users\JohnDoe\NetHack\3.6\"
        [troubledir]="C:\Users\JohnDoe\NetHack\3.6\"
    Your system configuration file (in sysconfdir):
        "C:\Users\JohnDoe\NetHack\3.6\sysconf"
    Your system symbols file (in sysconfdir):
        "C:\Users\JohnDoe\NetHack\3.6\symbols"
    Your personal configuration file (in configdir):
        "C:\Users\JohnDoe\NetHack\3.6\.nethackrc"

Linux (for illustration only, locations may differ for you):
    Your system configuration file:
        "/home/johndoe/nh/install/games/lib/nethackdir/sysconf"
    Your system symbols file:
        "/home/johndoe/nh/install/games/lib/nethackdir/symbols"
    Your personal configuration file:
        "/home/johndoe/.nethackrc"
2019-11-09 10:57:25 -05:00
PatR
0615387f95 fix #H9391 - slippery gloves
Slippery fingers would transfer from bare hands to gloved hands if
you put gloves on.  The reverse, transfering from gloves to bare
hands when taking gloves off, was already being prevented for
directly taking them off, but still allowed the slipperiness to
transfer when gloves were lost.  This prevents putting on gloves
when fingers are slippery and attempts to handle cases where gloves
get unworn by ways other than 'T' (or 'R') or 'A'.

There's no slippery attribute for objects (way too much work for too
little value); slippery gloves is just the combination of wearing
gloves and having slippery fingers (which now has to have happened
while already wearing those gloves).  This changes inventory to use
"(being worn; slippery)" when applicable and much of the patch deals
with funnelling Glib changes through new make_glib() to try to make
sure that persistent inventory adds or removes "; slippery" right
away when changes happen.

If gloves are taken off involuntarily (shapechange to a form that
can't wear them, destruction via scroll of destroy armor or monster
spell of same or via overenchantment, theft), slippery fingers ends
right away instead of the usual few turns later.
2019-11-09 01:07:09 -08:00
nhmall
7da9104fac one more deaf aware bit 2019-11-08 12:35:13 -05:00
nhmall
a3d2be04be Revert "one more "Deaf-aware" comment"
This reverts commit 2835d8774e.
2019-11-08 12:34:27 -05:00
nhmall
2835d8774e one more "Deaf-aware" comment 2019-11-08 11:22:50 -05:00
PatR
6afb780d98 status highlight fix for experience level
When I expanded the Guidebook's sample configuration file I added
several status_hilite options.  I decided that I'd better test what
was written and discovered that if Xp had an up or changed rule as
well as one or more percentage rules, it was showing bogus changes
whenever the integer value of the percentage changed.  The fix
turned out to be simple but it took a while to figure out.

I ultimately left the status_hilite settings out of the sample
options, because they tended to be too wide for Guidebook.txt's
formatting rather than because they weren't working as expected.
2019-11-07 17:54:57 -08:00
PatR
d13911495c unix USE_FCNTL vs 'perm'
Reported directly to devteam, the POSIX_TYPES subset (most? all
these days?) of Unix that defines USE_FCNTL was unlocking lock file
'perm' when done with it but wasn't explicitly closing it unless
the unlocking failed.  Triggered a valgrind complaint and could have
posed a problem if restart gets implemented for this configuraiton.
2019-11-06 10:52:48 -08:00
PatR
423bce2bf6 fix #H9407 - "butterfiles"
Feedback when playing music while hallucinating misspelled
"butterflies".

Other bits in the same code (not part of #H9407):

All feedback messages while impaired gave "You produce <something>"
which was immediately followed by many of the instruments giving
their own "You produce <some other thing>."  Change the verb for the
playing-while-impaired messages to avoid having two consecutive
"you produce" ones.

Also, multiple impairments (two or more of stunned, confused, and
hallucinating) always gave the generic "what you produce is far
from music" message.  Have them sometimes ignore excess impairments
to give the message for one of those.
2019-11-06 10:06:59 -08:00
nhmall
26121fca9a deafness left "Perhaps that why you cannot move it" message orphaned 2019-11-04 23:08:15 -05:00
nhmall
2170b9946b Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-04 12:33:01 -05:00
nhmall
25edd16945 code maintenance bit to white-list current "You hear" instances
Flag existing occurrences of "You hear" as "Deaf-aware" so
that a grep for that string in the future doesn't need to
trigger further investigation of those.
2019-11-04 12:28:25 -05:00
PatR
fbc790a34d dipping into holy/unholy water while blind
Something I realized while following up a newsgroup post.  If you
knew an item's bless/curse state and dipped it into water while
blind, the bknown flag stayed set and you learned the item's new
bless/curse state without seeing any "glows blue/black/&c" feedback.
Clear the flag unless you know that the potion being dipped into is
water (or is clear if not water has not been discovered) and also
know the water potion's own bless/curse state.
2019-11-04 09:14:18 -08:00
Pasi Kallinen
efbef0f22c Fix unleashable message given for non-leashed monster 2019-11-04 18:58:22 +02:00
nhmall
93f95dd051 more deafness-related message corrections 2019-11-04 00:36:54 -05:00
PatR
f29a6b164d fix #H9392 - deafness vs music
Music wasn't using You_hear() so needs to handle Deaf itself.  Have
it give alternate messages for sounds being emitted from instruments.

This doesn't implement the suggestion that a Deaf hero shouldn't be
able to produce the same music as a non-deaf one.
2019-11-03 18:12:55 -08:00
Bart House
6b88a19365 Added new map_mode tiles_fit_to_screen for Windows NetHackW.exe 2019-11-03 17:59:39 -08:00
Bart House
f0707fee6e More tweaks to how windows deals with directory paths. 2019-11-03 13:31:17 -08:00
Pasi Kallinen
4c9f4dbbd9 Prevent leashing monsters with no extremities
... and also unsolid monsters.
2019-11-02 11:40:37 +02:00
Pasi Kallinen
54024f2015 Fix pet polyed to long worm staying leashed
Long worms cannot be leashed, but polymorphing a leashed pet
into a long worm kept it leashed.
2019-11-01 19:05:48 +02:00
PatR
7cc59eb929 fix #H9374 - initial rendering of guardian angel
Creation of guardian angel bypasses tamedog() and marks it tame
directly but it wasn't updating the map after changing the monster.
So if 'hilite_pet' was On when entering the Astral Plane level, the
angel appeared to be ordinary monster rather than a tame one until
it moved or the screen was redrawn.  Also, the message about it
appearing was issued before marking it tame, so a tiny bit of code
reordering has been done to get the sequence correct.
2019-10-31 06:57:16 -07:00
Bart House
86473526b8 Save a copy of the symbols file to symbols.save when updating. 2019-10-30 19:17:03 -07:00
nhmall
b6d2697a6a function didn't match prototype 2019-10-30 18:40:48 -04:00
Bart House
43ef5ef7fa Windows Store support for NetHack 3.6. 2019-10-29 21:28:39 -07:00
PatR
b1e0b6b17b avoid warning
and check whether pushing commits has been straightened out.
2019-10-28 16:02:16 -07:00
nhmall
f487083ab4 fix parse character count typo 2019-10-27 23:37:16 -04:00
nhmall
a399151d01 some symbol tweaks
A few symbol-related modifications:

- fulfill a request from a blind player to allow them to
  specify a unique/recognizable character for all pets and/or
  the player in the config file for use when using a screen
  reader (S_player_override, S_pet_override). Requires sysconf
  setting ACCESSIBILITY to be set to have an effect, although
  they can still be specified in the config file.

- Config file SYMBOLS entries were not working properly on
  the rogue level. Allow ROGUESYMBOLS as well as SYMBOLS to be
  specified in the config file independently.

- When values are moved into showsyms[], the overriding SYMBOLS
  or ROGUESYMBOLS entry from the config file is used if there is
  one; if there is no overriding value for a particular symbol,
  the loaded symset value is used; if there is no symset entry
  loaded for the symbol then a default symbol is used.
2019-10-27 23:12:11 -04:00
PatR
d834ebb0ec paranoid_query bulletproofing
Make paranoid_query() (yn question requiring explicit "yes" answer)
protect itself from overly long prompt strings.  I'm not aware of
any specific overflowing queries so I temporary reduced QBUFSZ within
paranoid_query() in order to test.

For EDIT_GETLIN, don't use previous response as default if we loop
after neither "yes" nor "no" was given for paranoid confirm.
2019-10-26 19:01:49 -07:00