Commit Graph

3276 Commits

Author SHA1 Message Date
nhmall
dc0c95c521 Merge branch 'NetHack-3.7' into paxed-lua-v2-merged 2019-11-06 16:49:33 -05:00
nhmall
0494152aea Merge branch 'NetHack-3.6' 2019-11-06 16:45:43 -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
bcb627100b Merge branch 'paxed-lua-merged3' into paxed-lua-v2-merged 2019-11-06 12:56:21 -05:00
Pasi Kallinen
9cd9280276 Lua: remove dgn_comp, use lua instead 2019-11-06 18:45:10 +02:00
Pasi Kallinen
fd55d9118e Use lua for special level files
Game is playable, and should compile on linux and Windows.
Assumes you have a lua 5.3 library available.

Removes level compiler and associated files.
Replaces special level des-files with lua scripts.
Exposes some NetHack internals to lua:
 - des-table with commands to create special levels
 - nh-table with NetHack core commands
 - nhc-table with some constants
 - u-table with some player-specific data (u-struct)
 - selection userdata

Adds some rudimentary tests.

Adds new extended command #wizloadlua to run a specific script,
and #wizloaddes to run a specific level-creation script.

nhlib.lua is loaded for every lua script.

Download and untar lua:
  mkdir lib
  cd lib
  curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
  tar zxf lua-5.3.5.tar.gz

Then make nethack normally.
2019-11-06 18:43:20 +02:00
PatR
3e029d2900 attributes disclosure: experience points
Wizard mode shows the number of points needed to reach the next level
(unless already maxxed out at 30) for ^X and end of game disclosure.
Do it in normal play for the latter too.  (I think it would ok to do
that for ^X too but haven't gone that far.)

Even when it was wizard mode only, the phrasing for past tense had a
minor grammar bug, and it could make the line a little too long for
tty and curses (not sure about others) when level was high, resulting
in wrapped text.  That looked bad for tty, which first tries removing
indentation (just 1 space in this case), making that line outdented
as well as wrapped.  So change the phrasing slightly when experience
level is 'too high'.  I had a version which formatted, measured, and
re-formatted if necessary but that was overkill; simple hardcoded
rephrasing suffices particularly when measuring was against assumed
display width (80) rather than actual width.
2019-11-06 17:25:45 +02:00
PatR
de44286d79 curses+EDIT_GETLIN again
Turns the "fix" in commit 319dcf4746
handled removing the default answer for single-line-prompt plus
multi-line-answer but not for multi-line-prompt plus long-enough-
answer-to-reach-another-line.  The logic wasn't quite right and I
misunderstood what is stored in linestarts[] so even correct logic
wouldn't have solved things.
2019-11-06 17:25:44 +02:00
nhmall
a7e3129919 Merge branch 'NetHack-3.6' 2019-11-05 11:02:24 -05: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
f07bf610b8 Merge branch 'NetHack-3.6' 2019-11-04 01:18:24 -05: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
nhmall
ffec86b244 Merge branch 'NetHack-3.6' 2019-11-02 22:53:46 -04: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
nhmall
28a4c65caa Merge branch 'NetHack-3.6' 2019-11-02 12:12:59 -04: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
6d385661c0 Merge branch 'NetHack-3.6' 2019-11-02 01:58:32 -04:00
nhmall
13f4a466d9 name correction 2019-11-02 01:44:00 -04:00
nhmall
f261b02f5a dungeoneers update 2019-11-02 01:40:58 -04: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
nhmall
2f260541d9 more doc updates and tweaks 2019-11-01 12:48:09 -04:00
Bart House
d9d47c120b Merge branch 'NetHack-3.6' 2019-10-31 20:46:54 -07:00
nhmall
5d5a4610ff try to improve some reported TeX Guidebook to pdf results 2019-10-31 19:22:05 -04:00
nhmall
696f54a3b8 doc updates 2019-10-31 13:27:10 -04:00
nhmall
ac49d7b5e8 unintentional change 2019-10-31 12:50:12 -04:00
nhmall
6f7246bdc3 Guidebook.tex fix 2019-10-31 12:46:33 -04:00
nhmall
b377771849 Merge branch 'NetHack-3.6' 2019-10-31 12:26:27 -04: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
PatR
eb825a2da5 catch Guidebook.tex up with Guidebook.mn
Only with the past couple of changes, not a complete reconciliation.

Not tested.
2019-10-31 05:31:39 -07:00
PatR
384f98b61f Guidebook tweak
This sample comment attending the sample SYMBOLS statement fit ok in
the pdf output but wrapped to another line in the plain text output,
so shorten it.

S_xan, S_pet_override, and S_player_override still wrap, but by a bit
less than before.  Their width causes the line of dashes at the top
of the table to wrap too.

Guidebook.tex is still lagging behind.
2019-10-30 17:37:04 -07:00
nhmall
61fe703331 Merge branch 'NetHack-3.6' 2019-10-30 20:22:48 -04:00
nhw_cron
4f1a13147d This is cron-daily v1-Oct-30-2019. guidebook updated: doc/Guidebook.txt 2019-10-30 20:20:20 -04:00
nhmall
2eab66617d Merge branch 'NetHack-3.6' 2019-10-30 13:21:20 -04:00
PatR
e08dc704ef fix 'roff warning
I think it was issued by tbl but it wasn't about any of the tables.
 warning: numeric expression expected (got 'R')
was complaining about
 .lp SYMBOLS, ROGUESYMBOLS
Exclosing the paragraph label within quotes to make it one argument
to the lp macro or command would have fixed this, but I've split
them into two paragraphs.  And reordered several of the paragraphs
which were alphabetized just enough to make the out of order ones
seem like mistakes.

Guidebook.tex needs to catch up.
2019-10-30 08:20:22 -07:00
Bart House
43ef5ef7fa Windows Store support for NetHack 3.6. 2019-10-29 21:28:39 -07:00