Commit Graph

2932 Commits

Author SHA1 Message Date
nhmall
57584a22d7 add some guard code to the Is_*_level macros in dungeon.h
All Is_*_level tests during early startup would test as true until
dungeon_topology was initialized in a new game or restored from
a save file. That could result in some unexpected code paths being
taken.
2019-11-17 19:13:23 -05:00
nhmall
a364348098 add an mgflags parameter to mapglyph() to alter how it behaves internally
avoid a recent save-value,call,restore-value kludge by adding
an mgflags parameter to mapglyph() to control its behavior

 Changes to be committed:
	modified:   doc/window.doc
	modified:   include/extern.h
	modified:   include/hack.h
	modified:   src/detect.c
	modified:   src/mapglyph.c
	modified:   src/pager.c
	modified:   sys/amiga/winfuncs.c
	modified:   sys/wince/mhmap.c
	modified:   win/Qt/qt_win.cpp
	modified:   win/Qt4/qt4map.cpp
	modified:   win/X11/winmap.c
	modified:   win/curses/cursdial.c
	modified:   win/curses/cursinvt.c
	modified:   win/curses/cursmain.c
	modified:   win/gem/wingem.c
	modified:   win/tty/wintty.c
	modified:   win/win32/mhmap.c
	modified:   win/win32/mswproc.c
2019-11-16 22:49:36 -05:00
PatR
2a07924063 rename S_player_override to S_hero_override 2019-11-16 14:31:57 -08:00
PatR
020825bc73 monsters entering regions
Region processing does a lot of looping--when there are actually
regions present--and calls functions in those loops which do more
looping of their own.  This moves some of the simpler tests so that
they get done sooner and can avoid some of those function calls.
I was hoping that it would speed up the turn cycle on the Plane of
Fire where the spontaneous irregularly shaped fumaroles are composed
of a lot of small regions but I don't think there's any noticeable
difference.

In process of doing that, I discovered a bug (no doubt copy+paste
which escaped an intended update) with monster handling.  The check
for whether a monster is entering a region depends upon whether the
hero is in that same region rather than whether the monster is
already inside.  So a monster can enter a region--or have a moving
one enclose it--with impunity if the hero is already in that region.
Once the hero moves out of it, the monster will finally enter it.
2019-11-16 11:46:50 -08:00
nhmall
8b1c6148f6 improve pluralization on some words ending with a k-sound
fixes #245
2019-11-16 08:27:07 -05: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
c72795b2dd fix #H9421 - typo in Soul Music #7
Misspelled "genius".  Typo in the transcription, not in the book.
2019-11-14 16:17:15 -08:00
nhmall
c5ac90cedb Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-14 19:14:42 -05:00
nhmall
6ea483242e some msdos cross-compile additional notes and a clarification 2019-11-14 19:12:14 -05: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
nhmall
8e7888d631 introduce msdos build support for cross-compiling on other platforms 2019-11-14 14:10:56 -05:00
keni
a3777d6ead Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-14 08:21:12 -05:00
keni
78716ab4bf attempt to fix .BR macro 2019-11-14 08:20:38 -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
a49f039e6f fixes catch-up 2019-11-11 15:24:01 -05:00
nhmall
c2bbbebd8e restrict a recent deaf message change to player actions only 2019-11-11 10:59:07 -05: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
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
2058ad10f9 missing data file on vms
vms's install.com was processing bigrm-%.lev (which corresponds to
bigrm-?.lev on unix) so missed two-digit bigrm-10.lev.
2019-11-07 16:21:52 -08:00
nhmall
7502a2e05f bump the Guidebook date 2019-11-07 19:15:34 -05:00
PatR
ed3a87a078 more Guidebook tweaks
Expand the sample configuration file a little and prevent it from
going past the right margin in Guidebook.txt.

Replace all instances of "config file" with "configuration file".

Reformat the "notes" at the end of the table of map symbols.
Unfortunately Guidebook.pdf from Guidebook.ps from Guidebook.mn
puts a page break between the header line "notes" and the two
actual notes.

Value 1 for 'mouse_support' was not just exceeding the margin of
Guidebook.txt but wrapping to the next line.  Shorten it.

Guidebook.tex had a typo "in the foler" (where 'folder' was meant)
and Guidebook.mn didn't have that phrase at all.

Remove a few trailing spaces.
2019-11-07 16:10:55 -08:00
PatR
2b98d161d6 fixes36.3 again
Noticed that "multiple" was misspelled for entry about menu action
':' misbehaving under curses, but the phrasing for whole entry was
difficult to comprehend so try to word it better.

[This one is in the highlights list with the old wording.]
2019-11-07 01:42:29 -08:00
Pasi Kallinen
1908017e27 Fixes typo 2019-11-07 11:23:28 +02:00
PatR
4dd39a0d7e fixes36.3 tidying
Reword a few entries, remove a few trailing spaces.
2019-11-07 01:15:09 -08:00
nhmall
70bacac9e6 Guidebook.mn bit 2019-11-06 17:59:12 -05: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
e8c5da768e updated Guidebook.txt 2019-11-05 09:18:25 -05:00
nhmall
86aa5634a7 chasonr's msdos Makefile.gcc pdcurses build changes
# Please enter the commit message for your changes. Lines starting

closes #243
2019-11-04 22:50:04 -05:00
PatR
7efdec7f5e fix symset:curses S_tree
Symbol set changes...

curses:
  S_tree (use plus-or-minus sign instead of accidental horizontal line);
  S_bars (switch from default '#' to not-equals sign);

DECgraphics:
  S_altar (switch from default '_' to 'pi');
  S_bars (switch from 'pi' to not-equals sign);

DECgraphics_2: get rid of this commented out set since its contents are
  now folded into DECgraphics.

(The IBMgraphics one is just whitespace; delete a <space> that precedes
a <tab>.)
2019-11-04 10:42:14 -08: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
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
0b23cac8ab Formatting changes to .nethackrc discussion for windows. 2019-11-03 08:03:01 -08:00
Bart House
395c970add Changes to windows based discussion of .nethackrc. 2019-11-03 07:52:33 -08:00
Bart House
2b73494296 Updated guidebook to discuss new loc and name of configuration file on win. 2019-11-02 18:18:48 -07:00
PatR
2c1edc860c couple of Guidebook.tex bits
More symbols:  I left out a word on the continutation line for S_stone
and S_tool has been forcing narrow space where ordinary <comma><space>
was intended.
2019-11-02 17:15:54 -07:00
Bart House
9e309ab37a Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-11-02 16:57:57 -07:00
Bart House
ee1817f4ec Updates to fixes36.3 for recent work. 2019-11-02 16:57:43 -07:00
PatR
d7354fe78c Guidebook.tex catch up, Guideboon.mn bits
Guidebook.tex not tested.  The \, in the continuation of S_stone is
a narrow space in LaTeX.  It should be \hspace{ width of '(' } but
I don't remember how to measure something in LaTeX or TeX.

Guidebook.mn is getting two small changes:  I forgot about the
guideline that each sentence be on its own line.  Also, this adds the
fix for wide lines in the dungeoneers list although the reordering
accompanying a recent change might have made that moot (unless some
future reordering puts wide names on the same line again, assuming
that was the issue).
2019-11-02 16:05:39 -07:00
PatR
c66eb915d2 Guidebook.mn Symbols section
The table listing symset entries was ok for ps/pdf output but for
plain text output it was wrapping to a second line for S_xan,
S_pet_override, and S_player_override and also going past the right
margin for some others.  I've shortened the text for those three
and narrowed the first column to give more room for the third column,
bringing all the lines within their margin.

The entry for S_stone was rather surprising:  "dark part of a room".
It now says "solid rock or unexplored terrain or dark part of a room"
and needed to span two lines.

The first column has been labeled "Default" but that was why that
column was wider than necessary.  It now has a label of two spaces
and is left justified instead of being centered.  It is also now
forcing constant-width Roman as the font and every character in that
column should be the same size so one reason for centering is removed.

The title used to be centered but always looked a bit off due to the
fact that the three columns have differing widths and/or because of
the over-wide lines changing the location of "center".  It is now
left justified and looks a little bit like it's labeling the first
column.  Perhaps it needs a blank line separating it from the rest.

Guidebook.tex is lagging again.
2019-11-02 03:32:35 -07:00
Pasi Kallinen
4c9f4dbbd9 Prevent leashing monsters with no extremities
... and also unsolid monsters.
2019-11-02 11:40:37 +02:00
nhmall
13f4a466d9 name correction 2019-11-02 01:44:00 -04:00